-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (37 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Makefile
SHELL := bash
.SHELLFLAGS := -o errexit -o nounset -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error Please use a version of Make supporting .RECIPEPREFIX)
endif
.RECIPEPREFIX = >
MESON := meson
NINJA := ninja -v
# Automatically collect all sources
TL_SRC_DIRS := trollauncher
TL_SRCS := $(shell find $(TL_SRC_DIRS) -type f -regex ".*\.[ch]pp$$")
all: build/build.sentinel
build:
> $(MESON) setup build
build/build.sentinel: $(TL_SRCS) | build
> $(NINJA) -C build
> touch build/build.sentinel
release: rbuild/build.sentinel
rbuild:
> $(MESON) setup --buildtype minsize rbuild
rbuild/build.sentinel: $(TL_SRCS) | rbuild
> $(NINJA) -C rbuild
> find rbuild -regex '.+/trollauncher\(\.exe\)?' | xargs strip -s
> touch rbuild/build.sentinel
clean:
> -$(RM) -rf build rbuild
# This will really only work on Ubuntu 18.04, oh well
DEV_DEPENDS := build-essential pkg-config python3 python3-pip python3-setuptools python3-wheel \
ninja-build g++-8 libboost-all-dev libzip-dev libwxgtk3.0-dev libprocps-dev
devdeps:
> sudo apt-get install $(DEV_DEPENDS)
> sudo -H pip3 install meson
.PHONY: all release clean devdeps