summaryrefslogtreecommitdiff
path: root/games/xroads/files/patch-aa
blob: 6fb4422b3bce7762aafd1ecbbc46c256858a3527 (plain) (blame)
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
--- Makefile	Mon Aug  3 17:24:42 1998
+++ /home/andy/tmp/wrk/Makefile	Tue Aug  4 12:55:37 1998
@@ -5,7 +5,11 @@
 # optimizations. Check the manual for your compiler.
 ###########################################################################
 
-FLAGS = -O2 -g -Wall
+CFLAGS?=	-O2 -g -Wall
+PREFIX?=	/usr/X11R6
+DATADIR?=	$(PREFIX)/share/xroads
+INCLUDE?=	-I/usr/X11R6/include
+LIBS?=		-L/usr/X11R6/lib -lX11 -lm
 
 # These lines ain't needed... but I'm not taking 'em out yet
 #BOGOMIPS = `grep bogomips /proc/cpuinfo | awk '{ printf("%s", $$3) }'`
@@ -36,7 +40,7 @@
 ###########################################################################
 
 # Your C compiler
-CC = gcc
+CC?= gcc
 
 # Your tar
 TAR = tar
@@ -54,12 +58,12 @@
 
 ## "all" of course builds XRoads.
 all:
-	$(CC) $(FLAGS) -c chardata.c
-	$(CC) $(FLAGS) -c tiledata.c
-	$(CC) $(FLAGS) -c fileops.c
-	$(CC) $(FLAGS) -c ai.c
-	$(CC) $(FLAGS) -c screens.c
-	$(CC) $(FLAGS) $(LINK) -o xroads xroads.c chardata.o tiledata.o fileops.o ai.o screens.o
+	$(CC) $(CFLAGS) $(INCLUDE) -DDATADIR=\"$(DATADIR)\" -c chardata.c
+	$(CC) $(CFLAGS) $(INCLUDE) -DDATADIR=\"$(DATADIR)\" -c tiledata.c
+	$(CC) $(CFLAGS) $(INCLUDE) -DDATADIR=\"$(DATADIR)\" -c fileops.c
+	$(CC) $(CFLAGS) $(INCLUDE) -DDATADIR=\"$(DATADIR)\" -c ai.c
+	$(CC) $(CFLAGS) $(INCLUDE) -DDATADIR=\"$(DATADIR)\" -c screens.c
+	$(CC) $(CFLAGS) $(INCLUDE) -DDATADIR=\"$(DATADIR)\" $(LIBS) -o xroads xroads.c chardata.o tiledata.o fileops.o ai.o screens.o
 
 ## "quick" just recompiles xroads.c and links it with the existing .o's
 ## do NOT use this unless you've been altering my code :P