collision.c free
[voxelands-alt.git] / Makefile
blobea7362916b606ffabe885a6c4b10aa8fe97104d1
1 CC ?= gcc
2 CD ?= cd
3 RM ?= rm
4 LD ?= ld
6 TARGET=voxelands
7 PACKAGE=voxelands
8 VERSION=1601.00
10 PWD=$(shell pwd)
11 PREFIX ?= /usr
12 BINDIR ?= $(PREFIX)/games/bin
13 DESTDIR ?= $(PREFIX)/games/$(PACKAGE)
14 DATADIR ?= $(PREFIX)/games
15 LIBDIR ?= $(PREFIX)/lib
16 INCDIR ?= $(PREFIX)/include/$(PACKAGE)
18 DEP_LIBS=
19 CFLAG_DEFS=-DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" -DGAMEDATA=\"$(DATADIR)\"
21 TARGET_CFLAGS ?= -Wall -g -Iinc/ -I. $(CFLAG_DEFS) $(CFLAGS) -pedantic
22 TARGET_CLIBS ?= $(DEP_LIBS) -g $(CLIBS) -pthread -lm
23 TARGET_LDFLAGS ?= -g $(LDFLAGS)
25 SRCDIR=src
26 DISTFILES=inc data README CHANGELOG LICENSE $(SRCDIR) Makefile
27 INSTFILES=data/default.cfg
28 INSTFONTS=data/fonts/font.ttf
29 INSTIMGS=data/images/*
30 INSTSNDS=data/sounds/*
31 INSTXMLS=data/xml/main.ui
32 INSTGRP ?= games
34 OBJS=$(SRCDIR)/main.o $(SRCDIR)/array.o $(SRCDIR)/auth.o $(SRCDIR)/ban.o $(SRCDIR)/collision.o $(SRCDIR)/crypto.o $(SRCDIR)/crypto_base64.o $(SRCDIR)/file.o $(SRCDIR)/list.o $(SRCDIR)/math.o $(SRCDIR)/math_quaternion.o $(SRCDIR)/math_vector.o $(SRCDIR)/nvp.o $(SRCDIR)/path.o $(SRCDIR)/thread.o
36 all: default
38 default: server
40 server: $(TARGET)-server
42 $(TARGET)-server: $(OBJS)
43 $(CC) -o $(TARGET)-server $(OBJS) $(TARGET_CLIBS)
45 dist-base:
46 mkdir -p $(PACKAGE)-$(VERSION)
47 cp -Rt $(PACKAGE)-$(VERSION) $(DISTFILES)
49 dist-gz: dist-base
50 tar czf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
51 $(RM) -r $(PACKAGE)-$(VERSION)
53 dist-bz2: dist-base
54 tar cjf $(PACKAGE)-$(VERSION).tar.bz2 $(PACKAGE)-$(VERSION)
55 $(RM) -r $(PACKAGE)-$(VERSION)
57 dist: distclean dist-bz2
59 distclean:
60 $(RM) lastarch
61 $(RM) $(OBJS)
63 clean: distclean
64 $(RM) $(PACKAGE)*
66 install: all
67 @echo "no install support"
69 uninstall:
71 fresh: clean all
73 $(SRCDIR)/%.o: $(SRCDIR)/%.c inc/common.h
74 $(CC) $(TARGET_CFLAGS) -o $@ -c $<
77 .PHONY: all default dist-base dist-gz dist-bz2 dist distclean clean install uninstall server fresh