aboutsummaryrefslogtreecommitdiffstats
path: root/games/tome/files/patch-aa
blob: 94f213dcb483df1144ee8942240d63ef4a33ba09 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
--- makefile.std.orig   Sun Nov 24 15:42:24 2002
+++ makefile.std    Thu Jan 16 18:04:47 2003
@@ -81,18 +81,19 @@
 # Sysadmins of commercial Unix and/or BSD might prefer this
 #LIBDIR = /usr/local/lib/tome/
 # If you like the old default, use this one
-LIBDIR = ./lib/
+LIBDIR = $(PREFIX)/share/tome/
 # Another example: single user installation using absolute path
 #LIBDIR = /home/myloginname/lib/tome/
 
 
 # Where ToME binary goes
-BINDIR = /usr/local/games
+BINDIR = $(PREFIX)/bin
 # Another common location
 #BINDIR = /usr/local/bin
 
 # The game will run suid to this user
-OWNER = games
+OWNER = root
+GROUP = games
 
 # Ignore this if you're not making a package
 DESTDIR=
@@ -122,7 +123,7 @@
 #
 # This is my compiler of choice, it seems to work most everywhere
 #
-CC = gcc
+CC ?= cc
 
 #
 # Standard version (see main-x11.c and main-gcu.c)
@@ -148,12 +149,12 @@
 # including "USE_GETCH" and "USE_CURS_SET".  Note that "config.h" will
 # attempt to "guess" at many of these flags based on your system.
 #
-COPTS = -Wall -O1 -pipe -g
-INCLUDES = -I/usr/X11R6/include
+COPTS = -Wall -g
+INCLUDES = -I$(X11BASE)/include
 DEFINES = -DUSE_X11 -DUSE_GCU \
    -DUSE_EGO_GRAPHICS -DUSE_TRANSPARENCY -DSUPPORT_GAMMA \
         -DUSE_PRECISE_CMOVIE -DUSE_UNIXSOCK
-LIBS = -lX11 -lcurses -L/usr/X11R6/lib
+LIBS = -lX11 -lcurses -L$(X11BASE)/lib
 
 
 ##
@@ -369,7 +370,7 @@
 # Compiler options
 #
 
-CFLAGS = $(COPTS) $(INCLUDES) $(DEFINES) -DDEFAULT_PATH=\"$(LIBDIR)\"
+CFLAGS += $(COPTS) $(INCLUDES) $(DEFINES) -DDEFAULT_PATH=\"$(LIBDIR)\"
 
 
 #
@@ -443,10 +444,12 @@
    [ -d $(DESTDIR)$(LIBDIR) ] || mkdir -p $(DESTDIR)$(LIBDIR)
    [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
    cp -r ../lib/* $(DESTDIR)$(LIBDIR)
-   chown -R $(OWNER) $(DESTDIR)$(LIBDIR)
-   cp -f $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
-   chown $(OWNER) $(DESTDIR)$(BINDIR)/$(TARGET)
-   chmod 4755 $(DESTDIR)$(BINDIR)/$(TARGET)
+   chown -R $(OWNER):$(GROUP) $(LIBDIR)
+   chmod -R g+w $(LIBDIR)
+   cp -f $(TARGET) $(BINDIR)/$(TARGET)
+   strip $(BINDIR)/$(TARGET)
+   chown $(OWNER):$(GROUP) $(BINDIR)/$(TARGET)
+   chmod 2755 $(BINDIR)/$(TARGET)
 
 # old-install: $(TARGET)
 #  cp $(TARGET) ..