prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = $(exec_prefix)/lib #libdir = @libdir@ includedir = @includedir@ datarootdir = @datarootdir@ datadir = @datadir@ mandir = @mandir@ 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@ tkimggif_LIB_SPEC= @tkimggif_LIB_SPEC@ tkimgjpeg_LIB_SPEC= @tkimgjpeg_LIB_SPEC@ tkimgpng_LIB_SPEC= @tkimgpng_LIB_SPEC@ tkimgtiff_LIB_SPEC= @tkimgtiff_LIB_SPEC@ tkimgwindow_LIB_SPEC= @tkimgwindow_LIB_SPEC@ tcliis_LIB_SPEC = @tcliis_LIB_SPEC@ tclxml_LIB_SPEC = @tclxml_LIB_SPEC@ tls_LIB_SPEC = @tls_LIB_SPEC@ tkblt_LIB_SPEC = @tkblt_LIB_SPEC@ tkhtml1_LIB_SPEC= @tkhtml1_LIB_SPEC@ tkmpeg_LIB_SPEC = @tkmpeg_LIB_SPEC@ tksao_LIB_SPEC = @tksao_LIB_SPEC@ tktable_LIB_SPEC= @tktable_LIB_SPEC@ tkwin_LIB_SPEC = @tkwin_LIB_SPEC@ CC = @CC@ AR = @AR@ RC = @RC@ CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ CFLAGS_WARNING = @CFLAGS_WARNING@ OBJEXT = @OBJEXT@ DLLDIR = /usr/$(CC:-gcc=)/sys-root/mingw/bin 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) -DSTATIC_BUILD -c $< -o $@ .C.@OBJEXT@: $(COMPILE) -DSTATIC_BUILD -c $< -o $@ #--------------------------defines APPDIR = $(bindir)/SAOImageDS9 LIBDIR = $(APPDIR) OBJS = ds9.o winMain.o ds9.res.o empty:= space:=$(empty) $(empty) SPECS = \ $(jpegtcl_LIB_SPEC) \ $(pngtcl_LIB_SPEC) \ $(tifftcl_LIB_SPEC) \ $(zlibtcl_LIB_SPEC) \ $(tcliis_LIB_SPEC) \ $(tclxml_LIB_SPEC) \ $(tls_LIB_SPEC) \ $(tkblt_LIB_SPEC) \ $(tkhtml1_LIB_SPEC) \ $(tkimg_LIB_SPEC) \ $(tkimggif_LIB_SPEC) \ $(tkimgjpeg_LIB_SPEC) \ $(tkimgpng_LIB_SPEC) \ $(tkimgtiff_LIB_SPEC) \ $(tkimgwindow_LIB_SPEC) \ $(tkmpeg_LIB_SPEC) \ $(tksao_LIB_SPEC) \ $(tktable_LIB_SPEC) \ $(tkwin_LIB_SPEC) \ $(TK_STUB_LIB_SPEC) \ $(TK_LIB_SPEC) \ $(TCL_STUB_LIB_SPEC) \ $(TCL_LIB_SPEC) LLIBS = \ $(subst /$(space),/,$(patsubst -L%,%/,$(patsubst -l%,lib%.a,$(tksao_LIB_SPEC)))) \ $(libdir)/libfuntools.a \ $(libdir)/libast.a \ $(libdir)/libast_err.a \ $(libdir)/libast_pal.a \ $(libdir)/libxpa.a \ $(libdir)/libxml2.a \ $(libdir)/libz.a \ $(subst /$(space),/,$(patsubst -L%,%/,$(patsubst -l%,lib%.a,$(SPECS)))) PREQS = \ $(APPDIR) \ $(APPDIR)/tcl$(TCL_VERSION) \ $(APPDIR)/tcl8 \ $(APPDIR)/tk$(TCL_VERSION) \ $(LIBDIR)/library \ $(LIBDIR)/msgs \ $(LIBDIR)/doc \ $(LIBDIR)/cmaps \ $(LIBDIR)/template \ $(LIBDIR)/tls \ $(LIBDIR)/tkblt \ $(LIBDIR)/tkcon \ $(LIBDIR)/base64 \ $(LIBDIR)/ftp \ $(LIBDIR)/log \ $(LIBDIR)/textutil \ $(LIBDIR)/math \ $(APPDIR)/xpans.exe \ $(APPDIR)/install.vbs \ $(APPDIR)/tcc \ DLLs #--------------------------main .NOTPARALLEL : .PHONY : debug $(APPDIR)/ds9.exe : ds9Base.exe $(PREQS) cp -p ds9base.exe ds9.exe strip ds9.exe cp -p ds9.exe $(APPDIR)/. debug : ds9Base.exe $(PREQS) mv ds9base.exe ds9.exe cp -p ds9.exe $(APPDIR)/. ds9Base.exe: $(OBJS) $(LLIBS) $(RM) $@ $(CC) $(CFLAGS) -o $@ \ $(OBJS) \ $(LLIBS) \ $(TK_LIBS) \ $(LIBS) \ -L $(prefix)/openssl -lssl -lcrypto \ -lgdi32 \ -mwindows #-static winMain.o : winMain.c $(COMPILE) \ -DSTATIC_BUILD \ -DTK_LOCAL_APPINIT=SAOAppInit -DTK_LOCAL_MAIN_HOOK=SAOLocalMainHook \ -c winMain.c -o $@ winMain.c : $(prefix)/tk$(TCL_VERSION)/win/winMain.c cp $(prefix)/tk$(TCL_VERSION)/win/winMain.c . ds9.res.o: ds9.rc ds9.ico $(RC) -o $@ \ --define STATIC_BUILD --include $(prefix)/tk$(TCL_VERSION)/generic \ --include $(prefix)/$(TCLDIR)/generic \ --include $(prefix)/tk$(TCL_VERSION)/win/rc \ ds9.rc $(APPDIR): mkdir -p $@ $(APPDIR)/tcl$(TCL_VERSION) : $(prefix)/lib/tcl$(TCL_VERSION) cp -pr $? $@ $(APPDIR)/tcl8 : $(prefix)/lib/tcl8 cp -pr $? $@ $(APPDIR)/tk$(TCL_VERSION) : $(prefix)/lib/tk$(TCL_VERSION) cp -pr $? $@ $(APPDIR)/xpans.exe: $(bindir)/xpans.exe cp -p $? $@ $(APPDIR)/install.vbs: install.vbs cp -p $? $@ $(APPDIR)/tcc: $(prefix)/compilers/tcc-0.9.25-win32-bin.zip $(RM) -rf $@ cd $(APPDIR); unzip $? chmod +x $@/tcc.exe touch $@ DLLs: cp $(prefix)/openssl/ssleay32.dll $(APPDIR) cp $(prefix)/openssl/libeay32.dll $(APPDIR) cp $(DLLDIR)/libgcc_s_s*-1.dll $(APPDIR) cp $(DLLDIR)/libstdc++-6.dll $(APPDIR) cp $(DLLDIR)/libwinpthread-1.dll $(APPDIR) #--------------------------clean .PHONY : clean clean : $(RM) core *~ *# ds9base.exe ds9.exe *.zip *.o $(RM) -rf $(APPDIR) include ../make.include