blob: 7e812d97e80a3c54fc6df32acd59d2991b5cd8fa (
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 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
|