Makefile.base 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. CD ?= cd
  2. RM ?= rm
  3. LD ?= ld
  4. TARGET=voxelands
  5. PACKAGE=voxelands
  6. VERSION=1602.00-alt
  7. include Makefile.sources
  8. CFLAG_DEFS=-DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" -DGAMEDATA=\"$(DATADIR)\"
  9. DISTFILES=inc data README CHANGELOG LICENSE $(SRCDIR) Makefile.*
  10. .SUFFIXES:
  11. .SUFFIXES: .c .o .h
  12. all: default
  13. default: client server
  14. client: $(TARGET)
  15. server: $(TARGET)-server
  16. dist-base:
  17. mkdir -p $(PACKAGE)-$(VERSION)
  18. cp -Rt $(PACKAGE)-$(VERSION) $(DISTFILES)
  19. dist-gz: dist-base
  20. tar czf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
  21. $(RM) -r $(PACKAGE)-$(VERSION)
  22. dist-bz2: dist-base
  23. tar cjf $(PACKAGE)-$(VERSION).tar.bz2 $(PACKAGE)-$(VERSION)
  24. $(RM) -r $(PACKAGE)-$(VERSION)
  25. dist: distclean dist-bz2
  26. distclean:
  27. $(RM) $(OBJS)
  28. clean: distclean
  29. $(RM) $(PACKAGE)*
  30. fresh: clean all
  31. .c.o: inc/common.h
  32. $(CC) $(TARGET_CFLAGS) $(CFLAG_DEFS) -o $@ -c $<
  33. .PHONY: all default client server dist-base dist-gz dist-bz2 dist distclean clean fresh