diff --git a/4coder_custom.cpp b/4coder_custom.cpp index fe3c4c89..dca8651a 100644 --- a/4coder_custom.cpp +++ b/4coder_custom.cpp @@ -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 diff --git a/Makefile b/Makefile new file mode 100755 index 00000000..fb803c70 --- /dev/null +++ b/Makefile @@ -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 + + diff --git a/package.sh b/package.sh index 75723ba8..7e4423a2 100755 --- a/package.sh +++ b/package.sh @@ -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 " "