blob: b79fe63a0fb09a5be8738b4b4de93e0fb1a3c6d7 (
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 gamestate.o
CC = g++
CFLAGS = `pkg-config sdl --cflags`
LIBS = `pkg-config sdl --libs`
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
|