File: Imakefile

package info (click to toggle)
xabacus 7.1.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,084 kB
  • ctags: 914
  • sloc: ansic: 10,242; sh: 2,725; makefile: 540
file content (238 lines) | stat: -rw-r--r-- 6,971 bytes parent folder | download
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#ifndef XCOMM
#define XCOMM /**/#
#endif
XCOMM X-BASED ABACUS
XCOMM
XCOMM	Imakefile
XCOMM
XCOMM ##
XCOMM
XCOMM Copyright (c) 1994 - 2005	David Albert Bagley, bagleyd@tux.org
XCOMM
XCOMM			All Rights Reserved
XCOMM
XCOMM Permission to use, copy, modify, and distribute this software and
XCOMM its documentation for any purpose and without fee is hereby granted,
XCOMM provided that the above copyright notice appear in all copies and
XCOMM that both that copyright notice and this permission notice appear in
XCOMM supporting documentation, and that the name of the author not be
XCOMM used in advertising or publicity pertaining to distribution of the
XCOMM software without specific, written prior permission.
XCOMM
XCOMM This program is distributed in the hope that it will be "playable",
XCOMM but WITHOUT ANY WARRANTY; without even the implied warranty of
XCOMM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
XCOMM

wIDGET = abacus
WIDGET = Abacus
NUMVER = 7.1
XCOMM VER = x$(WIDGET)-$(NUMVER)

#ifndef __QNX__
#ifndef MathLibrary
#define MathLibrary -lm
#endif
#else
#define MathLibrary
#endif

N=
C=.c
XCOMM C++
XCOMM C=.cc
O=.o
XCOMM VMS
XCOMM O=.obj
S=$(N) $(N)
XCOMM VMS
XCOMM S=,
E=
XCOMM VMS
XCOMM E=.exe

XCOMM please define
XCOMM C as the C source code extension
XCOMM O as the object extension
XCOMM S as the separator for object code
XCOMM E as the executable extension

XCOMM CC = cc
XCOMM CC = acc
XCOMM CC = gcc -Wall
XCOMM CC = g++ -Wall

XCOMM   *** BEGIN XPM CONFIG SECTION ***

XCOMM If your system has libXpm (Xpm), remove the 'XCOMM ' from the next line.
XCOMM #define XpmLibrary

#ifdef XpmLibrary
XPMDEF = -DHAVE_XPM
XCOMM Use the following if your xpm.h file is not in an X11 directory
XCOMM  XPMDEF = -DHAVE_XPM

XCOMM If you get an error "Cannot find xpm.h" while compiling, set
XCOMM XPMINC to the directory X11/xpm.h is in.  Below is a guess
XCOMM of the location of the Motif library directory.
XPMINC = -I/usr/local/include
XCOMM SGI's ViewKit put in a link so the include is under X11 as well
XCOMM  XPMINC = -I/usr/include/Vk

XCOMM If you get an error "Cannot find libXpm" while linking, set XPMLIBPATH
XCOMM to the directory libXpm.* is in.  Below is a guess of the
XCOMM location of the Motif library directory.
XPMLIB = -L/usr/local/lib -lXpm

#endif

XCOMM   *** END XPM CONFIG SECTION ***

XCOMM   *** BEGIN XM CONFIG SECTION ***

XCOMM If your system has libXm (Motif), remove the 'XCOMM ' from the next line.
XCOMM #define XmLibrary

#ifdef XmLibrary
XCOMM If its not with your X11 stuff you should set the following
XCOMM       MOTIFHOME = /usr/local
XCOMM       MOTIFHOME = /usr/dt

XCOMM If you get an error "Cannot find Xm/PanedW.h" while compiling, set
XCOMM XMINC to the directory Xm/PanedW.h is in.  Below is a guess
XCOMM of the location of the Motif include directory.
XCOMM       XMINC = -I$(MOTIFHOME)/include
XMDEF = -DHAVE_MOTIF

XCOMM If you get an error "Connot find libXm" while linking, set XMLIBPATH
XCOMM to the directory libXpm.* is in.  Below is a guess of the
XCOMM location of the Motif library directory.
XCOMM           XMLIB = -L$(MOTIFHOME)/lib -lXm
XMLIB = -lXm

XCOMM Debugging with editres
XCOMM  EDITRESDEF = -DUSE_XMU
XCOMM  EDITRESLIB = -lXmu
#endif

XCOMM   *** END XM CONFIG SECTION ***

XCOMM   *** BEGIN SOUND CONFIG SECTION ***

XCOMM Only xlock.c and resource.c use this
XCOMM if your system has these sound libraries, remove the 'XCOMM  '
XCOMM  #define RplayLibrary
XCOMM  #define NasLibrary

#ifdef RplayLibrary
SOUNDDEF = -DUSE_RPLAY
SOUNDINC = -I/usr/local/include
XCOMM SOUNDLIB = -L/share/lib -lrplay
SOUNDLIB = -L/usr/local/lib -lrplay
#endif

#ifdef NasLibrary
SOUNDDEF = -DUSE_NAS
SOUNDINC = -I/usr/X11R6/include
SOUNDLIB = -L/usr/X11R6/lib -laudio
#endif

XCOMM Set sound directory in Abacus.ad

XCOMM system play (optional software)
XCOMM SUNOS 4.1.3
XCOMM  DEF_PLAY = "/usr/demo/SOUND/play"
XCOMM IRIX 5.3
XCOMM  DEF_PLAY = "/usr/sbin/sfplay"
XCOMM Digital Unix with Multimedia Services installed:
XCOMM  DEF_PLAY = "/usr/bin/mme/decsound -play"
XCOMM LINUX and others (see config directory)
XCOMM  DEF_PLAY = "/usr/local/bin/play.sh"
XCOMM Uncomment line below if you have one of the above
XCOMM  SOUNDDEF = -DDEF_PLAY=\"$(DEF_PLAY)\"

XCOMM   *** END SOUND CONFIG SECTION ***

#ifdef SunArchitecture
#if SystemV4
EXTRA_LDOPTIONS = -R/usr/lib:/usr/openwin/lib

XCOMM Solaris may not have its own correct OSMinorVersion
XCOMM compare with uname -a, correct if wrong at /usr/openwin/lib/config/sun.cf
XCOMM If just using gcc, you may want to remove -xF references in sun.cf and
XCOMM Imake.tmpl if you get a
XCOMM cc: language F not recognized

#if OSMajorVersion > 5 || (OSMajorVersion == 5 && OSMinorVersion > 5)
       SLEEPDEF = -DHAVE_USLEEP=1
#else
XCOMM If SunOS 5.2 or less, do not have nanosleep
#if OSMajorVersion > 5 || (OSMajorVersion == 5 && OSMinorVersion > 2)
       SLEEPDEF = -DHAVE_NANOSLEEP=1
EXTRA_LIBRARIES += -lposix4 -lthread
#else
EXTRA_LIBRARIES = -lnsl -lposix4
#endif
#endif
#else
       SLEEPDEF = -DHAVE_USLEEP=1
#endif
#endif
#if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || defined(i386BsdArchitecture)
       SLEEPDEF = -DHAVE_USLEEP=1
#endif
#if defined(LinuxArchitecture) || defined(cygwinArchitecture)
       SLEEPDEF = -DHAVE_USLEEP=1
#endif
XCOMM If AIX 3.1 or less
#if OSMajorVersion < 3 || (OSMajorVersion == 3 && OSMinorVersion < 2)
      SYSTEMDEF = -DLESS_THAN_AIX3_2
#endif

XCOMM Set your C compiler if necessary
XCOMM CC		= gcc -g -DDEBUG -Wall
XCOMM CC		= gcc -O

READPATH = /usr/local/share/games/xabacus
XCOMM READPATH = /usr/share/games/xabacus

DEFINES		= -DHAVE_FCNTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 \
$(XMDEF) $(XPMDEF) $(EDITRESDEF) $(SOUNDDEF) $(SLEEPDEF) \
-DDEOMOPATH=\"$(READPATH)\" \
-DBUMPSOUND=\"$(READPATH)/bump.au\" -DMOVESOUND=\"$(READPATH)/move.au\" \
$(XMINC) $(XPMINC) -DLEE_ABACUS
XWIDGETLIBS = $(XMLIB) $(XTOOLLIB) $(XLIB) $(XPMLIB) $(EDITRESLIB) -lm
# -lICE -lSM

HDRS = $(WIDGET)P.h $(WIDGET).h

COREOBJS = $(WIDGET)$(O)$(S)$(WIDGET)M$(O)$(S)$(WIDGET)D$(O)$(S)$(WIDGET)C$(O)
XWIDGETOBJS = file$(O)$(S)sound$(O)$(S)$(COREOBJS)$(S)x$(wIDGET)$(O)

CORESRCS = $(WIDGET)$(C) $(WIDGET)M$(C) $(WIDGET)D$(C) $(WIDGET)C$(C)
XWIDGETSRCS = file$(C) sound$(C) $(CORESRCS) x$(wIDGET)$(C)

XCOMM ComplexProgramTarget(x$(wIDGET))
AllTarget(x$(wIDGET)$(E) $(WIDGET).ad)
NormalProgramTarget(x$(wIDGET)$(E), $(XWIDGETOBJS), $(DEPXLIB), $(XWIDGETLIBS), NullParameter)

$(WIDGET)$(O) : $(WIDGET)$(C) $(HDRS)
$(WIDGET)M$(O) : $(WIDGET)M$(C) $(HDRS)
$(WIDGET)D$(O) : $(WIDGET)D$(C) $(HDRS)
$(WIDGET)C$(O) : $(WIDGET)C$(C) $(HDRS)
file$(O) : file$(C)
sound$(O) : sound$(C)
x$(wIDGET)$(O) : x$(wIDGET)$(C) $(WIDGET).h

run :
	./x${wIDGET}

distclean::	clean
	$(RM) Makefile config.status config.cache config.log
	rm -rf autom4te.cache
	rm -f $(WIDGET).ad x$(wIDGET)-1.html x$(wIDGET)._man

clean.all::	distclean

$(WIDGET).ad : $(WIDGET).ad.in
	sed s:@READPATH@:$(READPATH):g $(WIDGET).ad.in > $@