]> git.itanic.dy.fi Git - sdl-planets/blob - Makefile
quadtree: Add missing function definition to the header
[sdl-planets] / Makefile
1 SDL_CONFIG=$(shell sdl-config --cflags)
2 SDL_LIBS=$(shell sdl-config --libs)
3 CFLAGS=$(SDL_CONFIG) -Wall -O2 -g
4
5 LIBS=$(SDL_LIBS) -lm
6
7 CC=gcc
8 SPARSE=sparse
9 CHECKPATCH=/usr/src/linux/scripts/checkpatch.pl
10
11 TESTOBJS=main.o random.o vector.o planet.o camera.o
12
13 sdl-planet: $(TESTOBJS)
14         gcc $(LIBS) -o $@ $(TESTOBJS)
15
16 .c.o:
17         @echo -e "\tCC\t" $@
18         @$(CC) -MMD -MF .$@.d $(CFLAGS) -c $< -o $@
19 ifeq ($(C),1)
20         sparse $(CFLAGS) $<
21 endif
22 ifeq ($(C),2)
23         $(CHECKPATCH) -f $<
24 endif
25
26 TAGS:
27         @echo -e "\tTAGS\t"
28         @etags *.[ch]
29
30 clean:
31         rm -rfv $(TESTOBJS) *~ sdl-planet TAGS .*.d
32
33 .PHONY: all clean TAGS
34
35 -include .*.d