linux build setup ~Makefile not correct yet~

master
Allen Webster 2016-03-08 18:17:51 -05:00
parent 6f5e1e5686
commit f85626d79f
3 changed files with 39 additions and 1 deletions

View File

@ -1,5 +1,5 @@
// Set which customization you want to use with this define or write your own
#define Custom_Current Custom_HandmadeHero
#define Custom_Current Custom_Default
#define Custom_Default 0

34
Makefile Executable file
View File

@ -0,0 +1,34 @@
CPP_FILES := $(wildcard *.cpp) $(wildcard **/*.cpp)
H_FILES := $(wildcard *.h) $(wildcard **/*.h)
WARNINGS := -Wno-write-strings
PLAT_LINKS := -L/usr/local/lib -lX11 -lpthread -lm -lrt -lGL -ldl -lXfixes
FLAGS := -fPIC -fno-threadsafe-statics -pthread
all: 4ed_app.so 4ed
4ed_app.so: $(CPP_FILES) $(H_FILES)
g++ $(WARNINGS) $(FLAGS) -std=gnu++0x -shared code/4ed_app_target.cpp -iquoteforeign -o 4ed_app.so
4ed: $(CPP_FILES) $(H_FILES)
g++ $(WARNINGS) $(FLAGS) -std=gnu++0x code/linux_4ed.cpp -iquoteforeign $(PLAT_LINKS) -o $@
clean:
$(RM) -f 4ed_app.so 4ed
release: FLAGS += -U_FORTIFY_SOURCE -fno-stack-protector -Wl,--wrap=memcpy code/linux_release_compat.c -Wl,-s
release: 4ed_app.so 4ed
strip -R .comment $^
release32: FLAGS += -U_FORTIFY_SOURCE -fno-stack-protector -Wl,-s -m32
release32: 4ed_app.so 4ed
strip -R .comment $^
release_super: FLAGS += -D FRED_SUPER
release_super: release
release32_super: FLAGS += -D FRED_SUPER
release32_super: release32
.PHONY: clean release release32

View File

@ -41,6 +41,7 @@ make clean
make release32
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha"
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/"
cp ./code/README.txt ./code/TODO.txt "$TMP_DIR/alpha/"
echo " "
@ -56,6 +57,7 @@ make clean
make release
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha"
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/"
cp ./code/README.txt ./code/TODO.txt "$TMP_DIR/alpha/"
echo " "
@ -75,6 +77,7 @@ make clean
make release32_super
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/"
cp ./code/buildsuper.sh "$TMP_DIR/super/"
cp ./code/README.txt ./code/SUPERREADME.txt ./code/TODO.txt "$TMP_DIR/super/"
echo " "
@ -91,6 +94,7 @@ make release_super
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/super/"
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/"
cp ./code/buildsuper.sh "$TMP_DIR/super/"
cp ./code/README.txt ./code/SUPERREADME.txt ./code/TODO.txt "$TMP_DIR/super/"
echo " "