blob: ea49b0f486e6d32c84d4a2905ae1d04916a7dd02 (
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
|
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@
tclcheckdns_LIB_SPEC= @tclcheckdns_LIB_SPEC@
tcliis_LIB_SPEC = @tcliis_LIB_SPEC@
tclsignal_LIB_SPEC= @tclsignal_LIB_SPEC@
tkblt_LIB_SPEC = @tkblt_LIB_SPEC@
tkhtml1_LIB_SPEC= @tkhtml1_LIB_SPEC@
tkmacosx_LIB_SPEC= @tkmacosx_LIB_SPEC@
tkmpeg_LIB_SPEC = @tkmpeg_LIB_SPEC@
tksao_LIB_SPEC = @tksao_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)
.SUFFIXES: .c .C .$(OBJEXT)
.c.@OBJEXT@:
$(COMPILE) -c $< -o $@
.C.@OBJEXT@:
$(COMPILE) -c $< -o $@
#--------------------------defines
ID = $(shell finger $(shell whoami) | egrep -o 'Name: [a-zA-Z0-9 ]{1,}' | cut -d ':' -f 2 | xargs echo)
OBJS = ds9.o tkAppInit.o
LLIBS = \
$(libdir)/libfuntools.a \
$(libdir)/libast.a \
$(libdir)/libast_err.a \
$(libdir)/libast_pal.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
APPDIR = $(bindir)/SAOImage\ DS9.app
TKSAOFW = $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tksao.framework
TKSAORES= $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tksao.framework/Resources
TCLFW = $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tcl.framework
TCLRES = $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tcl.framework/Resources
TKFW = $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tk.framework
TKRES = $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tk.framework/Resources
#--------------------------main
.NOTPARALLEL :
.PHONY : ds9 debug appdir framework tcl tcl_debug tk tk_debug tcllib tkcon
.PHONY : tkblt xpa compiler cleanup
ds9 : ds9base appdir framework tcl tk tcllib tkcon tkblt xpa compiler cleanup
cp -p ds9base $(APPDIR)/Contents/MacOS/ds9
strip $(APPDIR)/Contents/MacOS/ds9
install_name_tool -change \
/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl \
@executable_path/../Frameworks/Tcl.framework/Tcl \
$(APPDIR)/Contents/MacOS/ds9
install_name_tool -change \
/Library/Frameworks/Tk.framework/Versions/8.6/Tk \
@executable_path/../Frameworks/Tk.framework/Tk \
$(APPDIR)/Contents/MacOS/ds9
cd $(bindir); codesign --deep -f -s "$(ID)" SAOImage\ DS9.app
debug : ds9base appdir framework tcl tk tcllib tkcon tkblt xpa compiler cleanup
cp -p ds9base $(APPDIR)/Contents/MacOS/ds9
install_name_tool -change \
/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl \
@executable_path/../Frameworks/Tcl.framework/Tcl \
$(APPDIR)/Contents/MacOS/ds9
install_name_tool -change \
/Library/Frameworks/Tk.framework/Versions/8.6/Tk \
@executable_path/../Frameworks/Tk.framework/Tk \
$(APPDIR)/Contents/MacOS/ds9
cd $(bindir); codesign --deep -f -s "$(ID)" SAOImage\ DS9.app
tkAppInit.o : tkAppInit.c
$(COMPILE) -DTK_LOCAL_APPINIT=SAOAppInit \
-DTK_LOCAL_MAIN_HOOK=SAOLocalMainHook -c tkAppInit.c -o $@
tkAppInit.c : $(prefix)/tk$(TCL_VERSION)/unix/tkAppInit.c
cp $(prefix)/tk$(TCL_VERSION)/unix/tkAppInit.c .
ds9base : $(OBJS) $(LLIBS)
$(RM) $@
$(CC) $(CFLAGS) -o $@ \
$(OBJS) \
$(LLIBS) \
$(LIBS) \
$(tclcheckdns_LIB_SPEC) \
$(tcliis_LIB_SPEC) \
$(tclsignal_LIB_SPEC) \
$(tifftcl_LIB_SPEC) \
$(pngtcl_LIB_SPEC) \
$(jpegtcl_LIB_SPEC) \
$(zlibtcl_LIB_SPEC) \
$(tkimg_LIB_SPEC) \
$(tkblt_LIB_SPEC) \
$(tkhtml1_LIB_SPEC) \
$(tkmacosx_LIB_SPEC) \
$(tkmpeg_LIB_SPEC) \
$(tksao_LIB_SPEC) \
$(TK_STUB_LIB_SPEC) $(TK_LIB_SPEC) \
$(TCL_STUB_LIB_SPEC) $(TCL_LIB_SPEC) \
$(TK_LIBS)
appdir :
rm -rf $(APPDIR)
cp -rp SAOImage\ DS9.app $(bindir)/.
framework:
cp -pr ../library $(TKSAORES)/.
cp -pr ../msgs $(TKSAORES)/.
cp -pr ../doc $(TKSAORES)/.
cp -pr ../cmaps $(TKSAORES)/.
cp -pr ../template $(TKSAORES)/.
rm $(TKSAORES)/library/source.tcl
echo "pkg_mkIndex $(TKSAORES)/library *.tcl; exit" | $(bindir)/tclsh8.6
tcl :
cp -p $(prefix)/build/tcl/Tcl.framework/Versions/8.6/Tcl $(TCLFW)/.
cp -pr $(prefix)/build/tcl/Tcl.framework/Versions/8.6/Resources/* $(TCLRES)/.
tcl_debug:
cp -p $(prefix)/build/tcl/Tcl.framework/Versions/8.6/Tcl_debug $(TCLFW)/Tcl
cp -pr $(prefix)/build/tcl/Tcl.framework/Versions/8.6/Resources/* $(TCLRES)/.
tk :
cp -p $(prefix)/build/tk/Tk.framework/Versions/8.6/Tk $(TKFW)/.
cp -p $(prefix)/build/tk/Tk.framework/Versions/8.6/Resources/Info.plist \
$(TKRES)/.
cp -p $(prefix)/build/tk/Tk.framework/Versions/8.6/Resources/license.terms \
$(TKRES)/.
cp -rp $(prefix)/build/tk/Tk.framework/Versions/8.6/Resources/Scripts \
$(TKRES)/.
tk_debug:
cp -p $(prefix)/build/tk/Tk.framework/Versions/8.6/Tk_debug $(TKFW)/Tk
cp -p $(prefix)/build/tk/Tk.framework/Versions/8.6/Resources/Info.plist \
$(TKRES)/.
cp -p $(prefix)/build/tk/Tk.framework/Versions/8.6/Resources/license.terms \
$(TKRES)/.
cp -rp $(prefix)/build/tk/Tk.framework/Versions/8.6/Resources/Scripts \
$(TKRES)/.
tcllib :
cp -pr $(prefix)/tcllib/modules/base64 $(TKSAORES)/.
cp -pr $(prefix)/tcllib/modules/ftp $(TKSAORES)/.
cp -pr $(prefix)/tcllib/modules/log $(TKSAORES)/.
cp -pr $(prefix)/tcllib/modules/textutil $(TKSAORES)/.
cp -pr $(prefix)/tcllib/modules/math $(TKSAORES)/.
tkcon :
mkdir $(TKSAORES)/tkcon
cp -p $(prefix)/tkcon/*.tcl $(TKSAORES)/tkcon/.
tkblt :
mkdir $(TKSAORES)/tkblt
cp -p $(prefix)/tkblt/library/graph.tcl $(TKSAORES)/tkblt/.
echo "pkg_mkIndex $(TKSAORES)/tkblt *.tcl; exit" | $(bindir)/tclsh8.6
xpa :
cp -pr $(bindir)/xpans $(TKSAORES)/.
compiler:
cp -p $(prefix)/compilers/pcc-i386-snowleopard.tar.gz $(TKSAORES)/.
cleanup:
cd $(APPDIR); find . -depth -name CVS -exec rm -rf {} \;
cd $(APPDIR); find . -name keepme -exec rm -rf {} \;
#--------------------------cleanup
.PHONY : clean distclean
clean :
cd ../library; $(MAKE) clean
$(RM) core *~ *# ds9Base ds9 *.o
distclean: clean
-rm -f Makefile config.cache config.log config.status
-rm -rf autom4te.cache
|