prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = $(exec_prefix)/lib #libdir = @libdir@ includedir = @includedir@ datarootdir = @datarootdir@ datadir = @datadir@ mandir = @mandir@ OS = @OS@ ARCH = @ARCH@ TLSFLAGS = @TLSFLAGS@ JOBS = @CORES@ include ./make.include WITHTCL = --with-tcl=$(prefix)/build/tcl/Development WITHTK = --with-tk=$(prefix)/build/tk/Development $(WITHTCL) CACHE = --config-cache --cache-file=$(prefix)/config.cache #--------------------------defines DS9APP =SAOImageDS9\ $(DS9_VERSION) TCLFILES= \ tcl$(TCL_VERSION)/generic/tcl.h \ tcl$(TCL_VERSION)/generic/tclDecls.h \ tcl$(TCL_VERSION)/generic/tclPlatDecls.h TKFILES = \ tk$(TCL_VERSION)/generic/tk.h \ tk$(TCL_VERSION)/generic/tkDecls.h \ tk$(TCL_VERSION)/generic/tkPlatDecls.h \ tk$(TCL_VERSION)/generic/tkIntXlibDecls.h \ tk$(TCL_VERSION)/macosx/tkMacOSX.h #--------------------------build .PHONY : saods9 tcl tk tkmacosx saods9 : dirs tcl tk \ tcliis tclsignal \ tclzvfs tls tclxml xpa \ tkblt tktable tkimg \ tkmpeg tkhtml1 tkcon \ tkmacosx \ tksao ds9 tcl : tcl$(TCL_VERSION)/macosx/Makefile @echo "" @echo "*** $@ ***" $(MAKE) -C tcl$(TCL_VERSION)/macosx -j $(JOBS) # install include, lib cp -p $(TCLFILES) include/. cp -p build/tcl/Tcl.framework/libtclstub8.6.a lib/. cp -rp build/tcl/Tcl.framework/Versions/8.6/Resources/Scripts lib/tcl8.6 cp -rp build/tcl/Tcl.framework/Versions/8.6/Resources/tcl8 lib/. # we need this also install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @executable_path/../Tcl.framework/Tcl build/tcl/Development/tclsh # we need a working tclsh later cp -p build/tcl/tclsh8.6 bin/. install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @executable_path/../build/tcl/Tcl.framework/Tcl bin/tclsh8.6 tcl$(TCL_VERSION)/macosx/Makefile : @echo "" @echo "*** $@ ***" cd tcl$(TCL_VERSION)/macosx; \ ./configure \ --enable-64bit \ --enable-symbols \ $(CACHE) tk : tk$(TCL_VERSION)/macosx/Makefile @echo "" @echo "*** $@ ***" $(MAKE) -C tk$(TCL_VERSION)/macosx -j $(JOBS) # install include, lib cp -p $(TKFILES) include/. cp -p build/tk/Tk.framework/libtkstub8.6.a lib/. cp -rp build/tk/Tk.framework/Versions/8.6/Resources/Scripts lib/tk8.6 # we need this also install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @executable_path/../Tcl.framework/Tcl build/tk/Development/wish install_name_tool -change /Library/Frameworks/Tk.framework/Versions/8.6/Tk @executable_path/../Tk.framework/Tk build/tk/Development/wish # fix wish8.6 cp -p build/tk/wish8.6 bin/. install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @executable_path/../build/tcl/Tcl.framework/Tcl bin/wish8.6 install_name_tool -change /Library/Frameworks/Tk.framework/Versions/8.6/Tk @executable_path/../build/tk/Tk.framework/Tk bin/wish8.6 tk$(TCL_VERSION)/macosx/Makefile : @echo "" @echo "*** $@ ***" cd tk$(TCL_VERSION)/macosx; \ ./configure \ $(WITHTCL) \ --enable-64bit \ --enable-symbols \ $(CACHE) tkmacosx: tkmacosx/Makefile @echo "" @echo "*** $@ ***" $(MAKE) -C tkmacosx -j $(JOBS) install tkmacosx/Makefile : @echo "" @echo "*** $@ ***" cd tkmacosx; \ ./configure \ $(WITHTK) \ --prefix $(prefix) --exec-prefix $(exec_prefix) --libdir $(libdir) \ --disable-shared --enable-symbols \ $(CACHE) #--------------------------clean .PHONY : tclclean tkclean tkosclean tclclean : @echo "" @echo "*** tclclean ***" $(MAKE) -C tcl$(TCL_VERSION)/macosx clean tkclean : @echo "" @echo "*** $@ ***" $(MAKE) -C tk$(TCL_VERSION)/macosx clean tkosclean : @echo "" @echo "*** $@ ***" $(MAKE) -C tkmacosx clean #--------------------------distclean .PHONY : tcldistclean tkdistclean tkosdistclean tcldistclean : @echo "" @echo "*** $@ ***" $(MAKE) -C tcl$(TCL_VERSION)/macosx distclean tkdistclean : @echo "" @echo "*** $@ ***" $(MAKE) -C tk$(TCL_VERSION)/macosx distclean tkosdistclean : @echo "" @echo "*** $@ ***" $(MAKE) -C tkmacosx distclean #--------------------------distribution .PHONY : dist dist : rm -rf dist/$(DS9APP) rm -rf dist/$(DS9APP).dmg mkdir dist/$(DS9APP) ln -s /Applications dist/$(DS9APP)/. cp -r ds9/macos/README dist/$(DS9APP)/. cp -rp bin/SAOImageDS9.app dist/$(DS9APP)/. hdiutil create -srcfolder dist/$(DS9APP) dist/$(DS9APP) rm -rf dist/$(DS9APP)