aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2022-08-20 08:44:27 -0400
committerClyne Sullivan <clyne@bitgloo.com>2022-08-20 08:44:27 -0400
commit0dc221b200b9d3df550e2d760cb396e4cb5f7176 (patch)
tree3524a0f494b1bec609cea0716cfb6f0ca515fd38 /Makefile
parent2364287a961fa9c860e1146bbcc3391ec5b1fd54 (diff)
submodule LuaJIT; build libs through Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 23f522e..db7c130 100644
--- a/Makefile
+++ b/Makefile
@@ -37,15 +37,14 @@ DEPEXT = d
LIBDIR = lib
LIBS = -L$(LIBDIR) -lSDL2 -lpthread -lentityx -lluajit -ldl -lGLEW -lGL \
- -lSDL2_image -lSOIL -lfreetype -lopenal -lalut
+ -lSDL2_image -lsoil -lfreetype -lopenal -lalut
CXXFLAGS = -ggdb -std=c++17 -Wall -Wextra -Werror -pedantic \
- -Wno-class-memaccess -Wno-implicit-fallthrough -Wno-unused-parameter
+ -Wno-class-memaccess -Wno-implicit-fallthrough -Wno-unused-parameter
CXXINCS = -I$(SRCDIR) \
-I$(LIBDIR)/entityx \
- -I$(LIBDIR)/LuaJIT/src \
- -I$(LIBDIR)/LuaBridge/Source \
+ -I$(LIBDIR)/luajit/src \
-I$(LIBDIR)/sol2/include \
-I$(LIBDIR)/soil \
-I$(LIBDIR)/cereal/include \
@@ -69,11 +68,11 @@ directories:
clean:
@echo " CLEAN"
@$(RM) -rf $(OUTDIR)
+ @$(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)
@@ -87,5 +86,18 @@ $(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
+lib/libentityx.a:
+ @cmake 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:
+ @gcc -c lib/soil/soil/*.c
+ @ar rcs lib/libsoil.a lib/soil/soil/*.o
+
.PHONY: all remake clean cleaner resources