You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. DBG = -g
  2. CC = gcc
  3. WARNFLAGS = -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security
  4. override CFLAGS += -D_REENTRANT $(shell sdl-config --cflags) $(DBG) $(WARNFLAGS)
  5. .PHONY: all clean install
  6. all: sdlbomber
  7. sdlbomber: announce.o bomber.o draw.o game.o gfx.o sound.o list.o network.o menu.o utils.o
  8. gcc -o $@ $^ $(shell sdl-config --libs) -lavahi-common -lavahi-client $(DBG)
  9. matcher: matcher.c
  10. announce.o: announce.c announce.h network.h
  11. bomber.o: bomber.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.h
  12. draw.o: draw.c draw.h bomber.h gfx.h
  13. game.o: game.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.h
  14. gfx.o: gfx.c gfx.h bomber.h
  15. list.o: list.c bomber.h list.h utils.h
  16. menu.o: menu.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.h
  17. network.o: network.c announce.h bomber.h draw.h game.h menu.h network.h utils.h
  18. sound.o: sound.c sound.h
  19. utils.o: utils.c bomber.h utils.h gfx.h
  20. clean:
  21. rm -f *.o matcher sdlbomber
  22. install: sdlbomber
  23. echo "Installing into $(DESTDIR)"
  24. mkdir -p "$(DESTDIR)/usr/bin/" "$(DESTDIR)/usr/share/sdlbomber/"
  25. install -m 0755 sdlbomber "$(DESTDIR)/usr/bin/"
  26. install -m 0644 data/*.pcx data/*.raw "$(DESTDIR)/usr/share/sdlbomber/"