forked from ppp-project/ppp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 831 Bytes
/
Makefile
File metadata and controls
40 lines (31 loc) · 831 Bytes
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
# CMake project wrapper Makefile
ifeq ($(CMAKE),)
CMAKE := cmake
endif
RMDIR := $(CMAKE) -E remove_directory
MKDIR := $(CMAKE) -E make_directory
CPDIR := $(CMAKE) -E copy_directory
CP := $(CMAKE) -E copy
LN := $(CMAKE) -E create_symlink
RMF := $(CMAKE) -E remove -f
# Don't change here; override in local.mk instead!
TOOLCHAIN_FILE :=
BUILD_TYPE := "MinSizeRel"
OPTIONS :=
-include local.mk
all: ./build/Makefile
@$(CMAKE) --build build
./build/Makefile: local.mk Makefile
@- $(RMDIR) ./build
@($(MKDIR) build > /dev/null)
@(cd build > /dev/null 2>&1 && \
$(CMAKE) -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_FILE}" \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
${OPTIONS} \
..)
.PHONY: install
install:
@$(CMAKE) --build build --target $@
.PHONY: clean
clean:
@- $(RMDIR) ./build