blob: 381b5731aaad72338ac6b9035589e9608a277d9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
CC=gcc
CXX=g++
CFLAGS=-Wall -O2
CPPFLAGS=-Wall -O2 -std=c++11
BINARIES=engine
OBJS=enginedata.o util.o
DEPFILES=$(OBJS:.o=.d)
.PHONY: all clean
all: $(BINARIES)
clean:
rm -f $(BINARIES) $(OBJS) $(DEPFILES)
-include $(OBJS:.o=.d)
engine: engine.cpp enginedata.o util.o
$(CXX) $(CPPFLAGS) -o $@ $^
enginedata: enginedata.cpp enginedata.h util.o
$(CXX) $(CPPFLAGS) -o %@ enginedata.cpp
%.o: %.cpp %.h
$(CXX) $(CPPFLAGS) $*.cpp -c -o $*.o
$(CXX) -MM $(CPPFLAGS) $*.cpp > $*.d
|