preparation for release
[cave9.git] / src / GNUmakefile
blob68d8588e0d324419dffae9bdb2c681d2f7b32b33
1 #{{{1 setup
3 TARGET = ../cave9
5 CXX = gcc
6 CXXFLAGS = -Wall -Werror -ggdb `sdl-config --cflags` -I/usr/include/SDL
7 LDFLAGS = `sdl-config --libs` -lm -L/usr/X11/lib -lGL -lGLU -lSDL_ttf -lSDL_image -lSDL_net
10 #{{{1 build rules
12 SRCS = \
13 main.cpp \
14 display.cpp \
15 game.cpp \
17 OBJS = $(subst .cpp,.o,$(SRCS))
19 $(TARGET): $(OBJS)
20 $(CXX) $(LDFLAGS) -o $@ $^
23 #{{{1 administrative rules
25 .PHONY: clean
26 clean:
27 rm -f $(TARGET) $(OBJS) core*
30 .depend:
31 $(CXX) -MM $(CXXFLAGS) $(SRCS) > $@
33 dep:
34 rm -f .depend
35 $(MAKE) .depend
37 ifneq ($(wildcard .depend),)
38 include .depend
39 endif
42 tags:
43 $(CXX) -M $(CXXFLAGS) $(SRCS) \
44 | sed 's/:\ /\ /;s/\ /\n/g;s/\\//' | grep -v '\.o$$' | sort | uniq \
45 | ctags --c++-kinds=+px-f --c-kinds=+px-f -L -
47 #}}}
48 # vim600:fdm=marker