-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 861 Bytes
/
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
ifndef PROFILE
override PROFILE="../profiles/x86_64"
endif
ARCHS := x86_64 armv7
ENVS := $(patsubst %,env-%,${ARCHS})
ENVS_TEST := $(patsubst %,%-test,${ENVS})
ENVS_RUN := $(patsubst %,%-run,${ENVS})
.PHONY: all env-x86_64 env-x86_64-test env-x86_64-run env-armv7 env-armv7-test env-armv7-run test compile gen dep mk clean
all: compile
env-x86_64-test: env-x86_64
env-x86_64-run: env-x86_64
env-armv7-test: env-armv7
env-armv7-run: env-armv7
${ENVS}:
docker build -t cpppid_$@:0.1 -f Dockerfile_$@ .
${ENVS_TEST}:
docker run --rm -t cpppid_$<:0.1 make test
${ENVS_RUN}:
docker run -it --rm cpppid_$<:0.1
test: compile
cd build && ${RUNNER} ./test/cpppid_test
compile: gen
cd build && cmake --build .
gen: dep
cd build && cmake ..
dep: mk
cd build && conan install .. --build=missing -pr ${PROFILE}
mk:
-mkdir build
clean:
rm -rf build