aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2021-05-28 11:07:52 -0400
committerJon Santmyer <jon@jonsantmyer.com>2021-05-28 11:07:52 -0400
commita0af2c0be21cbba9c9c5d9ea9ffcd7e9d7b74905 (patch)
treebad7b23d96597a167f829b749165b2e352eacff3 /Makefile
parentd3602d5cccf7f6c4a7f975694db2b16db28cdd60 (diff)
downloadpostmodern-a0af2c0be21cbba9c9c5d9ea9ffcd7e9d7b74905.tar.gz
postmodern-a0af2c0be21cbba9c9c5d9ea9ffcd7e9d7b74905.tar.bz2
postmodern-a0af2c0be21cbba9c9c5d9ea9ffcd7e9d7b74905.zip
seperate rendering from game logic, new library boxii
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f4825bd..88b8d2a 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ WARNINGS := -Wall \
CPP := g++
CPPFLAGS := -std=gnu++20 $(WARNINGS) -I$(INCDIR) -g
-LIBS :=
+LIBS := -L$(TARGET_PREFIX) -l:libboxii.so
ifeq ($(TRUECOLOR), 1)
CPPFLAGS += -DTRUECOLOR
@@ -43,17 +43,27 @@ else
endif
.PHONY: all
-all: $(OBJFILES)
+all: $(OBJFILES) $(TARGET_PREFIX)/libboxii.so
$(CPP) $(CPPFLAGS) $(LIBS) $(OBJFILES) -o $(TARGET)
run:
- cd $(TARGET_PREFIX); ./$(TARGET_NAME)
+ cd $(TARGET_PREFIX); ./run.sh
clean:
rm $(OBJFILES)
rm $(TARGET)
+ rm $(TARGET_PREFIX)/libboxii.so
+ $(MAKE) -C $(PWD)/boxii clean
-%.o:%.cpp
+%.o:%.cpp $(INCDIR)/boxii
$(CPP) $(CPPFLAGS) -c $< -o $@
+$(INCDIR)/boxii:
+ ln -s $(PWD)/boxii/include $(INCDIR)/boxii
+
+.PHONY: $(TARGET_PREFIX)/libboxii.so
+$(TARGET_PREFIX)/libboxii.so:
+ $(MAKE) -C $(PWD)/boxii
+ mv $(PWD)/boxii/bin/libboxii.so $(TARGET_PREFIX)
+
# vim: set ts=4 sw=0 tw=0 noet :