File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ # !/usr/bin/env make -f
2+
3+ # ## global variables section
4+
5+ # static vars
6+ BUILD_DIR: ="build"
7+ BUILD_BIN: ="$(BUILD_DIR ) /tools/blisp/blisp"
8+
9+ # dynamic vars
10+ FILES_CMAKE: =$(shell find . -path ./$(BUILD_DIR ) -prune -false -o -type f -name '* .cmake' -o -type f -name 'CMakeLists.txt')
11+ FILES_SRC: =$(shell find . -path ./$(BUILD_DIR ) -prune -false -o -type f -name '* .c' -o -type f -name '* .h')
12+
13+ # ## main targets section
14+
15+ # simplify build
16+ build : $(FILES_CMAKE ) $(FILES_SRC ) Makefile
17+ @echo " \n>>>> Generating build files in: $( BUILD_DIR) ...\n"
18+ @cmake -S . -B $(BUILD_DIR ) -DBLISP_BUILD_CLI=ON
19+ @echo " \n>>>> Building...\n"
20+ @cmake --build $(BUILD_DIR )
21+ @echo " \n>>>> DONE: $( BUILD_BIN) \n"
22+
23+ # deleting output build directory with its content
24+ clean :
25+ -@rm -rf $(BUILD_DIR ) /
26+
27+ # printf-like debug target
28+ vars :
29+ @echo " \n>>>> FILES_CMAKE:"
30+ @echo " $( FILES_CMAKE) " | sed ' s, ,\n,g'
31+ @echo " \n>>>> FILES_SRC:"
32+ @echo " $( FILES_SRC) " | sed ' s, ,\n,g'
33+
34+ .PHONY : clean vars
35+
You can’t perform that action at this time.
0 commit comments