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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
diff -Naurd slashem-0.0.6E4F8-old/sys/unix/Makefile.src slashem-0.0.6E4F8/sys/unix/Makefile.src
--- slashem-0.0.6E4F8-old/sys/unix/Makefile.src 2002-04-01 01:06:31.000000000 +0300
+++ slashem-0.0.6E4F8/sys/unix/Makefile.src 2003-07-28 20:06:27.000000000 +0300
@@ -134,25 +134,35 @@
#LD = gcc
#LFLAGS = -Xlinker -soname=_APP_
+# flags for debugging:
+# CFLAGS = -g -I../include
+
+CFLAGS = -O -I../include
+LFLAGS =
+
+TTY_SUPPORT=y
+#X11_SUPPORT=y
+#QT_SUPPORT=y
+#GNOME_SUPPORT=y
+#GTK_SUPPORT=y
+
# Only used for the Gnome interface.
# When including the Gnome interface, you need to include gnome specific
# directories. The ones given below is the usual spot for linux systems.
# The paths are for glibconfig.h and gnomesupport.h respectively.
#
+ifdef GNOME_SUPPORT
#GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome
GNOMEINC=`gnome-config gnome --cflags` -I../win/gnome
+endif # GNOME_SUPPORT
-# flags for debugging:
-# CFLAGS = -g -I../include
-
-CFLAGS = -O -I../include
-LFLAGS =
+ifdef QT_SUPPORT
# QT windowing system
# SuSE 6.1
-# QTDIR=/usr/lib/qt
+# QTDIR = /usr/qt/2
# RedHat 6.1
-# QTDIR=/usr/lib/qt-2.0.1
+# QTDIR = /usr/lib/qt-2.0.1
#
QTLIBDIR=$(QTDIR)/lib
QTINCDIR=$(QTDIR)/include
@@ -174,18 +184,25 @@
CXX=g++
#LD=g++
+endif # QT_SUPPORT
+
+ifdef GTK_SUPPORT
# GTK windowing system
WINGTKCONFIG=gtk-config
WINGTKCFLAGS=`$(WINGTKCONFIG) --cflags`
+endif #GTK_SUPPORT
# Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired
# combination of windowing systems. Also set windowing systems in config.h.
#
# files for a straight tty port using no native windowing system
+ifdef TTY_SUPPORT
WINTTYSRC = ../win/tty/getline.c ../win/tty/termcap.c ../win/tty/topl.c \
../win/tty/wintty.c
WINTTYOBJ = getline.o termcap.o topl.o wintty.o
-#
+endif # TTY_SUPPORT
+
+ifdef X11_SUPPORT
# files for an X11 port
# (tile.c is included in the defn. for WINCSRC, below)
WINX11SRC = ../win/X11/Window.c ../win/X11/dialogs.c ../win/X11/winX.c \
@@ -194,23 +211,32 @@
../win/X11/winval.c
WINX11OBJ = Window.o dialogs.o winX.o winmap.o winmenu.o winmesg.o \
winmisc.o winstat.o wintext.o winval.o nhwin.a
+endif # X11_SUPPORT
+
+ifdef QT_SUPPORT
#
# Files for a Qt port
#
WINQTSRC = ../win/Qt/qt_win.cpp ../win/Qt/qt_clust.cpp
WINQTOBJ = qt_win.o qt_clust.o nhwin.a
+endif # QT_SUPPORT
+
#
# files for a GTK port
#
+ifdef GTK_SUPPORT
WINGTKSRC = ../win/gtk/gtk.c ../win/gtk/gtkgetlin.c ../win/gtk/gtkstatus.c \
../win/gtk/gtkmenu.c ../win/gtk/gtkyn.c ../win/gtk/gtkextcmd.c \
../win/gtk/gtkmap.c ../win/gtk/gtkmessage.c ../win/gtk/gtkmisc.c \
../win/gtk/xshmmap.c ../win/gtk/xshm.c
WINGTKOBJ = gtk.o gtkgetlin.o gtkstatus.o gtkmenu.o gtkyn.o gtkextcmd.o \
gtkmap.o gtkmessage.o gtkmisc.o xshmmap.o xshm.o nhwin.a
+endif # GTK_SUPPORT
+
#
# Files for a Gnome port
#
+ifdef GNOME_SUPPORT
WINGNOMESRC = ../win/gnome/gnaskstr.c ../win/gnome/gnbind.c \
../win/gnome/gnglyph.c ../win/gnome/gnmain.c ../win/gnome/gnmap.c \
../win/gnome/gnmenu.c ../win/gnome/gnmesg.c ../win/gnome/gnopts.c \
@@ -219,6 +245,8 @@
WINGNOMEOBJ = gnaskstr.o gnbind.o gnglyph.o gnmain.o gnmap.o gnmenu.o \
gnmesg.o gnopts.o gnplayer.o gnsignal.o gnstatus.o gntext.o \
gnyesno.o nhwin.a
+endif # GNOME_SUPPORT
+
#
# Files for a Gem port
WINGEMSRC = ../win/gem/wingem.c ../win/gem/wingem1.c ../win/gem/load_img.c
@@ -235,8 +263,8 @@
WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)
# Use these declarations if you want to support the X11 windowing system
-# WINSRC = $(WINTTYSRC) $(WINX11SRC)
-# WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
+# WINSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGTKSRC) $(WINQTSRC) $(WINGNOMESRC)
+# WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) $(WINGTKOBJ) $(WINQTOBJ) $(WINGNOMEOBJ)
# Use these declarations if you want to support the Qt windowing system
# WINSRC = $(WINTTYSRC) $(WINQTSRC)
# WINOBJ = $(WINTTYOBJ) $(WINQTOBJ)
@@ -255,32 +283,42 @@
# Linux uses -ltermcap or -lncurses
# Be uses -ltermcap
#
+ifdef TTY_SUPPORT
# libraries for tty ports
# WINTTYLIB = -ltermcap
# WINTTYLIB = -lcurses
# WINTTYLIB = -lcurses16
# WINTTYLIB = -lncurses
WINTTYLIB = -ltermlib
-#
+endif # TTY_SUPPORT
+
+ifdef X11_SUPPORT
# libraries for X11
# If USE_XPM is defined in config.h, you will also need -lXpm here.
WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
# WINX11LIB = -lXaw -lXmu -lXt -lX11
# WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
# WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
-#
+endif # X11_SUPPORT
+
+ifdef QT_SUPPORT
# libraries for Qt
WINQTLIB = -L$(QTLIBDIR) -lqt
#
# libraries for KDE (with Qt)
WINKDELIB = -lkdecore -lkdeui -lXext
-#
+endif # QT_SUPPORT
+
+ifdef GTK_SUPPORT
# libraries for GTK
WINGTKLIB = `$(WINGTKCONFIG) --libs`
-#
+endif #GTK_SUPPORT
+
+ifdef GNOME_SUPPORT
# libraries for Gnome
WINGNOMELIB = -lgnomeui -lgnome -lart_lgpl -lgtk -lgdk -lpopt
-#
+endif # GNOME_SUPPORT
+
# libraries for Gem port
WINGEMLIB = -le_gem -lgem
#
@@ -290,7 +328,7 @@
# Use this declaration if you only want to support the TTY windowing system
WINLIB = $(WINTTYLIB)
# Use this declaration if you want to support the X11 windowing system
-# WINLIB = $(WINTTYLIB) $(WINX11LIB)
+# WINLIB = $(WINTTYLIB) $(WINX11LIB) $(WINGTKLIB) $(WINQTLIB) $(WINGNOMELIB)
# Use this declaration if you want to support the Qt windowing system
# WINLIB = $(WINTTYLIB) $(WINQTLIB)
# Use these declarations if you want to support the GTK windowing system
diff -Naurd slashem-0.0.6E4F8-old/sys/unix/Makefile.top slashem-0.0.6E4F8/sys/unix/Makefile.top
--- slashem-0.0.6E4F8-old/sys/unix/Makefile.top 2002-04-01 01:06:10.000000000 +0300
+++ slashem-0.0.6E4F8/sys/unix/Makefile.top 2003-07-28 20:06:39.000000000 +0300
@@ -72,6 +72,14 @@
# KDEDIR = /opt/kde
# SHELLDIR = $(KDEDIR)/bin
+#SMALLTILES=x11tiles
+#BIGTILES=x11bigtiles
+#BIG3DTILES=x11big3dtiles
+#PETMARK=pet_mark.xbm
+#RIP=rip.xpm
+#GTKFILES=credit.xpm gtkrc
+#MAPBG=mapbg.xpm
+
# Shareable (architecture independent) data files which are not candidates
# for inclusion in DLB libraries (ND) and which are (D). Port specific files
# per discussions in Install.X11, Install.Qt and Install.GTK
@@ -89,7 +97,7 @@
# CNF_SHARE_DATND = $(CNF_SHARE_X11ND)
# CNF_SHARE_DATND = $(CNF_SHARE_QTND)
# CNF_SHARE_DATND = $(CNF_SHARE_GTKND)
-CNF_SHARE_DATND =
+CNF_SHARE_DATND = $(SMALLTILES) $(BIGTILES) $(BIG3DTILES) $(PETMARK) $(RIP) $(GTKFILES) $(MAPBG)
CNF_SHARE_DATD = data oracles options quest.dat rumors
CNF_SHARE_DAT = $(CNF_SHARE_DATD) $(CNF_SHARE_DATND)
@@ -239,7 +247,7 @@
-e '$$s/.*/nodlb/p' < dat/options` ; \
$(MAKE) dofiles-$${target-nodlb}
cp src/$(GAME) $(FILE_AREA_UNSHARE)
- cp license doc/Guidebook.txt $(FILE_AREA_DOC)
+# cp license doc/Guidebook.txt $(FILE_AREA_DOC)
# cp win/Qt/KDE/kslashem.kdelnk $(KDEDIR)/share/applnk/Games
-rm -f $(SHELLDIR)/$(GAME)
sed -e 's;/usr/games/lib/nethackdir;$(FILE_AREA_UNSHARE);' \
|