File: Imakefile

package info (click to toggle)
xpaint 2.7.6-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,532 kB
  • ctags: 3,405
  • sloc: ansic: 36,749; makefile: 49; sh: 18
file content (337 lines) | stat: -rw-r--r-- 12,022 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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
#
# Imakefile for xpaint 2.7.4
#
# $Id: Imakefile,v 1.21 2005/03/20 20:15:32 demailly Exp $

#include "./.version"

#include "./Local.config"
#include "./Local.xawdefs"

DEFINES = $(ARCH_DEFINES) $(EXTRA_DEFINES) $(XAWLIB_DEFINES) $(XPM_INCLUDE) \
          "-DEDITOR=\"$(EDITOR)\"" \
          "-DSHAREDIR=\"$(SHAREDIR)\"" \
          "-DXAPPLOADDIR=\"$(XAPPLOADDIR)\"" \
	  "-DXPAINT_VERSION=\"$(VERSION)\"" \

#ifdef LPCCMD
DEFINES += "-DLPCCMD=\"$(LPCCMD)\""
#endif

#ifdef PRINTCAP
DEFINES += "-DPRINTCAP=\"$(PRINTCAP)\""
#endif

#########################
# Nothing to change below here

XPSRC = chroma.c color.c colorEdit.c dialog.c fatBitsEdit.c \
	fileName.c fontSelect.c grab.c graphic.c hash.c help.c \
	image.c imageComp.c iprocess.c main.c menu.c misc.c \
	operation.c palette.c pattern.c print.c protocol.c readRC.c size.c \
	snapshot.c text.c texture.c typeConvert.c 

XPOBJ = chroma.o color.o colorEdit.o dialog.o fatBitsEdit.o \
	fileName.o fontSelect.o grab.o graphic.o hash.o help.o \
	image.o imageComp.o iprocess.o main.o menu.o misc.o \
	operation.o palette.o pattern.o print.o protocol.o readRC.o size.o \
	snapshot.o text.o texture.o typeConvert.o

OPSRC = arcOp.c blobOp.c boxOp.c brushOp.c circleOp.c fillOp.c \
	fontOp.c lineOp.c pencilOp.c polyOp.c splineOp.c selectOp.c \
	sprayOp.c dynPenOp.c

OPOBJ = arcOp.o blobOp.o boxOp.o brushOp.o circleOp.o fillOp.o \
	fontOp.o lineOp.o pencilOp.o polyOp.o splineOp.o selectOp.o \
	sprayOp.o dynPenOp.o

XPWIDSRC = Colormap.c Paint.c PaintEvent.c PaintRegion.c PaintUndo.c
XPWIDOBJ = Colormap.o Paint.o PaintEvent.o PaintRegion.o PaintUndo.o

RWSRC =	rw/libpnmrw.c rw/readGIF.c rw/readJPEG.c rw/readTIFF.c \
	rw/readWritePNM.c rw/readWriteSGI.c rw/readWriteXBM.c \
	rw/readWriteXPM.c rw/readWriteXWD.c rw/rwTable.c \
	rw/writeGIF.c rw/writeJPEG.c rw/writePS.c rw/writeTIFF.c \
	rw/libpnmrw.h rw/rwTable.h 
RWOBJ =	rw/libpnmrw.o rw/readGIF.o rw/readJPEG.o rw/readTIFF.o \
	rw/readWritePNM.o rw/readWriteSGI.o rw/readWriteXBM.o \
	rw/readWriteXPM.o rw/readWriteXWD.o rw/rwTable.o \
	rw/writeGIF.o rw/writePS.o rw/writeTIFF.o 

SRCS = $(XPSRC) $(OPSRC) $(XPWIDSRC)
OBJS = $(XPOBJ) $(OPOBJ) $(XPWIDOBJ)

HDRS =	Colormap.h ColormapP.h hash.h Paint.h \
	PaintP.h palette.h xpaint.h menu.h \
	text.h region.h image.h patchlevel.h \
	misc.h rc.h ops.h color.h graphic.h operation.h protocol.h 

OPBDIR = bitmaps/tools
OPBITMAPS = $(OPBDIR)/clineOp.xpm $(OPBDIR)/lassoOp.xpm $(OPBDIR)/rayOp.xpm \
	$(OPBDIR)/selpolyOp.xpm $(OPBDIR)/selectOp.xpm $(OPBDIR)/arcOp.xpm \
	$(OPBDIR)/boxOp.xpm $(OPBDIR)/brushOp.xpm \
	$(OPBDIR)/dotPenOp.xpm $(OPBDIR)/eraseOp.xpm $(OPBDIR)/fboxOp.xpm \
	$(OPBDIR)/ffreehandOp.xpm $(OPBDIR)/fillOp.xpm $(OPBDIR)/fovalOp.xpm \
	$(OPBDIR)/fpolyOp.xpm $(OPBDIR)/freehandOp.xpm $(OPBDIR)/lineOp.xpm \
	$(OPBDIR)/ovalOp.xpm $(OPBDIR)/pencilOp.xpm $(OPBDIR)/polyOp.xpm \
	$(OPBDIR)/smearOp.xpm $(OPBDIR)/sprayOp.xpm $(OPBDIR)/textOp.xpm \
	$(OPBDIR)/tfillOp.xpm $(OPBDIR)/dynPenOp.xpm

BRBDIR = bitmaps/brushes
BRUSHBITMAPS = $(BRBDIR)/paintA.xpm \
	$(BRBDIR)/paintB.xpm $(BRBDIR)/paintC.xpm $(BRBDIR)/paintD.xpm \
	$(BRBDIR)/paintE.xpm $(BRBDIR)/paintF.xpm $(BRBDIR)/paintG.xpm \
	$(BRBDIR)/paintH.xpm $(BRBDIR)/paintI.xpm $(BRBDIR)/paintJ.xpm \
	$(BRBDIR)/paintK.xpm $(BRBDIR)/paintL.xpm $(BRBDIR)/paintM.xpm \
	$(BRBDIR)/paintN.xpm $(BRBDIR)/paintO.xpm $(BRBDIR)/paintP.xpm \
	$(BRBDIR)/paintQ.xpm $(BRBDIR)/paintR.xpm $(BRBDIR)/paintS.xpm \
	$(BRBDIR)/paintT.xpm

XBMDIR = bitmaps/xbm

XAWDEPENDS = \
	brushOp.o chroma.o fileName.o fontSelect.o graphic.o help.o \
	iprocess.o main.o menu.o misc.o operation.o pattern.o print.o size.o

#ifdef SGIArchitecture
SGI_LIB = -limage
#endif

DEPLIBS = always xpaint.man XPaint.ad
LOCAL_LIBRARIES = -Lrw -lrw $(XPM_LIB) $(TIFF_LIB) $(SGI_LIB) $(JPEG_LIB) $(PNG_LIB) -ldl -rdynamic

SUBDIRS = rw

ComplexProgramTarget(xpaint)
# InstallAppDefaults(XPaint)

NamedMakeSubdirs(always, $(SUBDIRS))
MakefileSubdirs($(SUBDIRS) bitmaps Doc)
CleanSubdirs($(SUBDIRS))

# Other targets...

start::
	@if ! [ -d xaw_incdir ] ; then \
	echo "Type one of :" ; \
	echo "  'make xaw'" ; \
	echo "  'make xaw3d'" ; \
	echo "  'make xaw3dg'" ; \
	echo "  'make xaw95'" ; \
	echo "In the 3 latter cases, you should have libXaw3d or libXaw95 installed" ; \
	echo "" ; \
	echo "Defaulting to plain Xaw widgets" ; \
	echo "" ; \
	sleep 3 ; \
	ln -sf /usr/include/X11/Xaw xaw_incdir ; \
	echo "XAWLIB_DEFINES = -DXAWPLAIN" > Local.xawdefs ; \
	echo "SYS_LIBRARIES = XawClientLibs -lm" >> Local.xawdefs ; \
	xmkmf -a ; make ; \
	fi

install::
	mkdir -p $(DESTDIR)$(SHAREDIR)/include
	cp -f *.h $(DESTDIR)$(SHAREDIR)/include
	cp -f XPaintIcon.xpm $(DESTDIR)$(SHAREDIR)
	mkdir -p $(DESTDIR)$(SHAREDIR)/c_scripts
	cp -r share/c_scripts $(DESTDIR)$(SHAREDIR)
	./substads -single share/include/Xpaint.h \
		$(DESTDIR)$(SHAREDIR)/include/Xpaint.h \
		"XPAINT_SHAREDIR" $(SHAREDIR)
	cp -f share/include/Xpaint3d.h $(DESTDIR)$(SHAREDIR)/include
	cd app-defaults/out ; cp -f * $(DESTDIR)$(XAPPLOADDIR)
	mkdir -p $(DESTDIR)$(SHAREDIR)/help
	cd share/help ; rm -f *~ ; cp -f Help* $(DESTDIR)$(SHAREDIR)/help
	mkdir -p $(DESTDIR)$(SHAREDIR)/messages
	cd share/messages ; rm -f *~ ; cp -f Messages* $(DESTDIR)$(SHAREDIR)/messages
	chmod -R a+r $(DESTDIR)$(SHAREDIR)/

xaw::
	-$(RM) $(XAWDEPENDS)
	-$(RM) xaw_incdir ; ln -sf /usr/include/X11/Xaw xaw_incdir
	echo "XAWLIB_DEFINES = -DXAWPLAIN" > Local.xawdefs			
	echo "SYS_LIBRARIES = XawClientLibs -lm" >> Local.xawdefs
	xmkmf -a ; make
	@echo ""
	@echo "'xpaint' compiled with Xaw widgets (old and ugly)"
	@echo "You should rather use Xaw3d, neXtaw or Xaw95 !!"	
	@echo "Type 'make xaw3d(g)' or 'make nextaw' or 'make xaw95'"
	@echo ""	

xaw3d::
	-$(RM) $(XAWDEPENDS)
	-$(RM) xaw_incdir ; ln -sf /usr/include/X11/Xaw3d xaw_incdir	
	echo "XAWLIB_DEFINES = -DXAW3D" > Local.xawdefs
	echo "SYS_LIBRARIES = -lXaw3d -L." >> Local.xawdefs
	xmkmf ; cd rw ; xmkmf ; cd .. ; make
	@echo ""	
	@echo "'xpaint' compiled with Xaw3d widgets"
	@echo "Variants are 'make xaw3dg' and 'make nextaw' and 'make xaw95'"
	@echo ""	
	
xaw3dg::
	-$(RM) $(XAWDEPENDS)
	-$(RM) xaw_incdir ; ln -sf /usr/include/X11/Xaw3d xaw_incdir	
	echo "XAWLIB_DEFINES = -DXAW3D -DXAW3DG" > Local.xawdefs
	echo "SYS_LIBRARIES = -lXaw3d -L." >> Local.xawdefs
	xmkmf ; cd rw ; xmkmf ; cd .. ; make
	@echo ""	
	@echo "'xpaint' compiled with Xaw3d(g) widgets"
	@echo "Variants are 'make xaw3d', 'make nextaw' and 'make xaw95'"
	@echo ""	

nextaw::
	-$(RM) $(XAWDEPENDS)
	-$(RM) xaw_incdir ; ln -sf /usr/include/X11/neXtaw xaw_incdir	
	echo "XAWLIB_DEFINES = -DXAW3D" > Local.xawdefs
	echo "SYS_LIBRARIES = -lneXtaw -L." >> Local.xawdefs
	xmkmf ; cd rw ; xmkmf ; cd .. ; make
	@echo ""	
	@echo "'xpaint' compiled with neXtaw widgets"
	@echo "Variants are 'make xaw3d' and 'make xaw95'"
	@echo ""	

xaw95::
	-$(RM) $(XAWDEPENDS)
	-$(RM) xaw_incdir ; ln -sf /usr/include/X11/Xaw95 xaw_incdir	
	echo "XAWLIB_DEFINES = -DXAW95" > Local.xawdefs
	echo "SYS_LIBRARIES = -lXaw95 -L." >> Local.xawdefs
	xmkmf -a ; make
	@echo ""	
	@echo "'xpaint' compiled with Xaw95 widgets"
	@echo "Another alternative is to use the Xaw3d widgets :"	
	@echo "Type 'make xaw3d' or 'make xaw3dg'"
	@echo ""	
	
clean::
	-$(RM) preproc substads XPaint.ad XPaint.ad.h DefaultRC.txt.h PGP.*
	$(RM) -rf share/out xaw_incdir
	cd share/help ; $(RM) *~
	cd share/messages ; $(RM) *~
	cd app-defaults ; $(RM) core *~ substads
	cd app-defaults/out ; $(RM) -f Xpaint*

includes:: XPaint.ad.h DefaultRC.txt.h messages.h
	cd bitmaps; $(RM) tools; \
	if test "$(TOOLFLAGS)" != "" ; \
	then ln -s big_tools tools ; else ln -s small_tools tools ; fi

XPaint.ad: app-defaults
	$(CC) substads.c -o substads
	cd app-defaults ; \
	../substads -appdefs \
	            XPAINT_VERSION $(VERSION) \
		    XPAINT_SHAREDIR $(SHAREDIR) \
		    XPAINT_PRINT_COMMAND "$(PRINT_COMMAND)" \
		    XPAINT_POSTSCRIPT_VIEWER "$(POSTSCRIPT_VIEWER)" \
		    XPAINT_EXTERN_VIEWER "$(EXTERN_VIEWER)"
	cp -p app-defaults/out/XPaint XPaint.ad

XPaint.ad.h:	XPaint.ad
	./substads -ad2c $? $@
messages.h:	preproc.c share/messages/Messages
	$(CC) preproc.c -o preproc
	./preproc > messages.h
DefaultRC.txt.h: DefaultRC
	./substads -ad2c $? $@
xpaint.man:	xpaint.man.in .version
	./substads -single xpaint.man.in xpaint.man XPAINT_VERSION $(VERSION) 

Colormap.o: ColormapP.h Colormap.h
Paint.o: PaintP.h Paint.h xpaint.h misc.h
PaintEvent.o: PaintP.h Paint.h xpaint.h
PaintRegion.o: PaintP.h Paint.h protocol.h
PaintUndo.o: xpaint.h misc.h PaintP.h Paint.h
blobOp.o: xpaint.h misc.h Paint.h ops.h
boxOp.o: xpaint.h misc.h Paint.h ops.h
brushOp.o: xpaint.h misc.h Paint.h palette.h \
	graphic.h protocol.h ops.h $(BRUSHBITMAPS)
circleOp.o: xpaint.h misc.h Paint.h ops.h
chroma.o: start xpaint.h Paint.h palette.h protocol.h color.h messages.h \
	 misc.h operation.h ops.h
color.o: messages.h palette.h protocol.h color.h xpaint.h misc.h image.h
colorEdit.o: misc.h palette.h color.h protocol.h
dialog.o: misc.h xpaint.h protocol.h
fatBitsEdit.o: Paint.h xpaint.h messages.h palette.h menu.h misc.h region.h \
	protocol.h graphic.h
fileName.o: Paint.h messages.h misc.h image.h rw/rwTable.h graphic.h \
	protocol.h 
fontSelect.o: xpaint.h messages.h misc.h operation.h ops.h graphic.h protocol.h
grab.o: image.h
graphic.o: xpaint.h palette.h messages.h misc.h menu.h text.h graphic.h \
	image.h region.h operation.h rc.h protocol.h color.h rw/rwTable.h
hash.o: misc.h hash.h
help.o: Paint.h misc.h protocol.h
image.o: image.h hash.h palette.h misc.h protocol.h
imageComp.o: image.h hash.h protocol.h misc.h
iprocess.o: xpaint.h image.h misc.h protocol.h
lineOp.o: xpaint.h misc.h Paint.h ops.h
main.o: XPaint.ad.h messages.h misc.h graphic.h protocol.h \
	rw/rwTable.h XPaintIcon.xpm .version
menu.o: menu.h $(XBMDIR)/checkmark.xbm $(XBMDIR)/pullright.xbm
misc.o: $(XBMDIR)/background.xbm xpaint.h misc.h messages.h
operation.o: $(OPBITMAPS) Local.config operation.c ops.h xpaint.h misc.h \
	menu.h Paint.h text.h graphic.h image.h operation.h protocol.h \
	region.h messages.h
	$(CC) -c -I./$(OPBDIR) $(CFLAGS) $*.c
palette.o: messages.h palette.h hash.h misc.h image.h xpaint.h
pattern.o: Colormap.h Paint.h palette.h xpaint.h menu.h misc.h image.h \
	region.h text.h graphic.h operation.h color.h protocol.h messages.h
pencilOp.o: xpaint.h Paint.h misc.h ops.h
print.o: xpaint.h menu.h image.h messages.h misc.h region.h text.h \
	graphic.h operation.h color.h protocol.h
protocol.o: xpaint.h messages.h misc.h protocol.h \
	$(XBMDIR)/wait1.xbm $(XBMDIR)/wait2.xbm \
	$(XBMDIR)/wait3.xbm $(XBMDIR)/wait4.xbm
readRC.o: image.h rc.h misc.h DefaultRC.txt.h
size.o: Paint.h messages.h misc.h text.h
snapshot.o: Paint.h image.h messages.h
text.o: misc.h protocol.h text.h
typeConvert.o: palette.h misc.h
fontOp.o: xpaint.h Paint.h graphic.h misc.h ops.h
arcOp.o: xpaint.h Paint.h misc.h ops.h
polyOp.o: xpaint.h misc.h Paint.h ops.h
fillOp.o: Paint.h protocol.h xpaint.h ops.h image.h misc.h palette.h
selectOp.o: xpaint.h Paint.h protocol.h palette.h color.h misc.h \
	operation.h ops.h
sprayOp.o: xpaint.h Paint.h misc.h ops.h 

TEXT =	README README.old README.PNG INSTALL DefaultRC ChangeLog \
	xpaint.man.in TODO .version Imakefile Local.config 
MISC = XPaintIcon.xpm Filelist preproc.c substads.c 

makelist:: 
	-$(RM) Filelist
	@touch Filelist

makelist:: 
	sh -c 'for i in '"$(TEXT) $(SRCS) $(MISC) $(LANGFILES) $(HDRS)"' ; \
	do echo $(CURRENT_DIR)/$$i >> $(TOP)/Filelist ; done '
	share/bin/make_list 

NamedTargetSubdirs(makelist, $(SUBDIRS) bitmaps Doc, , , makelist)


kit: makelist
	sh -c 'sum="`cat Filelist`" ; makekit -oMANIFEST MANIFEST $$sum'

targz: makelist
	make realclean 
	cd .. ; tar cvfz xpaint-$(VERSION).tar.gz xpaint-$(VERSION)

tarbz2: makelist
	make realclean ;
	cd .. ; tar cvfj xpaint-$(VERSION).tar.bz2 xpaint-$(VERSION)

TAGS:	$(SRCS) $(HDRS) $(RWSRC)
	etags -t -o ./TAGS $(XPSRC) $(OPSRC) $(XPWIDSRC) $(RWSRC) $(HDRS)

realclean: clean
	-$(RM) messages.h \
	Makefile* */Makefile* xpaint.man

certification:	makelist
	-$(RM) $(CERTIFICATION)	
	certify `cat Filelist`