From d358812540fe685312e541883c141f6b15f94749 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sun, 4 Sep 2016 13:18:58 -0400 Subject: [PATCH] starting linux build.c experiments --- Makefile | 63 ----------------------------------------------- original.Makefile | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 original.Makefile diff --git a/Makefile b/Makefile index d1052eda..e69de29b 100755 --- a/Makefile +++ b/Makefile @@ -1,63 +0,0 @@ -CPP_FILES := $(wildcard *.cpp) $(wildcard **/*.cpp) -C_FILES := $(wildcard *.c) $(wildcard **/*.c) -H_FILES := $(wildcard *.h) $(wildcard **/*.h) -WARNINGS := -Wno-write-strings -PLAT_LINKS := -L/usr/local/lib -lX11 -lpthread -lm -lrt -lGL -ldl -lXfixes -lfreetype -lfontconfig -FLAGS := -D_GNU_SOURCE -fPIC -fno-threadsafe-statics -pthread -I../foreign $(shell pkg-config --cflags freetype2) - -# main stuff - -debug: FLAGS += -DFRED_INTERNAL=1 -DFRED_SUPER=1 -g -O0 -debug: ../metagen ../4ed_app.so ../4ed - -../metagen: $(CPP_FILES) $(C_FILES) $(H_FILES) - g++ $(WARNINGS) $(FLAGS) 4ed_metagen.cpp -iquoteforeign -o $@ - -../4ed_app.so: $(CPP_FILES) $(C_FILES) $(H_FILES) - g++ $(WARNINGS) $(FLAGS) -shared 4ed_app_target.cpp -iquoteforeign -o $@ - -../4ed: $(CPP_FILES) $(C_FILES) $(H_FILES) - g++ $(WARNINGS) $(FLAGS) linux_4ed.cpp -iquoteforeign $(PLAT_LINKS) -o $@ - -clean: - $(RM) ../4ed_app.so ../4ed - -# releases - -alpha: FLAGS += -U_FORTIFY_SOURCE -fno-stack-protector -Wl,--wrap=memcpy linux_release_compat.c -Wl,-s -alpha: ../4ed_app.so ../4ed - strip -R .comment $^ - -alpha32: FLAGS += -U_FORTIFY_SOURCE -fno-stack-protector -Wl,-s -m32 -alpha32: ../4ed_app.so ../4ed - strip -R .comment $^ - -super: FLAGS += -DFRED_SUPER=1 -super: alpha - -super32: FLAGS += -DFRED_SUPER=1 -super32: alpha32 - -# packaging - -PACKAGE_FILES := ../4ed ../4ed_app.so README.txt TODO.txt - -../4coder_super.zip: PACKAGE_FILES += 4coder_*.h 4coder_*.cpp buildsuper.sh SUPERREADME.txt -../4coder_super32.zip: PACKAGE_FILES += 4coder_*.h 4coder_*.cpp buildsuper.sh SUPERREADME.txt - -../4coder_%.zip: % - zip -j $@ $(PACKAGE_FILES) - (cd ../release_template && zip -g -r $@ .) - $(MAKE) clean - -package: clean - @echo -e "\e[1;32m ==== Creating Alpha package ==== \e[0m" - $(MAKE) ../4coder_alpha.zip - @echo -e "\e[1;32m ==== Creating Super package ==== \e[0m" - $(MAKE) ../4coder_super.zip -# $(MAKE) ../4coder_alpha32.zip -# $(MAKE) ../4coder_super32.zip - -.PHONY: debug alpha alpha32 super super32 package clean - - diff --git a/original.Makefile b/original.Makefile new file mode 100644 index 00000000..d1052eda --- /dev/null +++ b/original.Makefile @@ -0,0 +1,63 @@ +CPP_FILES := $(wildcard *.cpp) $(wildcard **/*.cpp) +C_FILES := $(wildcard *.c) $(wildcard **/*.c) +H_FILES := $(wildcard *.h) $(wildcard **/*.h) +WARNINGS := -Wno-write-strings +PLAT_LINKS := -L/usr/local/lib -lX11 -lpthread -lm -lrt -lGL -ldl -lXfixes -lfreetype -lfontconfig +FLAGS := -D_GNU_SOURCE -fPIC -fno-threadsafe-statics -pthread -I../foreign $(shell pkg-config --cflags freetype2) + +# main stuff + +debug: FLAGS += -DFRED_INTERNAL=1 -DFRED_SUPER=1 -g -O0 +debug: ../metagen ../4ed_app.so ../4ed + +../metagen: $(CPP_FILES) $(C_FILES) $(H_FILES) + g++ $(WARNINGS) $(FLAGS) 4ed_metagen.cpp -iquoteforeign -o $@ + +../4ed_app.so: $(CPP_FILES) $(C_FILES) $(H_FILES) + g++ $(WARNINGS) $(FLAGS) -shared 4ed_app_target.cpp -iquoteforeign -o $@ + +../4ed: $(CPP_FILES) $(C_FILES) $(H_FILES) + g++ $(WARNINGS) $(FLAGS) linux_4ed.cpp -iquoteforeign $(PLAT_LINKS) -o $@ + +clean: + $(RM) ../4ed_app.so ../4ed + +# releases + +alpha: FLAGS += -U_FORTIFY_SOURCE -fno-stack-protector -Wl,--wrap=memcpy linux_release_compat.c -Wl,-s +alpha: ../4ed_app.so ../4ed + strip -R .comment $^ + +alpha32: FLAGS += -U_FORTIFY_SOURCE -fno-stack-protector -Wl,-s -m32 +alpha32: ../4ed_app.so ../4ed + strip -R .comment $^ + +super: FLAGS += -DFRED_SUPER=1 +super: alpha + +super32: FLAGS += -DFRED_SUPER=1 +super32: alpha32 + +# packaging + +PACKAGE_FILES := ../4ed ../4ed_app.so README.txt TODO.txt + +../4coder_super.zip: PACKAGE_FILES += 4coder_*.h 4coder_*.cpp buildsuper.sh SUPERREADME.txt +../4coder_super32.zip: PACKAGE_FILES += 4coder_*.h 4coder_*.cpp buildsuper.sh SUPERREADME.txt + +../4coder_%.zip: % + zip -j $@ $(PACKAGE_FILES) + (cd ../release_template && zip -g -r $@ .) + $(MAKE) clean + +package: clean + @echo -e "\e[1;32m ==== Creating Alpha package ==== \e[0m" + $(MAKE) ../4coder_alpha.zip + @echo -e "\e[1;32m ==== Creating Super package ==== \e[0m" + $(MAKE) ../4coder_super.zip +# $(MAKE) ../4coder_alpha32.zip +# $(MAKE) ../4coder_super32.zip + +.PHONY: debug alpha alpha32 super super32 package clean + +