aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 27 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index f79435c..c590bab 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 -std=c++17 -Wall -Wextra -Werror -pedantic \
- -Wno-class-memaccess -Wno-implicit-fallthrough -m64 -O1
+ -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)
@@ -85,4 +91,17 @@ $(OUTDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT)
mem: $(EXEC)
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes ./$(EXEC)
-.PHONY: all remake clean cleaner resources mem
+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 mem