File: Makefile

package info (click to toggle)
saods9 3.0.3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 86,868 kB
  • ctags: 82,021
  • sloc: ansic: 663,637; tcl: 111,403; cpp: 52,727; sh: 27,784; makefile: 6,177; asm: 3,355; lex: 2,890; ada: 1,637; pascal: 1,621; xml: 1,221; yacc: 883; f90: 84; perl: 82; python: 33; fortran: 17; ruby: 13; sed: 12; php: 11
file content (415 lines) | stat: -rw-r--r-- 10,972 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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
include make.include

#--------------------------optional packages
# uncomment the following to include in the build

#BUILD_TCLX = yes
ifdef BUILD_TCLX
	TCLX	= tclx
	TCLXSH	= tclxsh
endif

#--------------------------versions

vTCL	= 8.4.6
vTCLX	= 8.3.5

#--------------------------defines

DIRS	= bin lib include man html

# dirs
ifeq ($(ARCH),windows)
  # windows
  TCLDIR= tcl$(vTCL)/win
  TKDIR	= tk$(vTCL)/win
  EXE	= .exe
  WISH	= wish84.exe
  TCLXDIR = tclx$(vTCLX)/win
else
  # unix
  TCLDIR= tcl$(vTCL)/unix
  TKDIR	= tk$(vTCL)/unix
  EXE	=
  WISH	= wish8.4
  TCLXDIR = tclx$(vTCLX)/unix
endif

DS9DIR	= ds9
TCLLIBDIR = tcllib
BLTDIR	= blt2.4z
SAOTKDIR= saotk
MKTCLAPPDIR= mktclapp
HTMLDIR	= html
TKIMGDIR = tkimg1.3rc2
TKMPEGDIR = tkmpeg
ZLIBDIR	= zlib
XPADIR	= xpa
IISDIR	= iis
ASTDIR	= ast
CHECKDNSDIR = checkdns
WINDIR= win
FITSYDIR= saotk/fitsy
FILTERDIR= saotk/filter

SAOINDEX= lib/pkgIndex.tcl
DS9INDEX= ds9/pkgIndex.tcl

# configure flags
root := $(shell pwd)

ifeq ($(ARCH),windows)
  # windows
  TCLFLAGS = --enable-gcc --prefix $(root)
  TCLLIBFLAGS = --prefix ..
  BLTFLAGS = --with-cc=$(CC) --prefix $(root) \
	--with-tcl=$(root)/tcl$(vTCL) --with-tk=$(root)/tk$(vTCL) \
	--with-cflags="-O -DSTATIC_BUILD"
  TKIMGFLAGS = --enable-gcc --prefix $(root) \
	--with-tcl=$(root)/tcl$(vTCL)/win --with-tk=$(root)/tk$(vTCL)/win
  PREHTMLFLAGS = config_BUILD_TCLSH=tclsh84s config_TARGET_TCL_SCRIPT_DIR=$(root)/lib/tcl8.4
  HTMLFLAGS = --enable-gcc --prefix $(root) \
	--with-tcl=$(root)/tcl$(vTCL) --with-tk=$(root)/tk$(vTCL)
  XPAFLAGS = --enable-gcc --prefix $(root) \
	--with-tcl=$(root)/tcl$(vTCL)/win

  TCLXFLAGS = --enable-gcc --prefix $(root) \
	--with-tcl=$(root)/tcl$(vTCL) --with-tk=$(root)/tk$(vTCL)
else
  # unix
  TCLFLAGS = --enable-gcc --prefix $(root) \
	--x-includes=$(X11INCLUDE) --x-libraries=$(X11LIB)
  TCLLIBFLAGS = --prefix $(root)
  BLTFLAGS = --with-cc=$(CC) --with-cflags=$(64BIT) --prefix $(root) \
	--with-tcl=$(root)/tcl$(vTCL) --with-tk=$(root)/tk$(vTCL) \
	--x-includes=$(X11INCLUDE) --x-libraries=$(X11LIB)
  TKIMGFLAGS = --enable-gcc --prefix $(root) \
	--with-tcl=$(root)/tcl$(vTCL)/unix  --with-tk=$(root)/tk$(vTCL)/unix \
	--x-includes=$(X11INCLUDE) --x-libraries=$(X11LIB)
  PREHTMLFLAGS = config_TARGET_TK_SCRIPT_DIR=/usr/lib/tk8.4
  HTMLFLAGS = --enable-gcc --prefix $(root) \
	--x-includes=$(X11INCLUDE) --x-libraries="$(X11LIB) $(HTMLEXTLIB)"
	#--with-tcl=$(root)/tcl$(vTCL) --with-tk=$(root)/tk$(vTCL)
  XPAFLAGS = --enable-gcc --prefix $(root) \
	--with-tcl=/usr/lib/tcl8.4 \
	--x-includes=$(X11INCLUDE) --x-libraries=$(X11LIB)

  TCLXFLAGS = --enable-gcc --prefix $(root) \
	--with-tcl=$(root)/tcl$(vTCL)/unix  --with-tk=$(root)/tk$(vTCL)/unix \
	--x-includes=$(X11INCLUDE) --x-libraries=$(X11LIB)
endif

ZLIBFLAGS = --prefix $(root)
FITSYFLAGS = --enable-gcc
FILTERFLAGS = --enable-gcc

WININCL	= tcl$(vTCL)/generic/tclInt.h \
	tcl$(vTCL)/generic/tclIntDecls.h \
	tk$(vTCL)/generic/tkInt.h \
	tk$(vTCL)/generic/tkPort.h \
	tk$(vTCL)/generic/tkIntDecls.h \
	tk$(vTCL)/generic/tkIntPlatDecls.h \
	tk$(vTCL)/win/tkWin.h \
	tk$(vTCL)/win/tkWinInt.h \
	tk$(vTCL)/win/tkWinPort.h

#--------------------------build

ifeq ($(ARCH),windows)
  # windows
  build : dirs tcl tk tclscripts tcllib blt mktclapp zlib \
	tkimg tkmpeg html xpa iis ast checkdns win fitsy filter saotk ds9
  index : $(DS9INDEX)

  finish : fixit2 xpa iis ast checkdns win fitsy filter saotk ds9

  fixit: FORCE
	cp admin/html/htmltokens.c html/.
	cd html; make; 
  fixit2: FORCE
	cd html; cp libtkhtml.a ../lib/.

else
  # unix
  ifdef BUILD_SHARED
    # shared
      build : dirs mktclapp html \
	xpa tkmpeg iis ast checkdns fitsy filter saotk ds9 \
	$(DoTCLXSH)
      index : $(DS9INDEX) $(SAOINDEX)
  else
    # non-shared
      build : dirs tcl tk tclscripts tcllib tkindex blt mktclapp zlib \
	tkimg tkmpeg html xpa iis ast checkdns fitsy filter saotk ds9 \
	$(DoTCLX)
      index : $(DS9INDEX)
  endif
endif

#--------------------------items

ds9	: FORCE
	@echo "Making DS9..."
	cd $(DS9DIR); $(MAKE)

ds9val	: FORCE
	@echo "Making DS9 Valgrind..."
	cd $(DS9DIR); $(MAKE) ds9val

doc	: FORCE
	@echo "Making Documentation..."
	cd $(DS9DIR); $(MAKE) doc

install	: FORCE
	@echo "Installing DS9..."
	cd $(DS9DIR); $(MAKE) install

$(SAOINDEX): lib/libBLT24.$(SHEXT) lib/libsaotk.$(SHEXT) \
	lib/libtkhtml.$(SHEXT) \
	lib/libtclxpa.$(SHEXT) lib/libiis.$(SHEXT) \
	lib/libast.$(SHEXT) lib/libcheckdns.$(SHEXT) \
	lib/libtkmpeg.$(SHEXT) FORCE
	echo "pkg_mkIndex -verbose lib libBLT24.$(SHEXT) libsaotk.$(SHEXT) libtkhtml.$(SHEXT) libtclxpa.$(SHEXT) libiis.$(SHEXT) libast.$(SHEXT) libcheckdns.$(SHEXT) libtkmpeg.$(SHEXT); exit" | bin/$(WISH)

$(DS9INDEX): ds9/ds9.tcl FORCE
	cd $(DS9DIR); $(MAKE) index

dirs	: FORCE
	@echo "Installing Directories..."
	@for d in $(DIRS); do if [ ! -d $$d ]; then mkdir $$d; fi done

tclsh	: FORCE
	@echo "Installing Tcl shared..."
	cd $(TCLDIR); CC=$(CCc) ./configure $(TCLFLAGS) --enable-shared
	cd $(TCLDIR); $(MAKE) install

tcl	: FORCE
	@echo "Installing Tcl noshared..."
	cd $(TCLDIR); CC=$(CCc) ./configure $(TCLFLAGS) --disable-shared
	cd $(TCLDIR); $(MAKE) install

tksh	: FORCE
	@echo "Installing Tk shared..."
	cd $(TKDIR); CC=$(CCc) ./configure $(TCLFLAGS) --enable-shared
	cd $(TKDIR); $(MAKE) install

tk	: FORCE
	@echo "Installing Tk noshared..."
	cd $(TKDIR); CC=$(CCc) ./configure $(TCLFLAGS) --disable-shared
	cd $(TKDIR); $(MAKE) install

tclscripts : FORCE
	mv -f lib/tk8.4/tkfbox.tcl lib/tk8.4/tkfbox.tcl.sav
	ln -s ../../ds9/tkfbox.tcl lib/tk8.4/tkfbox.tcl
	mv -f lib/tk8.4/xmfbox.tcl lib/tk8.4/xmfbox.tcl.sav
	ln -s ../../ds9/xmfbox.tcl lib/tk8.4/xmfbox.tcl

tcllib	: FORCE
	@echo "Installing TCLLIB..."
	cd $(TCLLIBDIR); ./configure $(TCLLIBFLAGS)
	cd $(TCLLIBDIR); $(MAKE) install

tkindex : FORCE
	@echo "Installing Tk mkIndex..."
	cd lib/tk8.4; echo "pkg_mkIndex . *.tcl" | ../../bin/tclsh8.4	

blt	: FORCE
	@echo "Installing BLT..."
	cd $(BLTDIR); ./configure $(BLTFLAGS)
	cd $(BLTDIR); $(MAKE); $(MAKE) install

mktclapp: FORCE
	@echo "Installing MKTCLAPP..."
	cd $(MKTCLAPPDIR); CC=$(CCc) $(MAKE) mktclapp -e
	cp $(MKTCLAPPDIR)/mktclapp$(EXE) bin/.

zlib	: FORCE
	@echo "Configure zlib..."
	cd $(ZLIBDIR); CC=$(CCc) ./configure $(ZLIBFLAGS) 
	cd $(ZLIBDIR); $(MAKE) install

tkimg	: FORCE
	@echo "Installing TKIMG noshared..."
	cd $(TKIMGDIR); CC=$(CCc) ./configure $(TKIMGFLAGS) --disable-shared
	cd $(TKIMGDIR); $(MAKE) install

tkimgsh	: FORCE
	@echo "Installing TKIMG shared..."
	cd $(TKIMGDIR); CC=$(CCc) ./configure $(TKIMGFLAGS)
	cd $(TKIMGDIR); $(MAKE) install

tkmpeg	: FORCE
	@echo "Installing TKMPEG..."
	cd $(TKMPEGDIR); $(MAKE)
	cd $(TKMPEGDIR); $(MAKE) install

html	: FORCE
	@echo "Installing HTMLWIDGET noshared..."
	cd $(HTMLDIR); CC=$(CCc) $(PREHTMLFLAGS) $(root)/htmlwidget/configure $(HTMLFLAGS) --enable-shared=no
	cd $(HTMLDIR); $(MAKE)
	cp $(HTMLDIR)/libtkhtml.a lib/.

htmlsh	: FORCE
	@echo "Installing HTMLWIDGET shared..."
	cd $(HTMLDIR); CC=$(CCc) $(PREHTMLFLAGS) $(root)/htmlwidget/configure $(HTMLFLAGS) --enable-shared=yes
	cd $(HTMLDIR); $(MAKE)
	cp $(HTMLDIR)/libtkhtml.a lib/.
	cp $(HTMLDIR)/tkhtml.$(SHEXT) lib/libtkhtml.$(SHEXT)

xpash	: FORCE
	@echo "Installing XPA shared..."
	cd $(XPADIR); CC=$(CCc) ./configure $(XPAFLAGS) --enable-tclshlib
	cd $(XPADIR); $(MAKE); $(MAKE) install
	mv -f lib/libxpa.a lib/libtclxpa.a

xpa	: FORCE
	@echo "Installing XPA..."
	cd $(XPADIR); CC=$(CCc) ./configure $(XPAFLAGS) 
	cd $(XPADIR); $(MAKE); $(MAKE) install
	mv -f lib/libxpa.a lib/libtclxpa.a

iis	: FORCE
	@echo "Installing IIS..."
	cd $(IISDIR); $(MAKE) install

ast	: FORCE
	@echo "Installing AST..."
	cd $(ASTDIR); $(MAKE) install

checkdns: FORCE
	@echo "Installing CheckDNS..."
	cd $(CHECKDNSDIR); $(MAKE) install

fitsy	: FORCE
	@echo "Configure Fitsy..."
	cd $(FITSYDIR); CC=$(CC) CFLAGS='${CCOPT}' ./configure $(FITSYFLAGS)

filter	: FORCE
	@echo "Configure Filter..."
	cd $(FILTERDIR); CC=$(CC) CFLAGS='${CCOPT}' ./configure $(FILTERFLAGS)

saotk	: FORCE
	@echo "Installing SAOTK..."
	cd $(SAOTKDIR); $(MAKE) install

win	: FORCE
	@echo "Installing WIN..."
	cp $(WININCL) include/.
	cd $(WINDIR); $(MAKE) install

#--------------------------optional packages

tclxsh  : FORCE
	@echo "Installing TCLX shared..."
	cd $(TCLXDIR); CC=$(CCc) ./configure $(TCLXFLAGS) --enable-shared
	cd $(TCLXDIR); $(MAKE) install

tclx  : FORCE
	@echo "Installing TCLX noshared..."
	cd $(TCLXDIR); CC=$(CCc) ./configure $(TCLXFLAGS) --disable-shared
	cd $(TCLXDIR); $(MAKE) install


#--------------------------clean

clean : FORCE
	$(RM) core *~ *#
	cd $(IISDIR); $(MAKE) clean
	cd $(ASTDIR); $(MAKE) clean
	cd $(CHECKDNSDIR); $(MAKE) clean
	cd $(SAOTKDIR); $(MAKE) clean
	cd $(DS9DIR); $(MAKE) clean
ifeq ($(ARCH),windows)
	cd $(WINDIR); make clean
endif

distclean : FORCE
	$(RM) core *~ *#
	-$(MAKE) -C $(TCLDIR) distclean
	-$(MAKE) -C $(TKDIR) distclean
	-$(MAKE) -C $(TCLLIBDIR) distclean
	-$(MAKE) -C $(BLTDIR) distclean
	-$(MAKE) -C $(TKIMGDIR) distclean
	-$(MAKE) -C $(TKMPEGDIR) distclean
	-$(MAKE) -C $(HTMLDIR) distclean
	cd $(MKTCLAPPDIR); rm mktclapp$(EXE); cd ../;
	-$(MAKE) -C $(ZLIBDIR) distclean
	-$(MAKE) -C $(XPADIR) distclean
	-$(MAKE) -C $(IISDIR) distclean
	-$(MAKE) -C $(ASTDIR) distclean
	-$(MAKE) -C $(CHECKDNSDIR) distclean
	-$(MAKE) -C $(SAOTKDIR) distclean
	-$(MAKE) -C $(DS9DIR) distclean
	$(RM) -r $(DIRS)
ifeq ($(ARCH),windows)
	cd $(WINDIR); make distclean
endif

tclclean : FORCE
	cd $(TCLDIR); make distclean

tkclean : FORCE
	cd $(TKDIR); make distclean

tcllibclean: FORCE
	cd $(TCLLIBDIR); make distclean

bltclean: FORCE
	cd $(BLTDIR); make distclean

zlibclean: FORCE
	cd $(ZLIBDIR); make distclean

tkimgclean: FORCE
	rm -fr $(TKIMGDIR)/Img/*
	rm -fr $(LIB)/Img1.3
	cd $(TKIMGDIR); make distclean

tkmpegclean: FORCE
	cd $(TKMPEGDIR); make distclean

htmlclean: FORCE
	cd $(HTMLDIR); make distclean

mktclappclean: FORCE
	cd $(MKTCLAPPDIR); rm mktclapp$(EXE)

xpaclean : FORCE
	cd $(XPADIR); make distclean

astclean : FORCE
	cd $(ASTDIR); make distclean

iisclean : FORCE
	cd $(IISDIR); make distclean

checkdnsclean : FORCE
	cd $(CHECKDNSDIR); make distclean

saotkclean : FORCE
	cd $(SAOTKDIR); $(MAKE) distclean

ds9clean : FORCE
	cd $(DS9DIR); $(MAKE) distclean

winclean : FORCE
	cd $(WINDIR); make distclean

fitsyclean: FORCE
	cd $(FITSYDIR); make distclean

filterclean: FORCE
	cd $(FILTERDIR); make distclean

tclxclean: FORCE
	cd $(TCLXDIR); make distclean

#--------------------------cvs

commit : FORCE
	cvs commit -m "" acknowledgement admin ast checkdns tkmpeg COPYING copyright ds9 iis make.alpha make.darwin make.hpux make.linux make.linux64 make.linuxppc make.sgi make.solaris make.solaris64 make.windows Makefile notes mods README saotk win

update : FORCE
	cvs update acknowledgement admin ast checkdns tkmpeg COPYING copyright ds9 iis make.alpha make.darwin make.hpux make.linux make.linux64 make.linuxppc make.sgi make.solaris make.solaris64 make.windows Makefile notes mods README saotk win

FORCE	: