aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortomsmeding <hallo@tomsmeding.nl>2015-05-11 18:39:56 +0200
committertomsmeding <hallo@tomsmeding.nl>2015-05-11 18:40:08 +0200
commit82407c1c4c9526e7dc408e936478c8619ded8c66 (patch)
treeb7ab24326c72e58d915ad1afec5adebef51c0689 /Makefile
parent6f27f2e53179f476cfb80e634a59bfd3d584db6b (diff)
Fix up makefile and add functional insert and find implementation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1f83663..eb34638 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@ CFLAGS=-Wall -O2
CPPFLAGS=-Wall -O2 -std=c++11
BINARIES=engine
+OBJS=enginedata.o
+DEPFILES=$(OBJS:.o=.d)
.PHONY: all clean
@@ -11,8 +13,18 @@ BINARIES=engine
all: $(BINARIES)
clean:
- rm $(BINARIES)
+ rm -f $(BINARIES) $(OBJS) $(DEPFILES)
+
+
+-include $(OBJS:.o=.d)
engine: engine.cpp enginedata.o
$(CXX) $(CPPFLAGS) -o $@ $^
+
+#enginedata: enginedata.cpp enginedata.h
+# $(CXX) $(CPPFLAGS) -o %@ enginedata.cpp
+
+%.o: %.cpp
+ $(CXX) $(CPPFLAGS) $*.cpp -c -o $*.o
+ $(CXX) -MM $(CPPFLAGS) $*.cpp > $*.d