12 BINDIR ?
= $(PREFIX
)/games
/bin
13 DESTDIR ?
= $(PREFIX
)/games
/$(PACKAGE
)
14 DATADIR ?
= $(PREFIX
)/games
15 LIBDIR ?
= $(PREFIX
)/lib
16 INCDIR ?
= $(PREFIX
)/include/$(PACKAGE
)
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
)
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
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
40 server
: $(TARGET
)-server
42 $(TARGET
)-server
: $(OBJS
)
43 $(CC
) -o
$(TARGET
)-server
$(OBJS
) $(TARGET_CLIBS
)
46 mkdir
-p
$(PACKAGE
)-$(VERSION
)
47 cp
-Rt
$(PACKAGE
)-$(VERSION
) $(DISTFILES
)
50 tar czf
$(PACKAGE
)-$(VERSION
).
tar.gz
$(PACKAGE
)-$(VERSION
)
51 $(RM
) -r
$(PACKAGE
)-$(VERSION
)
54 tar cjf
$(PACKAGE
)-$(VERSION
).
tar.bz2
$(PACKAGE
)-$(VERSION
)
55 $(RM
) -r
$(PACKAGE
)-$(VERSION
)
57 dist: distclean dist-bz2
67 @echo
"no install support"
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