aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2022-11-15 07:35:07 -0500
committerClyne Sullivan <clyne@bitgloo.com>2022-11-15 07:35:07 -0500
commita056c15dd3781b4f6bb89fdd738b14cafc00cd85 (patch)
tree1775a5913c7bc87563b6b4a29c63514cf15b4185 /Makefile
parent1405d648b6264cfda7c46f5b251258335abaee83 (diff)
parent57013add5b7c524086272be7d395f9ec5109bde2 (diff)
merge branch lib-cleanup into ui
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 28 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index e1827a7..4ec54da 100644
--- a/Makefile
+++ b/Makefile
@@ -37,14 +37,18 @@ DEPEXT = d
LIBDIR = lib
LIBS = -L$(LIBDIR) -lSDL2 -lpthread -lentityx -lluajit -ldl -lGLEW -lGL \
- -lSDL2_image -lSOIL -lfreetype
+ -lSDL2_image -lsoil -lfreetype -lopenal -lalut
-CXXFLAGS = -ggdb -g3 -std=c++17 -Wall -Wextra -Werror -pedantic \
- -Wno-class-memaccess -Wno-implicit-fallthrough -m64 -O1
+CXXFLAGS = -ggdb -std=c++17 -Wall -Wextra -Werror -pedantic \
+ -Wno-class-memaccess -Wno-implicit-fallthrough -Wno-unused-parameter
-CXXINCS = -Isrc -I$(LIBDIR)/LuaJIT/src -I$(LIBDIR)/entityx \
- -I$(LIBDIR)/LuaBridge/Source -I$(LIBDIR)/sol2/include \
- -I$(LIBDIR)/soil -I$(LIBDIR)/cereal/include -I$(LIBDIR)/freetype
+CXXINCS = -I$(SRCDIR) \
+ -I$(LIBDIR)/entityx \
+ -I$(LIBDIR)/luajit/src \
+ -I$(LIBDIR)/sol2/include \
+ -I$(LIBDIR)/soil \
+ -I$(LIBDIR)/cereal/include \
+ -I$(LIBDIR)/freetype
CXXSRC := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT))
CXXOBJ := $(patsubst $(SRCDIR)/%,$(OUTDIR)/%,$(CXXSRC:.$(SRCEXT)=.$(OBJEXT)))
@@ -65,10 +69,12 @@ clean:
@echo " CLEAN"
@$(RM) -rf $(OUTDIR)
+cleanall: clean
+ @$(RM) -f lib/libentityx.a lib/libluajit.a lib/libsoil.a
+
cleaner: clean
-#@$(RM) -rf $(EXECDIR)
-$(EXEC): $(CXXOBJ)
+$(EXEC): lib/libentityx.a lib/libluajit.a lib/libsoil.a $(CXXOBJ)
@echo " CXX " $(EXEC)
@$(CXX) -o $(EXECDIR)/$(EXEC) $^ $(LIBS)
@@ -82,7 +88,19 @@ $(OUTDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT)
@sed -e 's/.*://' -e 's/\\$$//' < $(OUTDIR)/$*.$(DEPEXT).tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $(OUTDIR)/$*.$(DEPEXT)
@rm -f $(OUTDIR)/$*.$(DEPEXT).tmp
-mem: $(EXEC)
- valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes ./$(EXEC)
+lib/libentityx.a:
+ @cmake -S lib/entityx -B lib/entityx -DENTITYX_BUILD_SHARED=FALSE
+ @make -Clib/entityx -j4 entityx
+ @cp lib/entityx/libentityx.a lib/libentityx.a
+
+lib/libluajit.a:
+ @make -Clib/luajit -j4
+ @cp lib/luajit/src/libluajit.a lib/libluajit.a
+
+lib/libsoil.a:
+ @make -Clib/soil -j4
+ @cp lib/soil/libsoil.a lib/libsoil.a
+
+.PHONY: all remake clean cleaner cleanall resources
.PHONY: all remake clean cleaner resources mem