summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Chavez <david@dcvz.io>2022-06-20 19:38:08 +0200
committerGitHub <noreply@github.com>2022-06-20 13:38:08 -0400
commita142d94c36f5aa0055cf62d28b4140106c5b7a6f (patch)
treeff7b7db4190d89399b80e816921c5eaac4288e55
parent4e754885670f9ca4be663a6ce9d8f11da5bba08c (diff)
Extract StormLib building from soh to ZAPDTR (#505)
* Extract StormLib building from soh to ZAPDTR ZAPDTR is currently where we have everything… though this might not make the most sense. * Do not import storm as a relative
-rw-r--r--ZAPDTR/Makefile10
-rw-r--r--soh/Makefile7
2 files changed, 10 insertions, 7 deletions
diff --git a/ZAPDTR/Makefile b/ZAPDTR/Makefile
index 8123f8162..9ff869f89 100644
--- a/ZAPDTR/Makefile
+++ b/ZAPDTR/Makefile
@@ -103,6 +103,7 @@ clean:
$(MAKE) -C lib/libgfxd clean
$(MAKE) -C ZAPDUtils clean
$(MAKE) -C ExporterTest clean
+ rm -rf ../StormLib/build
rebuild: clean all
@@ -121,6 +122,11 @@ build/%.o: %.cpp
lib/libgfxd/libgfxd.a:
$(MAKE) -C lib/libgfxd
+.PHONY: StormLib
+StormLib:
+ LDFLAGS="" cmake -B ../StormLib/build -S ../StormLib
+ LDFLAGS="" cmake --build ../StormLib/build
+
.PHONY: ExporterTest
ExporterTest:
$(MAKE) -C ExporterTest
@@ -131,5 +137,5 @@ ZAPDUtils:
# Linking
-ZAPD.out: $(O_FILES) lib/libgfxd/libgfxd.a ExporterTest ZAPDUtils
- $(CXX) $(CXXFLAGS) $(O_FILES) lib/libgfxd/libgfxd.a ZAPDUtils/ZAPDUtils.a $(EXPORTERS) $(LDFLAGS) $(OUTPUT_OPTION)
+ZAPD.out: $(O_FILES) lib/libgfxd/libgfxd.a ExporterTest ZAPDUtils StormLib
+ $(CXX) $(CXXFLAGS) $(O_FILES) lib/libgfxd/libgfxd.a ZAPDUtils/ZAPDUtils.a ../StormLib/build/libstorm.a $(EXPORTERS) $(LDFLAGS) $(OUTPUT_OPTION)
diff --git a/soh/Makefile b/soh/Makefile
index 2d241139f..70670f201 100644
--- a/soh/Makefile
+++ b/soh/Makefile
@@ -7,6 +7,7 @@ ZAPD := ../ZAPDTR/ZAPD.out
LIBULTRASHIP := ../libultraship/libultraship.a
ZAPDUTILS := ../ZAPDTR/ZAPDUtils/ZAPDUtils.a
+LIBSTORM := ../StormLib/build/libstorm.a
ASAN ?= 0
DEBUG ?= 1
@@ -56,12 +57,12 @@ INC_DIRS := $(addprefix -I, \
)
LDDIRS := $(addprefix -L, \
- ../StormLib/build \
../libultraship/ \
)
LDLIBS := \
$(ZAPDUTILS) \
+ $(LIBSTORM) \
$(addprefix -l, \
X11 \
dl \
@@ -72,7 +73,6 @@ LDLIBS := \
SDL2 \
GL \
GLEW \
- storm \
pulse\
ultraship \
) \
@@ -127,8 +127,6 @@ setup:
$(MAKE) mpq
mpq:
- cmake -B ../StormLib/build -S ../StormLib
- cmake --build ../StormLib/build
$(MAKE) -C ../libultraship
$(MAKE) -C ../OTRExporter/OTRExporter
$(MAKE) -C ../ZAPDTR
@@ -141,7 +139,6 @@ distclean: clean
$(MAKE) clean -C ../libultraship
$(MAKE) clean -C ../OTRExporter/OTRExporter
$(MAKE) clean -C ../ZAPDTR
- rm -rf ../StormLib/build
clean:
rm -rf build $(TARGET)