sdlbomber/Makefile

42 lines
1.3 KiB
Makefile
Raw Permalink Normal View History

DBG = -g
2009-08-06 16:44:28 +00:00
CC = gcc
WARNFLAGS = -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security
2009-08-11 15:19:43 +00:00
override CFLAGS += -D_REENTRANT $(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
sdlbomber: announce.o bomber.o draw.o game.o gfx.o sound.o list.o network.o menu.o utils.o
2021-09-15 13:02:32 +00:00
gcc $(LDFLAGS) -o $@ $^ $(shell sdl-config --libs) -lavahi-common -lavahi-client $(DBG)
2009-08-06 16:44:28 +00:00
matcher: matcher.c
2009-08-09 17:10:35 +00:00
announce.o: announce.c announce.h network.h
bomber.o: bomber.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.h
draw.o: draw.c draw.h bomber.h gfx.h
game.o: game.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.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
list.o: list.c bomber.h list.h utils.h
menu.o: menu.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.h
2009-08-09 22:02:13 +00:00
network.o: network.c announce.h bomber.h draw.h game.h menu.h network.h utils.h
2009-08-07 13:39:51 +00:00
sound.o: sound.c sound.h
utils.o: utils.c bomber.h utils.h gfx.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/"