blob: 0c18181868fc580b60907ef8b52e6b606e1ed60b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
OBJS = mazeoflife.o titlestate.o htpstate.o gamestate.o
CC = g++
CFLAGS = `sdl-config --cflags` -I/usr/local/include/SDL
LIBS = `sdl-config --libs` -lSDL_image
mazeoflife: $(OBJS)
$(CC) $(OBJS) $(LIBS) -o mazeoflife
%.o: %.cpp
$(CC) -c $< $(CFLAGS) -o $@
%.d: %.cpp
@set -e; rm -f $@; \
$(CC) -MM $(CFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
include $(OBJS:.o=.d)
clean:
rm -rdfv $(OBJS) $(OBJS:.o=.d) mazeoflife
|