diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2011-06-22 21:39:01 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2011-06-23 18:17:02 +0100 |
commit | ca0f4ff4a0df386dd4d494a418f09336d06c2451 (patch) | |
tree | 8586179f4a094320e2196a7502ede3d51e29e5a2 /gs | |
parent | 3b3261eca08cd73ca355b28fe5125c98d411820d (diff) |
Cross compilation (AUX) changes to ghostscript and ghostpdl.
Introduce a new 'aux' directory and appropriate defines to allow
easier cross-compilation of gs/ghostpdl.
Diffstat (limited to 'gs')
-rw-r--r-- | gs/base/Makefile.in | 12 | ||||
-rw-r--r-- | gs/base/all-arch.mak | 3 | ||||
-rw-r--r-- | gs/base/gs.mak | 16 | ||||
-rw-r--r-- | gs/base/lib.mak | 53 | ||||
-rw-r--r-- | gs/base/msvccmd.mak | 2 | ||||
-rw-r--r-- | gs/base/msvctail.mak | 16 | ||||
-rw-r--r-- | gs/base/unix-aux.mak | 17 | ||||
-rw-r--r-- | gs/base/unix-end.mak | 1 | ||||
-rw-r--r-- | gs/base/zlib.mak | 27 | ||||
-rw-r--r-- | gs/psi/msvc.mak | 22 | ||||
-rw-r--r-- | gs/psi/os2.mak | 5 |
11 files changed, 148 insertions, 26 deletions
diff --git a/gs/base/Makefile.in b/gs/base/Makefile.in index 627d093da..160e79a18 100644 --- a/gs/base/Makefile.in +++ b/gs/base/Makefile.in @@ -26,6 +26,7 @@ BINDIR=./bin GLSRCDIR=./base GLGENDIR=@OBJDIR_BSDMAKE_WORKAROUND@ GLOBJDIR=@OBJDIR_BSDMAKE_WORKAROUND@ +AUXDIR=./aux PSSRCDIR=./psi PSLIBDIR=./lib PSRESDIR=./Resource @@ -305,14 +306,16 @@ RANLIB=@RANLIB@ # ------ Platform-specific options ------ # -# Define the name of the C compiler. +# Define the name of the C compiler (target and host (AUX)) CC=@CC@ +CCAUX=@CC@ # Define the name of the linker for the final link step. # Normally this is the same as the C compiler. CCLD=$(CC) +CCAUXLD=$(CCAUX) # Define the default gcc flags. GCFLAGS=@CPPFLAGS@ @GCFLAGS@ @CFLAGS@ @@ -543,13 +546,14 @@ AK= CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS) CC_=$(CC) $(CCFLAGS) -CCAUX=$(CC) $(CFLAGS) +CCAUX_=$(CCAUX) $(CFLAGS) CC_LEAF=$(CC_) # note gcc can't use -fomit-frame-pointer with -pg. CC_LEAF_PG=$(CC_) # These are the specific warnings we have to turn off to compile those # specific few files that need this. We may turn off others in the future. CC_NO_WARN=$(CC_) +CCAUX_NO_WARN=$(CCAUX_) CC_SHARED=$(CC_) @DYNAMIC_CFLAGS@ LD_SET_DT_SONAME=@SET_DT_SONAME@ @@ -592,7 +596,7 @@ include $(GLSRCDIR)/unixinst.mak # configure.ac and Makefile.in are symlinks from a subdir # (created by autogen.sh) and so are safe to remove distclean : clean config-clean soclean pgclean debugclean - -$(RM_) -r $(BINDIR) $(GLOBJDIR) $(PSOBJDIR) + -$(RM_) -r $(BINDIR) $(GLOBJDIR) $(PSOBJDIR) $(AUXDIR) -$(RM_) -r autom4te.cache -$(RM_) config.log config.status -$(RM_) Makefile @@ -600,7 +604,7 @@ distclean : clean config-clean soclean pgclean debugclean # The following is *very* poor - we shouldn't be creating derived files in # the source directory, but for now..... -$(RM_) $(TIFFSRCDIR)$(D)libtiff$(D)tif_config.h $(TIFFSRCDIR)$(D)libtiff$(D)tiffconf.h - + # a debug-clean target for consistency with the ghostpdl builds debug-clean : debugclean diff --git a/gs/base/all-arch.mak b/gs/base/all-arch.mak index 48411d85e..e4edffea3 100644 --- a/gs/base/all-arch.mak +++ b/gs/base/all-arch.mak @@ -157,6 +157,8 @@ DD = $(GLD) GLD = $(GLGENDIR)/ GLGENDIR = ./obj GLOBJ = ./obj/ +AUXDIR = ./aux +AUX = ./aux/ PSD = $(PSGENDIR)/ PSGENDIR = ./obj @@ -275,6 +277,7 @@ clean mostlyclean clobber distclean maintainer-clean: init: -if test ! -d obj ; then mkdir obj ; fi + -if test ! -d obj ; then mkdir aux ; fi install: install-binary install-fontmap install-pdfsec diff --git a/gs/base/gs.mak b/gs/base/gs.mak index 10f48da3d..e0e8b8b7d 100644 --- a/gs/base/gs.mak +++ b/gs/base/gs.mak @@ -220,6 +220,7 @@ PNGGENDIR=$(GLGENDIR) PNGOBJDIR=$(GLOBJDIR) ZGENDIR=$(GLGENDIR) ZOBJDIR=$(GLOBJDIR) +ZAUXDIR=$(AUXDIR) TIFFGENDIR=$(GLGENDIR) TIFFOBJDIR=$(GLOBJDIR) JBIG2GENDIR=$(GLGENDIR) @@ -252,14 +253,13 @@ GS_MAK=$(GLSRCDIR)$(D)gs.mak # Define the names of the executables. GS_XE=$(BINDIR)$(D)$(GS)$(XE) -AUXGENDIR=$(GLGENDIR) -AUXGEN=$(AUXGENDIR)$(D) -ECHOGS_XE=$(AUXGEN)echogs$(XEAUX) -GENARCH_XE=$(AUXGEN)genarch$(XEAUX) -GENCONF_XE=$(AUXGEN)genconf$(XEAUX) -GENDEV_XE=$(AUXGEN)gendev$(XEAUX) -GENHT_XE=$(AUXGEN)genht$(XEAUX) -MKROMFS_XE=$(AUXGEN)mkromfs$(XEAUX) +AUX=$(AUXDIR)$(D) +ECHOGS_XE=$(AUX)echogs$(XEAUX) +GENARCH_XE=$(AUX)genarch$(XEAUX) +GENCONF_XE=$(AUX)genconf$(XEAUX) +GENDEV_XE=$(AUX)gendev$(XEAUX) +GENHT_XE=$(AUX)genht$(XEAUX) +MKROMFS_XE=$(AUX)mkromfs$(XEAUX) # Define the names of the generated header files. # gconfig*.h and gconfx*.h are generated dynamically. diff --git a/gs/base/lib.mak b/gs/base/lib.mak index eefffe5fa..0365b3079 100644 --- a/gs/base/lib.mak +++ b/gs/base/lib.mak @@ -21,11 +21,14 @@ GLSRC=$(GLSRCDIR)$(D) GLGEN=$(GLGENDIR)$(D) GLOBJ=$(GLOBJDIR)$(D) +AUX=$(AUXDIR)$(D) GLO_=$(O_)$(GLOBJ) +AUXO_=$(O_)$(AUX) GLI_=$(GLGENDIR) $(II)$(GLSRCDIR) GLF_= GLCCFLAGS=$(I_)$(GLI_)$(_I) $(GLF_) -DWHICH_CMS="$(WHICH_CMS)" GLCC=$(CC_) $(GLCCFLAGS) +GLCCAUX=$(CCAUX_) $(GLCCFLAGS) GLJCC=$(CC_) $(I_)$(GLI_) $(II)$(JI_)$(_I) $(JCF_) $(GLF_) GLZCC=$(CC_) $(I_)$(GLI_) $(II)$(ZI_)$(_I) $(ZCF_) $(GLF_) GLJBIG2CC=$(CC_) $(I_)$(GLI_) $(II)$(JB2I_)$(_I) $(JB2CF_) $(GLF_) @@ -201,6 +204,10 @@ $(GLOBJ)memento.$(OBJ) : $(GLSRC)memento.c $(valgrind_h) $(memento_h)\ $(malloc__h) $(GLCC) $(GLO_)memento.$(OBJ) $(C_) $(GLSRC)memento.c +$(AUX)memento.$(OBJ) : $(GLSRC)memento.c $(valgrind_h) $(memento_h)\ + $(malloc__h) + $(GLCCAUX) $(AUXO_)memento.$(OBJ) $(C_) $(GLSRC)memento.c + $(GLOBJ)gsmemory.$(OBJ) : $(GLSRC)gsmemory.c $(memory__h)\ $(gdebug_h)\ $(gsmdebug_h) $(gsmemory_h) $(gsrefct_h) $(gsstruct_h) $(gstypes_h) @@ -257,6 +264,11 @@ $(GLOBJ)gpmisc.$(OBJ) : $(GLSRC)gpmisc.c\ $(memory__h) $(string__h) $(gp_h) $(gpgetenv_h) $(gpmisc_h) $(GLCC) $(GLO_)gpmisc.$(OBJ) $(C_) $(GLSRC)gpmisc.c +$(AUX)gpmisc.$(OBJ) : $(GLSRC)gpmisc.c\ + $(unistd__h) $(fcntl__h) $(stat__h) $(stdio__h)\ + $(memory__h) $(string__h) $(gp_h) $(gpgetenv_h) $(gpmisc_h) + $(GLCCAUX) $(AUXO_)gpmisc.$(OBJ) $(C_) $(GLSRC)gpmisc.c + # Command line argument list management $(GLOBJ)gsargs.$(OBJ) : $(GLSRC)gsargs.c\ $(ctype__h) $(stdio__h) $(string__h)\ @@ -270,10 +282,20 @@ $(GLOBJ)gsmisc.$(OBJ) : $(GLSRC)gsmisc.c $(AK) $(gx_h) $(gserrors_h)\ $(gpcheck_h) $(gserror_h) $(gxfarith_h) $(gxfixed_h) $(stdint__h) $(stdio__h) $(GLCC) $(GLO_)gsmisc.$(OBJ) $(C_) $(GLSRC)gsmisc.c +$(AUX)gsmisc.$(OBJ) : $(GLSRC)gsmisc.c $(AK) $(gx_h) $(gserrors_h)\ + $(vmsmath_h) $(std_h)\ + $(ctype__h) $(malloc__h) $(math__h) $(memory__h) $(string__h)\ + $(gpcheck_h) $(gserror_h) $(gxfarith_h) $(gxfixed_h) $(stdint__h) $(stdio__h) + $(GLCCAUX) $(AUXO_)gsmisc.$(OBJ) $(C_) $(GLSRC)gsmisc.c + $(GLOBJ)gslibctx.$(OBJ) : $(GLSRC)gslibctx.c $(AK) $(gp_h) $(gsmemory_h)\ $(gslibctx_h) $(stdio__h) $(string__h) $(GLCC) $(GLO_)gslibctx.$(OBJ) $(C_) $(GLSRC)gslibctx.c +$(AUX)gslibctx.$(OBJ) : $(GLSRC)gslibctx.c $(AK) $(gp_h) $(gsmemory_h)\ + $(gslibctx_h) $(stdio__h) $(string__h) + $(GLCCAUX) $(AUXO_)gslibctx.$(OBJ) $(C_) $(GLSRC)gslibctx.c + $(GLOBJ)gsnotify.$(OBJ) : $(GLSRC)gsnotify.c $(AK) $(gx_h) $(gserrors_h)\ $(gsnotify_h) $(gsstruct_h) $(GLCC) $(GLO_)gsnotify.$(OBJ) $(C_) $(GLSRC)gsnotify.c @@ -287,6 +309,11 @@ $(GLOBJ)gsutil.$(OBJ) : $(GLSRC)gsutil.c $(AK) $(memory__h) $(string__h)\ $(gsrect_h) $(gsuid_h) $(gsutil_h) $(gzstate_h) $(gxdcolor_h) $(GLCC) $(GLO_)gsutil.$(OBJ) $(C_) $(GLSRC)gsutil.c +$(AUX)gsutil.$(OBJ) : $(GLSRC)gsutil.c $(AK) $(memory__h) $(string__h)\ + $(gstypes_h) $(gserror_h) $(gserrors_h) $(gsmemory_h)\ + $(gsrect_h) $(gsuid_h) $(gsutil_h) $(gzstate_h) $(gxdcolor_h) + $(GLCCAUX) $(AUXO_)gsutil.$(OBJ) $(C_) $(GLSRC)gsutil.c + # MD5 digest md5_h=$(GLSRC)md5.h # We have to use a slightly different compilation approach in order to @@ -571,6 +598,12 @@ $(GLOBJ)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\ $(CP_) $(GLSRC)gscdef.c $(GLGEN)gscdefs.c $(GLCC) $(GLO_)gscdefs.$(OBJ) $(C_) $(GLGEN)gscdefs.c +$(AUX)gscdefs.$(OBJ) : $(GLSRC)gscdef.c\ + $(std_h) $(gscdefs_h) $(gconfigd_h) $(TOP_MAKEFILES) + $(RM_) $(AUX)gscdefs.c + $(CP_) $(GLSRC)gscdef.c $(AUX)gscdefs.c + $(GLCCAUX) $(AUXO_)gscdefs.$(OBJ) $(C_) $(AUX)gscdefs.c + $(GLOBJ)gxacpath.$(OBJ) : $(GLSRC)gxacpath.c $(AK) $(gx_h) $(gserrors_h)\ $(gsdcolor_h) $(gsrop_h) $(gsstate_h) $(gsstruct_h) $(gsutil_h)\ $(gxdevice_h) $(gxfixed_h) $(gxistate_h) $(gxpaint_h)\ @@ -2868,9 +2901,9 @@ $(GLOBJ)gsromfs0.$(OBJ) : $(GLSRC)gsromfs0.c $(stdint__h) # Define the ZLIB modules needed by mnkromfs here to factor it out of top makefiles # Also put the .h dependencies here for the same reason -MKROMFS_ZLIB_OBJS=$(GLOBJ)compress.$(OBJ) $(GLOBJ)deflate.$(OBJ) \ - $(GLOBJ)zutil.$(OBJ) $(GLOBJ)adler32.$(OBJ) $(GLOBJ)crc32.$(OBJ) \ - $(GLOBJ)trees.$(OBJ) +MKROMFS_ZLIB_OBJS=$(AUX)compress.$(OBJ) $(AUX)deflate.$(OBJ) \ + $(AUX)zutil.$(OBJ) $(AUX)adler32.$(OBJ) $(AUX)crc32.$(OBJ) \ + $(AUX)trees.$(OBJ) MKROMFS_COMMON_DEPS=$(stdpre_h) $(stdint__h) $(gsiorom_h) $(arch_h)\ $(gsmemret_h) $(gsmalloc_h) $(gsstype_h) $(gp_h) $(time__h) @@ -2931,6 +2964,10 @@ $(GLOBJ)gp_getnv.$(OBJ) : $(GLSRC)gp_getnv.c $(AK) $(stdio__h) $(string__h)\ $(gp_h) $(gsmemory_h) $(gstypes_h) $(GLCC) $(GLO_)gp_getnv.$(OBJ) $(C_) $(GLSRC)gp_getnv.c +$(AUX)gp_getnv.$(OBJ) : $(GLSRC)gp_getnv.c $(AK) $(stdio__h) $(string__h)\ + $(gp_h) $(gsmemory_h) $(gstypes_h) + $(GLCCAUX) $(AUXO_)gp_getnv.$(OBJ) $(C_) $(GLSRC)gp_getnv.c + # Standard implementation of gp_defaultpapersize. $(GLOBJ)gp_paper.$(OBJ) : $(GLSRC)gp_paper.c $(AK) $(gp_h) $(gx_h) $(GLCC) $(GLO_)gp_paper.$(OBJ) $(C_) $(GLSRC)gp_paper.c @@ -2959,11 +2996,21 @@ $(GLOBJ)gp_unifs.$(OBJ) : $(GLSRC)gp_unifs.c $(AK)\ $(stat__h) $(dirent__h) $(GLCC) $(GLO_)gp_unifs.$(OBJ) $(C_) $(GLSRC)gp_unifs.c +$(AUX)gp_unifs.$(OBJ) : $(GLSRC)gp_unifs.c $(AK)\ + $(memory__h) $(string__h) $(stdio__h) $(unistd__h) \ + $(gx_h) $(gp_h) $(gpmisc_h) $(gsstruct_h) $(gsutil_h) \ + $(stat__h) $(dirent__h) + $(GLCCAUX) $(AUXO_)gp_unifs.$(OBJ) $(C_) $(GLSRC)gp_unifs.c + # Unix(-like) file name syntax, *not* used by Desqview/X. $(GLOBJ)gp_unifn.$(OBJ) : $(GLSRC)gp_unifn.c $(AK) $(gx_h) $(gp_h) $(gpmisc_h)\ $(gsutil_h) $(GLCC) $(GLO_)gp_unifn.$(OBJ) $(C_) $(GLSRC)gp_unifn.c +$(AUX)gp_unifn.$(OBJ) : $(GLSRC)gp_unifn.c $(AK) $(gx_h) $(gp_h) $(gpmisc_h)\ + $(gsutil_h) + $(GLCCAUX) $(AUXO_)gp_unifn.$(OBJ) $(C_) $(GLSRC)gp_unifn.c + # Pipes. These are actually the same on all platforms that have them. pipe_=$(GLOBJ)gdevpipe.$(OBJ) diff --git a/gs/base/msvccmd.mak b/gs/base/msvccmd.mak index 9f4a1eb59..52d65c2f0 100644 --- a/gs/base/msvccmd.mak +++ b/gs/base/msvccmd.mak @@ -242,6 +242,8 @@ CC_NO_WARN=$(CC_) # Compiler for auxiliary programs CCAUX=$(COMPAUX) $(VC8WARN) $(CFLAGS) +CCAUX_=$(COMPAUX) $(VC8WARN) $(CFLAGS) /c +CCAUX_NO_WARN=$(COMPAUX) $(CFLAGS) /c # Compiler for Windows programs. CCWINFLAGS=$(COMPILE_FULL_OPTIMIZED) diff --git a/gs/base/msvctail.mak b/gs/base/msvctail.mak index 273528711..e1b39fa71 100644 --- a/gs/base/msvctail.mak +++ b/gs/base/msvctail.mak @@ -28,7 +28,9 @@ $(GLGENDIR)\ccf32.tr: $(TOP_MAKEFILES) -if not exist $(PSGENDIR)$(D)cups mkdir $(PSGENDIR)$(D)cups -if not exist $(GLOBJDIR) mkdir $(GLOBJDIR) -if not exist $(GLGENDIR) mkdir $(GLGENDIR) + -if not exist $(AUXDIR) mkdir $(AUXDIR) -if not exist $(BINDIR) mkdir $(BINDIR) + echo msvctail.mak auxdir=$(AUXDIR) echo $(GENOPT) -DCHECK_INTERRUPTS -D_Windows -D__WIN32__ > $(GLGENDIR)\ccf32.tr $(ECHOGS_XE): $(GLSRC)echogs.c @@ -39,26 +41,26 @@ $(ECHOGS_XE): $(GLSRC)echogs.c !ifdef WIN64 # The genarch.exe that is generated is 64-bit, so the OS must be able to run it $(GENARCH_XE): $(GLSRC)genarch.c $(GENARCH_DEPS) $(GLGENDIR)\ccf32.tr - $(CC) @$(GLGENDIR)\ccf32.tr /Fo$(GLOBJ)genarch.obj $(GLSRC)genarch.c - $(LINK) $(LCT) $(LINKLIBPATH) $(GLOBJ)genarch.obj /OUT:$(GENARCH_XE) + $(CCAUX) @$(GLGENDIR)\ccf32.tr /Fo$(AUXDIR)genarch.obj $(GLSRC)genarch.c + $(LINK) $(LCT) $(LINKLIBPATH) $(AUX)genarch.obj /OUT:$(GENARCH_XE) !else $(GENARCH_XE): $(GLSRC)genarch.c $(GENARCH_DEPS) $(GLGENDIR)\ccf32.tr - $(CCAUX) @$(GLGENDIR)\ccf32.tr /Fo$(GLOBJ)genarch.obj /Fe$(GENARCH_XE) $(GLSRC)genarch.c $(CCAUX_TAIL) + $(CCAUX) @$(GLGENDIR)\ccf32.tr /Fo$(AUX)genarch.obj /Fe$(GENARCH_XE) $(GLSRC)genarch.c $(CCAUX_TAIL) !endif !endif $(GENCONF_XE): $(GLSRC)genconf.c $(GENCONF_DEPS) - $(CCAUX) $(GLSRC)genconf.c /Fo$(GLOBJ)genconf.obj /Fe$(GENCONF_XE) $(CCAUX_TAIL) + $(CCAUX) $(GLSRC)genconf.c /Fo$(AUX)genconf.obj /Fe$(GENCONF_XE) $(CCAUX_TAIL) $(GENDEV_XE): $(GLSRC)gendev.c $(GENDEV_DEPS) - $(CCAUX) $(GLSRC)gendev.c /Fo$(GLOBJ)gendev.obj /Fe$(GENDEV_XE) $(CCAUX_TAIL) + $(CCAUX) $(GLSRC)gendev.c /Fo$(AUX)gendev.obj /Fe$(GENDEV_XE) $(CCAUX_TAIL) $(GENHT_XE): $(GLSRC)genht.c $(GENHT_DEPS) - $(CCAUX) $(GENHT_CFLAGS) $(GLSRC)genht.c /Fo$(GLOBJ)genht.obj /Fe$(GENHT_XE) $(CCAUX_TAIL) + $(CCAUX) $(GENHT_CFLAGS) $(GLSRC)genht.c /Fo$(AUX)genht.obj /Fe$(GENHT_XE) $(CCAUX_TAIL) MKROMFS_OBJS=$(MKROMFS_ZLIB_OBJS) $(winplat_) $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gp_getnv.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ) $(MKROMFS_XE): $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS) - $(CCAUX) -I$(GLOBJ) -I$(ZSRCDIR) @$(GLGENDIR)\ccf32.tr $(GLSRC)mkromfs.c /Fo$(GLOBJ)mkromfs.obj /Fe$(MKROMFS_XE) $(MKROMFS_OBJS) $(CCAUX_TAIL) /DEBUG + $(CCAUX) -I$(GLOBJ) -I$(ZSRCDIR) @$(GLGENDIR)\ccf32.tr $(GLSRC)mkromfs.c /Fo$(AUX)mkromfs.obj /Fe$(MKROMFS_XE) $(MKROMFS_OBJS) $(CCAUX_TAIL) /DEBUG # -------------------------------- Library -------------------------------- # diff --git a/gs/base/unix-aux.mak b/gs/base/unix-aux.mak index e56c2f403..9a6dbedc1 100644 --- a/gs/base/unix-aux.mak +++ b/gs/base/unix-aux.mak @@ -37,6 +37,11 @@ $(GLOBJ)gp_unix.$(OBJ): $(GLSRC)gp_unix.c $(AK)\ $(gx_h) $(gsexit_h) $(gp_h) $(GLCC) $(FONTCONFIG_CFLAGS) $(GLO_)gp_unix.$(OBJ) $(C_) $(GLSRC)gp_unix.c +$(AUX)gp_unix.$(OBJ): $(GLSRC)gp_unix.c $(AK)\ + $(pipe__h) $(string__h) $(time__h)\ + $(gx_h) $(gsexit_h) $(gp_h) + $(GLCCAUX) $(FONTCONFIG_CFLAGS) $(AUXO_)gp_unix.$(OBJ) $(C_) $(GLSRC)gp_unix.c + $(GLOBJ)gp_unix_cache.$(OBJ): $(GLSRC)gp_unix_cache.c $(AK)\ $(stdio__h) $(string__h) $(time__h) $(gconfigd_h) $(gp_h) $(md5_h) $(GLCC) $(GLO_)gp_unix_cache.$(OBJ) $(C_) $(GLSRC)gp_unix_cache.c @@ -46,6 +51,10 @@ $(GLOBJ)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK)\ $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h) $(GLCC) $(GLO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c +$(AUX)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK)\ + $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h) + $(GLCCAUX) $(AUXO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c + # System V platforms other than SVR4, which lack some system calls, # but have pipes. sysv__=$(GLOBJ)gp_getnv.$(OBJ) $(GLOBJ)gp_upapr.$(OBJ) $(GLOBJ)gp_unix.$(OBJ) $(GLOBJ)gp_unifs.$(OBJ) $(GLOBJ)gp_unifn.$(OBJ) $(GLOBJ)gp_sysv.$(OBJ) @@ -77,10 +86,10 @@ $(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) # To get GS to use the system zlib, you remove/hide the gs/zlib directory # which means that the mkromfs build can't find the zlib source it needs. # So it's split into two targets, one using the zlib source directly..... -MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(GLOBJ)gscdefs.$(OBJ) $(GLOBJ)gsmisc.$(OBJ) \ - $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gslibctx.$(OBJ) $(GLOBJ)gp_getnv.$(OBJ) \ - $(GLOBJ)gp_unix.$(OBJ) $(GLOBJ)gp_unifs.$(OBJ) $(GLOBJ)gp_unifn.$(OBJ) \ - $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gsutil.$(OBJ) $(GLOBJ)memento.$(OBJ) +MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gscdefs.$(OBJ) $(AUX)gsmisc.$(OBJ) \ + $(AUX)gpmisc.$(OBJ) $(AUX)gslibctx.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ + $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ + $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) $(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(CCAUX) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) -lm $(EXTRALIBS) diff --git a/gs/base/unix-end.mak b/gs/base/unix-end.mak index 4ceeb2940..7e2bc1b27 100644 --- a/gs/base/unix-end.mak +++ b/gs/base/unix-end.mak @@ -19,6 +19,7 @@ STDDIRS: @if test ! -d $(BINDIR); then mkdir $(BINDIR); fi @if test ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi @if test ! -d $(GLOBJDIR); then mkdir $(GLOBJDIR); fi + @if test ! -d $(AUXDIR); then mkdir $(AUXDIR); fi @if test ! -d $(PSGENDIR); then mkdir $(PSGENDIR); fi @if test ! -d $(PSGENDIR)/cups; then mkdir $(PSGENDIR)/cups; fi @if test ! -d $(PSOBJDIR); then mkdir $(PSOBJDIR); fi diff --git a/gs/base/zlib.mak b/gs/base/zlib.mak index 008514d8f..3663d02a9 100644 --- a/gs/base/zlib.mak +++ b/gs/base/zlib.mak @@ -19,6 +19,7 @@ # ZOBJDIR - the object directory # SHARE_ZLIB - 0 to compile zlib, 1 to share # ZLIB_NAME - if SHARE_ZLIB=1, the name of the shared library +# ZAUXDIR - the directory for auxiliary objects # This partial makefile compiles the zlib library for use in Ghostscript. # You can get the source code for this library from: @@ -43,13 +44,17 @@ ZSRC=$(ZSRCDIR)$(D) ZGEN=$(ZGENDIR)$(D) ZOBJ=$(ZOBJDIR)$(D) +ZAUX=$(ZAUXDIR)$(D) ZO_=$(O_)$(ZOBJ) +ZAO_=$(O_)$(ZAUX) # We need D_, _D_, and _D because the OpenVMS compiler uses different # syntax from other compilers. # ZI_ and ZF_ are defined in gs.mak. ZCCFLAGS=$(I_)$(ZI_)$(_I) $(ZF_) $(D_)verbose$(_D_)-1$(_D) ZCC=$(CC_) $(ZCCFLAGS) +ZCCAUXFLAGS=$(I_)$(ZI_)$(_I) $(ZF_) $(D_)verbose$(_D_)-1$(_D) +ZCCAUX=$(CCAUX_) $(ZCCAUXFLAGS) # Define the name of this makefile. ZLIB_MAK=$(GLSRC)zlib.mak @@ -160,3 +165,25 @@ $(ZOBJ)infutil.$(OBJ) : $(ZSRC)infutil.c $(ZDEP) $(ZOBJ)uncompr.$(OBJ) : $(ZSRC)uncompr.c $(ZDEP) $(ZCC) $(ZO_)uncompr.$(OBJ) $(C_) $(ZSRC)uncompr.c +# Auxiliary objects + +$(ZAUX)adler32.$(OBJ) : $(ZSRC)adler32.c $(ZDEP) + $(ZCCAUX) $(ZAO_)adler32.$(OBJ) $(C_) $(ZSRC)adler32.c + +$(ZAUX)deflate.$(OBJ) : $(ZSRC)deflate.c $(ZDEP) + $(ZCCAUX) $(ZAO_)deflate.$(OBJ) $(C_) $(ZSRC)deflate.c + +# new file in zlib 1.2.x +$(ZAUX)compress.$(OBJ) : $(ZSRC)compress.c $(ZDEP) + $(ZCCAUX) $(ZAO_)compress.$(OBJ) $(C_) $(ZSRC)compress.c + +$(ZAUX)trees.$(OBJ) : $(ZSRC)trees.c $(ZDEP) + $(ZCCAUX) $(ZAO_)trees.$(OBJ) $(C_) $(ZSRC)trees.c + +$(ZAUX)zutil.$(OBJ) : $(ZSRC)zutil.c $(ZDEP) + $(ZCCAUX) $(ZAO_)zutil.$(OBJ) $(C_) $(ZSRC)zutil.c + +# We have to compile crc32 without warnings, because it defines 32-bit +# constants that produces gcc warnings with -Wtraditional. +$(ZAUX)crc32.$(OBJ) : $(ZSRC)crc32.c $(ZDEP) + $(CCAUX_NO_WARN) $(ZCCAUXFLAGS) $(ZAO_)crc32.$(OBJ) $(C_) $(ZSRC)crc32.c diff --git a/gs/psi/msvc.mak b/gs/psi/msvc.mak index 7e3993fc3..04e2cd8b3 100644 --- a/gs/psi/msvc.mak +++ b/gs/psi/msvc.mak @@ -58,6 +58,28 @@ DEFAULT_OBJ_DIR=.\obj !endif !endif +!if "$(DEBUG)"=="1" +!ifdef WIN64 +AUXDIR=.\debugaux64 +!else +AUXDIR=.\debugaux +!endif +!else +!if "$(DEBUGSYM)"=="1" +!ifdef WIN64 +AUXDIR=.\profaux64 +!else +AUXDIR=.\profaux +!endif +!else +!ifdef WIN64 +AUXDIR=.\aux64 +!else +AUXDIR=.\aux32 +!endif +!endif +!endif + # Note that 32-bit and 64-bit binaries reside in a common directory # since the names are unique !ifndef BINDIR diff --git a/gs/psi/os2.mak b/gs/psi/os2.mak index 2a0d78f70..ff10bac84 100644 --- a/gs/psi/os2.mak +++ b/gs/psi/os2.mak @@ -31,6 +31,7 @@ BINDIR=bin GLSRCDIR=base GLGENDIR=obj GLOBJDIR=obj +AUXDIR=aux PSSRCDIR=psi PSLIBDIR=lib PSRESDIR=Resource @@ -381,8 +382,11 @@ GENOPT=$(CD) $(CGDB) $(CDLL) $(CO) $(CPNG) CCFLAGS0=$(GENOPT) $(PLATOPT) -D__OS2__ $(GCIFLAGS) CCFLAGS=$(CCFLAGS0) CC=$(COMPDIR)\$(COMP) $(CCFLAGS0) +CCAUX=$(CC) CC_=$(CC) +CCAUX_=$(CCAUX) CC_NO_WARN=$(CC_) +CCAUX_NO_WARN=$(CCAUX_) CC_SHARED=$(CC_) # ------ Devices and features ------ # @@ -524,6 +528,7 @@ $(ECHOGS_XE): $(GLSRCDIR)\echogs.c $(GENARCH_XE): $(GLSRCDIR)\genarch.c $(GENARCH_DEPS) -mkdir $(GLGENDIR) -mkdir $(BINDIR) + -mkdir $(AUXDIR) !if $(EMX) $(CCAUX) -DHAVE_LONG_LONG -o $(AUXGEN)genarch $(GLSRCDIR)\genarch.c $(COMPDIR)\emxbind $(EMXPATH)/bin/emxl.exe $(AUXGEN)genarch $(GENARCH_XE) |