Refactor build scripts

This commit is contained in:
Balhau 2025-01-02 17:54:37 +00:00
parent a5f88a778d
commit b0380e797d
4 changed files with 15 additions and 1 deletions

3
.gitignore vendored
View file

@ -4,3 +4,6 @@ bin/
data/
*.readelf
*.class
lib/
*.gpr

View file

@ -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

10
make/utils.mk Normal file
View 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