#DBG = -g CC = gcc WARNFLAGS = -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security override CFLAGS += -D_REENTRANT -O2 $(shell sdl-config --cflags) $(DBG) $(WARNFLAGS) .PHONY: all clean install all: sdlbomber 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) matcher: matcher.c bomber.o: bomber.c bomber.h gfx.h announce.h sound.h gfx.o: gfx.c gfx.h bomber.h sound.o: sound.c sound.h announce.o: announce.c announce.h clean: rm -f *.o matcher sdlbomber install: sdlbomber echo "Installing into $(DESTDIR)" mkdir -p "$(DESTDIR)/usr/bin/" "$(DESTDIR)/usr/share/sdlbomber/" install -m 0755 sdlbomber "$(DESTDIR)/usr/bin/" install -m 0644 data/*.pcx data/*.raw "$(DESTDIR)/usr/share/sdlbomber/"