blob: 5b40b5d7db607de047f19587d82b3fd59c41359c (
plain)
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
|
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = $(exec_prefix)/lib
#libdir = @libdir@
includedir = @includedir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
include $(prefix)/make.pkgs
TCL_VERSION = @TCL_VERSION@
TCL_LIB_SPEC = @TCL_LIB_SPEC@
TCL_STUB_LIB_SPEC= @TCL_STUB_LIB_SPEC@
TK_LIBS = @TK_LIBS@
TK_LIB_SPEC = @TK_LIB_SPEC@
TK_STUB_LIB_SPEC= @TK_STUB_LIB_SPEC@
tifftcl_LIB_SPEC= @tifftcl_LIB_SPEC@
pngtcl_LIB_SPEC = @pngtcl_LIB_SPEC@
jpegtcl_LIB_SPEC= @jpegtcl_LIB_SPEC@
zlibtcl_LIB_SPEC= @zlibtcl_LIB_SPEC@
tkimg_LIB_SPEC = @tkimg_LIB_SPEC@
tclzvfs_LIB_SPEC= @tclzvfs_LIB_SPEC@
tkblt_LIB_SPEC = @tkblt_LIB_SPEC@
CC = @CC@
CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
CFLAGS_WARNING = @CFLAGS_WARNING@
EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
PKG_CFLAGS = @PKG_CFLAGS@
DEFS = @DEFS@ $(PKG_CFLAGS)
CPPFLAGS = @CPPFLAGS@
LIBS = @PKG_LIBS@ @LIBS@
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
system = @system@
.SUFFIXES: .c .C .$(OBJEXT)
.c.@OBJEXT@:
$(COMPILE) -c `@CYGPATH@ $<` -o $@
.C.@OBJEXT@:
$(COMPILE) -c `@CYGPATH@ $<` -o $@
#--------------------------defines
ID = $(shell finger $(shell whoami) | egrep -o 'Name: [a-zA-Z0-9 ]{1,}' | cut -d ':' -f 2 | xargs echo)
ZDIR = zvfsmntpt
OBJS = ds9.o tkAppInit.o
FILES = \
$(ZDIR)/tcl$(TCL_VERSION) \
$(ZDIR)/tcl8 \
$(ZDIR)/tk$(TCL_VERSION) \
$(ZDIR)/tkblt \
$(ZDIR)/tcllib \
$(ZDIR)/tkcon \
$(ZDIR)/library \
$(ZDIR)/msgs \
$(ZDIR)/doc \
$(ZDIR)/cmaps \
$(ZDIR)/template
LLIBS = \
$(libdir)/tksao$(TKSAOVER)/libtksao$(TKSAOVER).a \
$(libdir)/libfuntools.a \
$(libdir)/libast.a \
$(libdir)/libast_err.a \
$(libdir)/libast_pal.a \
$(libdir)/tksao$(TKSAOVER)/libtksao$(TKSAOVER).a \
$(libdir)/tkhtml1$(TKHTMLVER)/libtkhtml1$(TKHTMLVER).a \
$(libdir)/tkmpeg$(TKMPEGVER)/libtkmpeg$(TKMPEGVER).a \
$(libdir)/Tclxml$(TCLXMLVER)/libTclxml$(TCLXMLVER).a \
$(libdir)/Tktable$(TKTABLEVER)/libTktable$(TKTABLEVER).a \
$(libdir)/tkimgtiff$(TKIMGVER)/libtkimgtiff$(TKIMGVER).a \
$(libdir)/tkimgpng$(TKIMGVER)/libtkimgpng$(TKIMGVER).a \
$(libdir)/tkimgjpeg$(TKIMGVER)/libtkimgjpeg$(TKIMGVER).a \
$(libdir)/tkimggif$(TKIMGVER)/libtkimggif$(TKIMGVER).a \
$(libdir)/tkimgwindow$(TKIMGVER)/libtkimgwindow$(TKIMGVER).a \
$(libdir)/libxpa.a \
$(libdir)/tcliis$(TCLIISVER)/libtcliis$(TCLIISVER).a \
$(libdir)/tclcheckdns$(TCLCHECKDNSVER)/libtclcheckdns$(TCLCHECKDNSVER).a \
$(libdir)/tclsignal$(TCLSIGNALVER)/libtclsignal$(TCLSIGNALVER).a
#--------------------------main
.NOTPARALLEL :
.PHONY : debug
ifeq (,$(findstring Darwin,$(system)))
ds9 : ds9base ds9.zip
$(RM) ds9
strip ds9base
cat ds9base ds9.zip > ds9
zip -A ds9
chmod 755 ds9
cp ds9 ../../bin/.
debug : ds9base ds9.zip
$(RM) ds9
cat ds9base ds9.zip > ds9
zip -A ds9
chmod 755 ds9
cp ds9 ../../bin/.
else
ds9 : ds9base ds9.zip
$(RM) ds9
strip ds9base
cp ds9base ds9
cp ds9 ../../bin/.
cp ds9.zip ../../bin/.
cd ../../bin; codesign -s "$(ID)" ds9
debug: ds9base ds9.zip
$(RM) ds9
cp ds9base ds9
cp ds9 ../../bin/.
cp ds9.zip ../../bin/.
cd ../../bin; codesign -s "$(ID)" ds9
endif
ds9base : $(OBJS) $(LLIBS)
$(RM) $@
$(CC) $(CFLAGS) -o $@ \
$(OBJS) \
$(LLIBS) \
$(LIBS) \
$(tclzvfs_LIB_SPEC) \
$(tifftcl_LIB_SPEC) \
$(pngtcl_LIB_SPEC) \
$(jpegtcl_LIB_SPEC) \
$(zlibtcl_LIB_SPEC) \
$(tkimg_LIB_SPEC) \
$(tkblt_LIB_SPEC) \
$(TK_STUB_LIB_SPEC) $(TK_LIB_SPEC) \
$(TCL_STUB_LIB_SPEC) $(TCL_LIB_SPEC) \
$(TK_LIBS)
ds9.zip : $(ZDIR) $(FILES)
$(RM) $@
find $(ZDIR) -depth -name "CVS" -exec rm -r {} \;
zip -r ds9.zip $(ZDIR)
tkAppInit.o : tkAppInit.c
$(COMPILE) -DTK_LOCAL_APPINIT=SAOAppInit \
-DTK_LOCAL_MAIN_HOOK=SAOLocalMainHook -c tkAppInit.c -o $@
tkAppInit.c : ../../tk$(TCL_VERSION)/unix/tkAppInit.c
cp ../../tk$(TCL_VERSION)/unix/tkAppInit.c .
$(ZDIR) :
mkdir $@
$(ZDIR)/tcl$(TCL_VERSION) : $(prefix)/lib/tcl$(TCL_VERSION)
$(RM) -r $@
cp -r $(prefix)/lib/tcl$(TCL_VERSION) $(ZDIR)/.
$(ZDIR)/tcl8 : $(prefix)/lib/tcl8
$(RM) -r $@
cp -r $(prefix)/lib/tcl8 $(ZDIR)/.
$(ZDIR)/tk$(TCL_VERSION) : $(prefix)/lib/tk$(TCL_VERSION)
$(RM) -r $@
cp -r $(prefix)/lib/tk$(TCL_VERSION) $(ZDIR)/.
rm -rf $(ZDIR)/tk$(TCL_VERSION)/images
rm -rf $(ZDIR)/tk$(TCL_VERSION)/demos
$(ZDIR)/tkblt :
$(RM) -r $@
mkdir $(ZDIR)/tkblt
cp ../../tkblt/library/graph.tcl $(ZDIR)/tkblt/.
$(ZDIR)/tcllib :
$(RM) -r $@
mkdir $(ZDIR)/tcllib
cp -r ../../tcllib/modules/base64 $(ZDIR)/tcllib/.
cp -r ../../tcllib/modules/ftp $(ZDIR)/tcllib/.
cp -r ../../tcllib/modules/log $(ZDIR)/tcllib/.
cp -r ../../tcllib/modules/textutil $(ZDIR)/tcllib/.
cp -r ../../tcllib/modules/math $(ZDIR)/tcllib/.
$(ZDIR)/tkcon : $(prefix)/lib/tkcon$(TKCONVER)
$(RM) -r $@
cp -r $(prefix)/lib/tkcon$(TKCONVER) $@
$(ZDIR)/library : ../library/*.tcl
$(RM) -r $@
cp -r ../library $(ZDIR)/.
$(ZDIR)/msgs : ../msgs/*
$(RM) -r $@
cp -r ../msgs $(ZDIR)/.
$(ZDIR)/doc : ../doc/* ../doc/ref/* ../doc/user/* ../doc/release/*
$(RM) -r $@
cd ..; find doc -name "*.html" | cpio -pdmuv unix/$(ZDIR)
cd ..; find doc -name "*.gif" | cpio -pdmuv unix/$(ZDIR)
cd ..; find doc -name "*.png" | cpio -pdmuv unix/$(ZDIR)
$(ZDIR)/cmaps : ../cmaps/*
$(RM) -r $@
cp -r ../cmaps $(ZDIR)/.
$(ZDIR)/template : ../template/*
$(RM) -r $@
cd ..; find template -name "*.tpl" | cpio -pdmuv unix/$(ZDIR)
#--------------------------cleanup
.PHONY : clean distclean
clean :
cd ../library; $(MAKE) clean
$(RM) core *~ *# ds9base ds9 *.zip *.o
$(RM) -r $(ZDIR)
distclean: clean
-rm -f Makefile config.cache config.log config.status
|