1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
--- ../Makefile.orig Fri May 25 01:00:34 2007
+++ ../Makefile Sat Jul 21 13:39:48 2007
@@ -22,6 +22,10 @@
# Build binary that uses SDL for sound when "1".
SDLSOUND?=1
+# Adds DATADIR/LIBDIR (see below) to the data and library search path.
+WITH_DATADIR?=no
+WITH_LIBDIR?=no
+
# Selects the component to build; ALL, GAME, or DEDICATED
BUILD?=ALL
@@ -53,6 +57,20 @@
BASE_CFLAGS=$(CFLAGS) -Dstricmp=strcasecmp -D_stricmp=strcasecmp -I$(X11BASE)/include
+# DATADIR / LIBDIR support.
+
+PREFIX?=/usr/local
+
+ifeq ($(strip $(WITH_DATADIR)),yes)
+DATADIR?=$(PREFIX)/share/alienarena
+BASE_CFLAGS+=-DDATADIR='\"$(DATADIR)\"'
+endif
+
+ifeq ($(strip $(WITH_LIBDIR)),yes)
+LIBDIR?=$(PREFIX)/lib/alienarena
+BASE_CFLAGS+=-DLIBDIR='\"$(LIBDIR)\"'
+endif
+
RELEASE_CFLAGS=$(BASE_CFLAGS)
ifeq ($(strip $(OPTIMIZED_CFLAGS)),yes)
@@ -128,13 +146,13 @@
$(BUILDDIR)/crx
endif
+ifeq ($(strip $(BUILD)),CLIENT)
+ TARGETS+=$(BUILDDIR)/crx
+endif
+
ifeq ($(strip $(BUILD)),DEDICATED)
SDLSOUND=0
TARGETS+=$(BUILDDIR)/crded
-endif
-
-ifeq ($(strip $(BUILD)),GAME)
- TARGETS+=$(BUILDDIR)/crx
endif
ifeq ($(strip $(SDLSOUND)),1)
|