sdlbomber/Makefile

30 lines
895 B
Makefile
Raw Normal View History

2009-08-06 16:44:28 +00:00
#DBG = -g
CC = gcc
WARNFLAGS = -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security
2009-08-07 12:51:23 +00:00
override CFLAGS += -D_REENTRANT -O2 $(shell sdl-config --cflags) $(DBG) $(WARNFLAGS)
2009-08-06 16:44:28 +00:00
2009-08-07 12:51:23 +00:00
.PHONY: all clean install
2009-08-07 13:18:14 +00:00
all: sdlbomber
2009-08-06 16:44:28 +00:00
2009-08-07 13:18:14 +00:00
sdlbomber: bomber.o gfx.o sound.o announce.o
gcc -o sdlbomber bomber.o gfx.o sound.o announce.o $(shell sdl-config --libs) -lavahi-common -lavahi-client $(DBG)
2009-08-06 16:44:28 +00:00
matcher: matcher.c
bomber.o: bomber.c bomber.h gfx.h announce.h
2009-08-06 16:44:28 +00:00
gfx.o: gfx.c gfx.h bomber.h
2009-08-06 16:44:28 +00:00
sound.o: sound.c
announce.o: announce.c announce.h
2009-08-06 16:44:28 +00:00
clean:
2009-08-07 13:18:14 +00:00
rm -f *.o matcher sdlbomber
2009-08-07 12:51:23 +00:00
2009-08-07 13:18:14 +00:00
install: sdlbomber
2009-08-07 12:51:23 +00:00
echo "Installing into $(DESTDIR)"
mkdir -p "$(DESTDIR)/usr/bin/" "$(DESTDIR)/usr/share/sdlbomber/"
2009-08-07 13:18:14 +00:00
install -m 0755 sdlbomber "$(DESTDIR)/usr/bin/"
install -m 0644 data/*.pcx data/*.raw "$(DESTDIR)/usr/share/sdlbomber/"