summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0ccd3a9..4980c17 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CXX := g++
-CXXFLAGS := -Wall -Wextra -std=c++11 -O2 -fwrapv -I. -I/usr/local/lib
+CXXFLAGS := -Wall -Wextra -std=c++11 -g -fwrapv -I. -I/usr/local/lib
LIBS := -L/usr/local/lib -lsfml-{system,window,graphics}
BIN := game
@@ -25,8 +25,9 @@ font_skipped := $(filter-out %.ttf %/LICENSE,$(font_allfiles))
font_obj := $(patsubst src/fonts/%.ttf,build/fonts/%.o,$(font_fnames))
font_externs := $(shell echo $$(for f in $(font_obj); do basename $$f | sed 's/\.[^.]*$$//' | sed 's/.*/extern Font *&;/'; done))
-base_src := $(wildcard *_base.cpp)
-base_src += library.cpp sprite.cpp font.cpp main.cpp
+special_cpp := object_header_extractor.cpp object_header_maker.cpp object_wrapper.cpp
+
+base_src := $(filter-out $(special_cpp),$(wildcard *.cpp))
base_obj := $(patsubst %.cpp,build/%.o,$(base_src))
categories := object sprite font
@@ -89,7 +90,7 @@ build/objects/%.h: src/objects/%.cpp
$(CXX) -E object_header_maker.cpp "-D__OBJECT_NAME__=$(basename $(notdir $<))" "-DEVENT_XLIST=$$($(CXX) -E object_header_extractor.cpp "-D__OBJECT_FNAME__=\"$<\"" | sed 's/__________EVENT_NEWLINE__________/\n/g' | grep -oe '__________EVENT_COUNTER_TAG_[^_]*__________' | sed 's/[^G]*G_\(.*\)__________.*/X(\1)/g' | xargs)" | sed 's/^# [0-9]\+ ".*//' >"$@"
build/objects.h: $(object_head)
- echo Collecting header files
+ echo Writing collected objects header
echo $(object_head) | xargs -n 1 basename | sed 's,.*,#include "objects/&",' >"$@"