Refactor build scripts
This commit is contained in:
parent
a5f88a778d
commit
b0380e797d
4 changed files with 15 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -4,3 +4,6 @@ bin/
|
||||||
data/
|
data/
|
||||||
*.readelf
|
*.readelf
|
||||||
*.class
|
*.class
|
||||||
|
lib/
|
||||||
|
*.gpr
|
||||||
|
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -1,4 +1,5 @@
|
||||||
include defs/makefile.def
|
include make/defs/makefile.def
|
||||||
|
include make/utils.mk
|
||||||
|
|
||||||
make: c-x86-debug cpp-x86-debug c-x86-release cpp-x86-release go gosilly make-so
|
make: c-x86-debug cpp-x86-debug c-x86-release cpp-x86-release go gosilly make-so
|
||||||
|
|
||||||
|
|
10
make/utils.mk
Normal file
10
make/utils.mk
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Define an example function
|
||||||
|
|
||||||
|
define compile_source
|
||||||
|
@for file in $? ; do \
|
||||||
|
path=$$(echo "$$file" | cut -f 2 -d '/'); \
|
||||||
|
out=$$(echo "$$path" | cut -f 1 -d '.'); \
|
||||||
|
echo ${CC} ${CFLAG_DEBUG} -o ${BIN_DIR}/$$out.c.debug.${ARCH_X86} $$file; \
|
||||||
|
${CC} ${CFLAG_DEBUG} -o ${BIN_DIR}/$$out.c.debug.${ARCH_X86} $$file -lpthread;\
|
||||||
|
done
|
||||||
|
endef
|
Loading…
Reference in a new issue