diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2008-01-09 17:23:58 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2008-01-09 17:23:58 +0000 |
commit | 569df5ea2bfdfdb30224b43b6f44d92d9c82040d (patch) | |
tree | 0a8b5c22f4b73fa01892c6517599645404464843 | |
parent | eb7ecee6b562cb28f49cbe62b08f1d3effb7c2bf (diff) |
GS client makefile refactoring. The project is under development and
should not be released. The important difference is the recursive
make invocations of the gs lib (i.e. ugcclib.mak) makefile have been
replaced with directly including the low level gs makefiles. Using
this scheme the excessive number of makefile variables reguired to
build gs can be set once and simply. The disadvantage is there is no
longer a separate name space for client makefile targets.
The following separate changes were made because it was a convenient
time to do them:
1) XPS is now standalone (does not require) pcl
2) plimpl.c can be compiled to build all combinations of languages
with modest supporting makefile changes.
3) Rampant duplication was reduced. pcl6_gcc.mak and pcl6_msvc.mak
contain most of the options necessary for building the clients. xps
and the language switch configurations need only customize a few of
these make variables.
TODO
1) clean does not work in any configuration.
2) more refactoring to remove duplication is needed.
3) compile_inits=1 does not yet work.
4) throw all of this nonsense away and use cmake.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@3004 06663e23-700e-0410-b217-a244a6096597
-rw-r--r-- | Makefile | 32 | ||||
-rw-r--r-- | common/ugcc_top.mak | 158 | ||||
-rw-r--r-- | language_switch/pspcl6_gcc.mak | 62 | ||||
-rw-r--r-- | main/pcl6_gcc.mak | 65 | ||||
-rw-r--r-- | pl/plimpl.c | 6 | ||||
-rw-r--r-- | xps/xps.mak | 10 | ||||
-rw-r--r-- | xps/xps_gcc.mak | 23 |
7 files changed, 129 insertions, 227 deletions
@@ -16,10 +16,10 @@ product: pcl # specific front-end targets pcl: - $(MAKE) -C main -f pcl6_gcc.mak product # build PCL and PCLXL. + $(MAKE) -C main -f pcl6_gcc.mak pdl_product # build PCL and PCLXL. pcl_debug: - $(MAKE) -C main -f pcl6_gcc.mak debug + $(MAKE) -C main -f pcl6_gcc.mak pdl_debug fonts: mkdir -p /windows/fonts/ # make a font directory. 2 @@ -27,7 +27,7 @@ fonts: touch fonts pcl_profile: - $(MAKE) -C main -f pcl6_gcc.mak pg + $(MAKE) -C main -f pcl6_gcc.mak pdl_pg pcl_install: install main/obj/pcl6 /usr/local/bin @@ -44,17 +44,17 @@ pcl_test: # names here so they could be removed individually. pcl_clean: - $(MAKE) -C main -f pcl6_gcc.mak clean + $(MAKE) -C main -f pcl6_gcc.mak pdl_clean rm -f fonts xps_debug: - $(MAKE) -C xps -f xps_gcc.mak debug + $(MAKE) -C xps -f xps_gcc.mak pdl_debug xps: $(MAKE) -C xps -f xps_gcc.mak # build XPS xps_clean: - $(MAKE) -C xps -f xps_gcc.mak clean + $(MAKE) -C xps -f xps_gcc.mak pdl_clean #### UFST LIBRARY DEPENDENCY RULES #### @@ -64,13 +64,13 @@ ufst: #### LANGUAGE SWITCHING PRODUCT RULES #### ls_profile: - $(MAKE) -C language_switch -f pspcl6_gcc.mak pg + $(MAKE) -C language_switch -f pspcl6_gcc.mak pdl_pg ls_product: - $(MAKE) -C language_switch -f pspcl6_gcc.mak product # build PS/PCL/XL. + $(MAKE) -C language_switch -f pspcl6_gcc.mak pdl_product # build PS/PCL/XL. ls_debug: - $(MAKE) -C language_switch -f pspcl6_gcc.mak debug + $(MAKE) -C language_switch -f pspcl6_gcc.mak pdl_debug ls_fonts: mkdir -p /windows/fonts/ # make a font directory. 2 @@ -94,37 +94,37 @@ check: # names here so they could be removed individually. ls_clean: - $(MAKE) -C language_switch -f pspcl6_gcc.mak clean + $(MAKE) -C language_switch -f pspcl6_gcc.mak pdl_clean rm -f fonts /usr/local/bin/pspcl6 # shortcuts for common build types. ls_uproduct: ufst - $(MAKE) -C language_switch -f pspcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" + $(MAKE) -C language_switch -f pspcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" pdl_product cp *.icc ./language_switch/ufst-obj cp wts_* ./language_switch/ufst-obj ls_udebug: ufst - $(MAKE) -C language_switch -f pspcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" debug + $(MAKE) -C language_switch -f pspcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" pdl_debug cp *.icc ./language_switch/ufst-obj cp wts_* ./language_switch/ufst-obj ls_uclean: - $(MAKE) -C language_switch -f pspcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" clean + $(MAKE) -C language_switch -f pspcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" pdl_clean $(MAKE) -C ufst/rts/lib -f makefile.artifex clean uproduct: ufst - $(MAKE) -C main -f pcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" product + $(MAKE) -C main -f pcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" pdl_product cp *.icc ./main/ufst-obj cp wts_* ./main/ufst-obj udebug: ufst - $(MAKE) -C main -f pcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-debugobj" debug + $(MAKE) -C main -f pcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-debugobj" pdl_debug cp *.icc ./main/ufst-debugobj cp wts_* ./main/ufst-debugobj uclean: - $(MAKE) -C main -f pcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" clean + $(MAKE) -C main -f pcl6_gcc.mak PL_SCALER=ufst GENDIR="./ufst-obj" pdl_clean $(MAKE) -C ufst/rts/lib -f makefile.artifex clean all_debug: pcl_debug udebug ls_debug ls_udebug xps_debug diff --git a/common/ugcc_top.mak b/common/ugcc_top.mak index 3cdcb2438..673617223 100644 --- a/common/ugcc_top.mak +++ b/common/ugcc_top.mak @@ -12,7 +12,7 @@ # # ugcc_top.mak # Generic top-level makefile for Unix/gcc platforms. - +# # The product-specific top-level makefile defines the following: # MAKEFILE, CCLD, COMMONDIR, CONFIG, DEVICE_DEVS, # GCFLAGS, GENDIR, GLSRCDIR, GLGENDIR, GLOBJDIR, PSD @@ -26,154 +26,88 @@ include $(COMMONDIR)/gccdefs.mak include $(COMMONDIR)/unixdefs.mak include $(COMMONDIR)/generic.mak -# HACK - allow pcl and xl to see gs header definitions +# these gems were plucked from the old ugcclib.mak. The CC options +# seem to be out of sync. +BINDIR=./libobj +PSRESDIR=./Resource +GLD=$(GLGENDIR)/ +CCFLAGS=$(GENOPT) $(CFLAGS) +CC_=$(CC) $(CCFLAGS) +CCAUX=$(CC) +CC_NO_WARN=$(CC_) -Wno-cast-qual -Wno-traditional +CC_SHARED=$(CC_) + +include $(GLSRCDIR)/unixhead.mak +include $(GLSRCDIR)/gs.mak include $(GLSRCDIR)/lib.mak +include $(GLSRCDIR)/int.mak +include $(GLSRCDIR)/jpeg.mak +# zlib.mak must precede libpng.mak +include $(GLSRCDIR)/zlib.mak +include $(GLSRCDIR)/libpng.mak +include $(GLSRCDIR)/jbig2.mak +include $(GLSRCDIR)/icclib.mak +include $(GLSRCDIR)/ijs.mak +include $(GLSRCDIR)/devs.mak +include $(GLSRCDIR)/contrib.mak +include $(GLSRCDIR)/unix-aux.mak +include $(GLSRCDIR)/unix-end.mak +include $(GLSRCDIR)/version.mak + + +UGCC_TOP_DIR: + @if test ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi # Configure for debugging -debug: - $(MAKE) -f $(firstword $(MAKEFILE)) GENOPT='-DDEBUG' CFLAGS='-ggdb -g3 -O0 $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS)' +pdl_debug: UGCC_TOP_DIR + $(MAKE) -f $(firstword $(MAKEFILE)) GENOPT='-DDEBUG' CFLAGS='-ggdb -g3 -O0 $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS)' pdl_default -pg-with-cov: - $(MAKE) -f $(firstword $(MAKEFILE)) GENDIR=$(PGGENDIR) GENOPT='' CFLAGS='-g -pg -O2 -fprofile-arcs -ftest-coverage $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS) -pg -fprofile-arcs -ftest-coverage -static' +pdl_pg-with-cov: UGCC_TOP_DIR + $(MAKE) -f $(firstword $(MAKEFILE)) GENDIR=$(PGGENDIR) GENOPT='' CFLAGS='-g -pg -O2 -fprofile-arcs -ftest-coverage $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS) -pg -fprofile-arcs -ftest-coverage' pdl_default # Configure for profiling -pg: - $(MAKE) -f $(firstword $(MAKEFILE)) GENDIR=$(PGGENDIR) GENOPT='' CFLAGS='-g -pg -O2 $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS) -pg -static' +pdl_pg: UGCC_TOP_DIR + $(MAKE) -f $(firstword $(MAKEFILE)) GENDIR=$(PGGENDIR) GENOPT='' CFLAGS='-g -pg -O2 $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS) -pg' pdl_default # Configure for optimization. -product: - $(MAKE) -f $(firstword $(MAKEFILE)) GENOPT='' GCFLAGS='$(GCFLAGS)' CFLAGS='-O2 $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS)' +pdl_product: UGCC_TOP_DIR + $(MAKE) -f $(firstword $(MAKEFILE)) GENOPT='' GCFLAGS='$(GCFLAGS)' CFLAGS='-O2 $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS)' pdl_default clean_gs: $(MAKE) -f $(GLSRCDIR)/ugcclib.mak \ GLSRCDIR='$(GLSRCDIR)' GLGENDIR='$(GLGENDIR)' \ GLOBJDIR='$(GLOBJDIR)' clean -ifeq ($(PSICFLAGS), -DPSI_INCLUDED) -# Build the required GS library files. It's simplest always to build -# the floating point emulator, even though we don't always link it in. -# HACK * HACK * HACK - we force this make to occur since we have no -# way to determine if gs files are out of date. -$(GENDIR)/ldgs.tr: FORCE - -mkdir $(GLGENDIR) - -mkdir $(GLOBJDIR) - $(MAKE) \ - CCAUX='$(CCAUX)'\ - GCFLAGS='$(GCFLAGS)' \ - CONFIG='$(CONFIG)' FEATURE_DEVS='$(FEATURE_DEVS)' \ - XINCLUDE='$(XINCLUDE)' XLIBDIRS='$(XLIBDIRS)' XLIBDIR='$(XLIBDIR)' XLIBS='$(XLIBS)' \ - DEVICE_DEVS='$(DEVICE_DEVS) $(DD)bbox.dev' \ - DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= DEVICE_DEVS4= \ - DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \ - DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \ - DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \ - DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \ - DEVICE_DEVS21= STDLIBS=$(STDLIBS) \ - SYNC=$(SYNC) \ - BAND_LIST_STORAGE=memory BAND_LIST_COMPRESSOR=zlib \ - ZSRCDIR=$(ZSRCDIR) ZGENDIR=$(ZGENDIR) ZOBJDIR=$(ZOBJDIR) ZLIB_NAME=$(ZLIB_NAME) SHARE_ZLIB=$(SHARE_ZLIB) \ - JSRCDIR=$(JSRCDIR) JGENDIR=$(JGENDIR) JOBJDIR=$(JOBJDIR) \ - GLSRCDIR='$(GLSRCDIR)' PSSRCDIR=$(PSSRCDIR) PSGENDIR=$(GENDIR) PSD='$(GENDIR)/' \ - GLGENDIR='$(GLGENDIR)' GLOBJDIR='$(GLOBJDIR)' PSLIBDIR=$(PSLIBDIR) \ - EXPATSRCDIR=$(EXPATSRCDIR) SHARE_EXPAT=$(SHARE_EXPAT) \ - EXPAT_CFLAGS=$(EXPAT_CFLAGS) \ - ICCSRCDIR=$(ICCSRCDIR) IMDISRCDIR=$(IMDISRCDIR) \ - COMPILE_INITS=$(COMPILE_INITS) PCLXL_ROMFS_ARGS='$(PCLXL_ROMFS_ARGS)' PJL_ROMFS_ARGS='$(PJL_ROMFS_ARGS)' \ - UFST_ROOT=$(UFST_ROOT) UFST_BRIDGE=$(UFST_BRIDGE) UFST_LIB_EXT=$(UFST_LIB_EXT) \ - UFST_ROMFS_ARGS='$(UFST_ROMFS_ARGS)' \ - PNGSRCDIR=$(PNGSRCDIR) \ - SHARE_LIBPNG=$(SHARE_LIBPNG) PNGCCFLAGS=$(PNGCCFLAGS) \ - PSOBJDIR=$(GENDIR) IJSSRCDIR=../gs/ijs \ - -f $(GLSRCDIR)/unix-gcc.mak\ - $(GLOBJDIR)/ld.tr \ - $(GLOBJDIR)/gsargs.o \ - $(GLOBJDIR)/gconfig.o $(GLOBJDIR)/gscdefs.o $(GLOBJDIR)/iconfig.$(OBJ) \ - $(GLOBJDIR)/iccinit$(COMPILE_INITS).$(OBJ) - cp $(GLOBJDIR)/ld.tr $(GENDIR)/ldgs.tr - -FORCE: - -else - -# COMPILE_INITS=1 means we need to make sure the gsromfs is built (PS includes -# it in 'int.mak' -ifeq ($(COMPILE_INITS), 1) -ROMFS=$(GLOBJDIR)/gsromfs.o -endif - -# Build the required GS library files. It's simplest always to build -# the floating point emulator, even though we don't always link it in. -# HACK * HACK * HACK - we force this make to occur since we have no -# way to determine if gs files are out of date. -# We make a dummy gs_init.ps since this is hard coded as a dependency of gsromfs.c -# to avoid having to define everything in the top level makefiles (also of a hack) -$(GENDIR)/ldgs.tr: FORCE - -mkdir $(GLGENDIR) - -mkdir $(GLOBJDIR) - touch $(GLOBJDIR)/gs_init.ps - $(MAKE) \ - CCAUX='$(CCAUX)'\ - GCFLAGS='$(GCFLAGS)' \ - CONFIG='$(CONFIG)' FEATURE_DEVS='$(FEATURE_DEVS)' \ - XINCLUDE='$(XINCLUDE)' XLIBDIRS='$(XLIBDIRS)' XLIBDIR='$(XLIBDIR)' XLIBS='$(XLIBS)' \ - DEVICE_DEVS='$(DEVICE_DEVS) $(DD)bbox.dev' \ - STDLIBS=$(STDLIBS) \ - SYNC=$(SYNC) \ - BAND_LIST_STORAGE=memory BAND_LIST_COMPRESSOR=zlib \ - ZSRCDIR=$(ZSRCDIR) ZGENDIR=$(ZGENDIR) ZOBJDIR=$(ZOBJDIR) ZLIB_NAME=$(ZLIB_NAME) SHARE_ZLIB=$(SHARE_ZLIB) \ - JSRCDIR=$(JSRCDIR) JGENDIR=$(JGENDIR) JOBJDIR=$(JOBJDIR) \ - GLSRCDIR='$(GLSRCDIR)' PSSRCDIR=$(PSSRCDIR) PSGENDIR=$(GENDIR) PSD='$(GENDIR)/' \ - GLGENDIR='$(GLGENDIR)' GLOBJDIR='$(GLOBJDIR)' PSLIBDIR=$(PSLIBDIR) \ - EXPATSRCDIR=$(EXPATSRCDIR) SHARE_EXPAT=$(SHARE_EXPAT) \ - EXPAT_CFLAGS=$(EXPAT_CFLAGS) \ - ICCSRCDIR=$(ICCSRCDIR) IMDISRCDIR=$(IMDISRCDIR) \ - COMPILE_INITS=$(COMPILE_INITS) PCLXL_ROMFS_ARGS='$(PCLXL_ROMFS_ARGS)' PJL_ROMFS_ARGS='$(PJL_ROMFS_ARGS)' \ - UFST_ROOT=$(UFST_ROOT) UFST_BRIDGE=$(UFST_BRIDGE) UFST_LIB_EXT=$(UFST_LIB_EXT) \ - UFST_ROMFS_ARGS='$(UFST_ROMFS_ARGS)' \ - UFST_CFLAGS='$(UFST_CFLAGS)' \ - PNGSRCDIR=$(PNGSRCDIR) \ - SHARE_LIBPNG=$(SHARE_LIBPNG) PNGCCFLAGS=$(PNGCCFLAGS) \ - PSOBJDIR=$(GENDIR) IJSSRCDIR=../gs/ijs \ - -f $(GLSRCDIR)/ugcclib.mak \ - $(GLOBJDIR)/ld.tr \ - $(GLOBJDIR)/gsargs.o \ - $(GLOBJDIR)/gconfig.o $(GLOBJDIR)/gscdefs.o $(ROMFS) - cp $(GLOBJDIR)/ld.tr $(GENDIR)/ldgs.tr - -FORCE: - -endif - # Build the configuration file. $(GENDIR)/pconf.h $(GENDIR)/ldconf.tr: $(TARGET_DEVS) $(GLOBJDIR)/genconf$(XE) $(GLOBJDIR)/genconf -n - $(TARGET_DEVS) -h $(GENDIR)/pconf.h -p "%s&s&&" -o $(GENDIR)/ldconf.tr # Create a library -$(TARGET_LIB): $(GENDIR)/ldgs.tr $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) +$(TARGET_LIB): $(ld_tr) $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) $(ECHOGS_XE) -w $(GENDIR)/ldall.tr -n - $(AR) $(ARFLAGS) $@ $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(TOP_OBJ) $(GLOBJDIR)/gsargs.o $(GLOBJDIR)/gconfig.o $(GLOBJDIR)/gscdefs.o -s $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(XOBJS) -s - cat $(GENDIR)/ldgs.tr $(GENDIR)/ldconf.tr | grep ".o" >>$(GENDIR)/ldall.tr + cat $(GENDIR)/ldt.tr $(GENDIR)/ldconf.tr | grep ".o" >>$(GENDIR)/ldall.tr $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -s - $(MAIN_OBJ) LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; sh <$(GENDIR)/ldall.tr ifeq ($(PSICFLAGS), -DPSI_INCLUDED) # Link a Unix executable. -$(TARGET_XE): $(GENDIR)/ldgs.tr $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) +$(TARGET_XE): $(ld_tr) $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) $(ECHOGS_XE) -w $(GENDIR)/ldall.tr -n - $(CCLD) $(LDFLAGS) $(XLIBDIRS) -o $(TARGET_XE) - $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(TOP_OBJ) -s + $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(TOP_OBJ) -s $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(XOBJS) -s - cat $(GENDIR)/ldgs.tr $(GENDIR)/ldconf.tr >>$(GENDIR)/ldall.tr + cat $(ld_tr) $(GENDIR)/ldconf.tr >>$(GENDIR)/ldall.tr $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -s - $(MAIN_OBJ) $(EXTRALIBS) $(STDLIBS) sh <$(GENDIR)/ldall.tr else # Link a Unix executable. -$(TARGET_XE): $(GENDIR)/ldgs.tr $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) +$(TARGET_XE): $(ld_tr) $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) $(GLOBJDIR)/gsargs.o $(GLOBJDIR)/gconfig.o $(GLOBJDIR)/gscdefs.o $(ECHOGS_XE) -w $(GENDIR)/ldall.tr -n - $(CCLD) $(LDFLAGS) $(XLIBDIRS) -o $(TARGET_XE) $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(TOP_OBJ) $(GLOBJDIR)/gsargs.o $(GLOBJDIR)/gconfig.o $(GLOBJDIR)/gscdefs.o -s $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(XOBJS) -s - cat $(GENDIR)/ldgs.tr $(GENDIR)/ldconf.tr >>$(GENDIR)/ldall.tr + cat $(ld_tr) $(GENDIR)/ldconf.tr >>$(GENDIR)/ldall.tr $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -s - $(MAIN_OBJ) $(EXTRALIBS) $(STDLIBS) sh <$(GENDIR)/ldall.tr endif diff --git a/language_switch/pspcl6_gcc.mak b/language_switch/pspcl6_gcc.mak index 01a3bfe71..80c78aeee 100644 --- a/language_switch/pspcl6_gcc.mak +++ b/language_switch/pspcl6_gcc.mak @@ -11,29 +11,15 @@ # Define the name of this makefile. MAKEFILE+= ../language_switch/pspcl6_gcc.mak -# Pick (uncomment) one font system technology -# afs (Artifex/gs native) or ufst (AGFA UFST) -PL_SCALER?=afs -#PL_SCALER?=ufst - -# The build process will put all of its output in this directory: -# GENDIR is defined in the 'base' makefile, but we need its value immediately -GENDIR?=./obj - # The sources are taken from these directories: -APPSRCDIR?=. MAINSRCDIR?=../main PSSRCDIR?=../gs/src PSISRCDIR?=../psi PSLIBDIR?=../gs/lib ICCSRCDIR?=../gs/icclib -PNGSRCDIR?=../gs/libpng # Path for including gs/Resource into romfs (replaces the gs default) : PSRESDIR?=../gs/Resource - -APP_CCC?=$(CC_) -I../pl -I../gs/src -I./obj $(C_) - # PLPLATFORM indicates should be set to 'ps' for language switch # builds and null otherwise. PLPLATFORM?=ps @@ -48,61 +34,35 @@ JGENDIR?=$(GENDIR) JOBJDIR?=$(GENDIR) ZGENDIR?=$(GENDIR) ZOBJDIR?=$(GENDIR) +PSD?=$(GENDIR)/ # Executable path\name w/o the .EXE extension TARGET_XE?=$(GENDIR)/pspcl6 # Main file's name PSI_TOP_OBJ?=$(PSIOBJDIR)/psitop.$(OBJ) -TOP_OBJ+= $(PSI_TOP_OBJ) - -# Choose COMPILE_INITS=1 for init files and fonts in ROM (otherwise =0) -COMPILE_INITS?=1 +PCL_TOP_OBJ?=$(PCLOBJDIR)/pctop.$(OBJ) +PXL_TOP_OBJ?=$(PXLOBJDIR)/pxtop.$(OBJ) -# defines for building PSI against UFST -ifeq ($(PL_SCALER), ufst) +TOP_OBJ=$(PSI_TOP_OBJ) $(PCL_TOP_OBJ) $(PXL_TOP_OBJ) -ifeq ($(COMPILE_INITS), 1) -UFSTFONTDIR=%rom%fontdata/ -else -UFSTFONTDIR=/usr/local/fontdata5.0/ -endif - -UFST_ROOT?=../ufst -FAPI_DEFS?= -DUFST_BRIDGE=1 -DUFST_LIB_EXT=.a -DGCCx86 -DUFST_ROOT=$(UFST_ROOT) -UFST_BRIDGE=1 -UFST_LIB_EXT=.a -endif - -GX_COLOR_INDEX_DEFINE?=-DGX_COLOR_INDEX_TYPE="unsigned long long" -# Stupid autoconf coupling -HAVE_STDINT_H_DEFINE?=-DHAVE_STDINT_H +# Choose COMPILE_INITS=1 for init files and fonts in ROM (otherwise =0) +COMPILE_INITS?=0 -# Assorted definitions. Some of these should probably be factored out.... -# We use -O0 for debugging, because optimization confuses gdb. -# Note that the omission of -Dconst= rules out the use of gcc versions -# between 2.7.0 and 2.7.2 inclusive. (2.7.2.1 is OK.) PSICFLAGS?=-DPSI_INCLUDED +PDL_INCLUDE_FLAGS?=-DPCL_INCLUDED $(PSICFLAGS) +DD=$(GLGENDIR)/ -# #define xxx_BIND is in std.h -# putting compile time bindings here will have the side effect of having different options -# based on application build. PSI_INCLUDED is and example of this. -EXPERIMENT_CFLAGS?= - -GCFLAGS?=-Wall -Wpointer-arith -Wstrict-prototypes -Wwrite-strings -DNDEBUG $(PSICFLAGS) $(EXPERIMENT_CFLAGS) $(HAVE_STDINT_H_DEFINE) $(GX_COLOR_INDEX_DEFINE) $(FAPI_DEFS) -CFLAGS?=-g -O0 $(GCFLAGS) $(XCFLAGS) $(PSICFLAGS) - -FEATURE_CORE ?= \ +FEATURE_DEVS ?= \ $(DD)psl3.dev \ $(DD)pdf.dev \ $(DD)dpsnext.dev \ $(DD)htxlib.dev \ $(DD)roplib.dev \ $(DD)ttfont.dev \ - $(DD)pipe.dev - -FEATURE_DEVS ?= $(FEATURE_CORE) $(DD)fapi.dev + $(DD)pipe.dev \ + $(DD)fapi.dev # "Subclassed" makefile include $(MAINSRCDIR)/pcl6_gcc.mak diff --git a/main/pcl6_gcc.mak b/main/pcl6_gcc.mak index 9903068fd..151b24022 100644 --- a/main/pcl6_gcc.mak +++ b/main/pcl6_gcc.mak @@ -15,6 +15,9 @@ PL_SCALER?=afs # define if this is a cygwin system. CYGWIN?= +# extra cflags +XCFLAGS?= + # The build process will put all of its output in this directory: GENDIR?=./obj PGGENDIR?=./pgobj @@ -41,6 +44,9 @@ PNGCCFLAGS?=-DPNG_USER_MEM_SUPPORTED IMDISRCDIR?=../gs/imdi +# PCL_INCLUDED means pcl + pcl xl +PDL_INCLUDE_FLAGS?=-DPCL_INCLUDED + # Choose COMPILE_INITS=1 for init files and fonts in ROM (otherwise =0) COMPILE_INITS?=0 @@ -52,6 +58,33 @@ PLPLATFORM?= JSRCDIR?=../gs/jpeg JGENDIR?=$(GENDIR) JOBJDIR?=$(GENDIR) +SHARE_JPEG?=0 + +# ridiculousness, not worth documenting. +AK?= + +# specify if banding should be memory or file based, and choose a +# compression method. + +BAND_LIST_STORAGE=memory +BAND_LIST_COMPRESSOR=zlib + +# file implementation for high level devices. +FILE_IMPLEMENTATION=stdio + +# stdio +STDIO_IMPLEMENTATION=c + +# taken from ugcclib.mak... hmmph. +gsdir?=/usr/local/share/ghostscript +gsdatadir?=$(gsdir)/$(GS_DOT_VERSION) +GS_DOCDIR?=$(gsdatadir)/doc +GS_LIB_DEFAULT?=$(gsdatadir)/lib:$(gsdatadir)/Resource/Font:$(gsdir)/fonts +SEARCH_HERE_FIRST?=1 +GS_INIT?=gs_init.ps +GS?= +# end hmmph + # If you want to build the individual packages in their own directories, # you can define this here, although normally you won't need to do this: @@ -66,25 +99,13 @@ PXLOBJDIR?=$(GENDIR) PCLOBJDIR?=$(GENDIR) XPSOBJDIR?=$(GENDIR) -# Language and configuration. These are actually platform-independent, -# but we define them here just to keep all parameters in one place. -ifeq ($(XPS_INCLUDED), TRUE) -TARGET_DEVS?=$(PXLOBJDIR)/pxl.dev $(PCLOBJDIR)/pcl5c.dev $(PCLOBJDIR)/hpgl2c.dev $(XPSOBJDIR)/xps.dev -else TARGET_DEVS?=$(PXLOBJDIR)/pxl.dev $(PCLOBJDIR)/pcl5c.dev $(PCLOBJDIR)/hpgl2c.dev -endif TARGET_XE?=$(GENDIR)/pcl6 TARGET_LIB?=$(GENDIR)/pcl6.a MAIN_OBJ?=$(PLOBJDIR)/plmain.$(OBJ) $(PLOBJDIR)/plimpl.$(OBJ) PCL_TOP_OBJ?=$(PCLOBJDIR)/pctop.$(OBJ) PXL_TOP_OBJ?=$(PXLOBJDIR)/pxtop.$(OBJ) -ifeq ($(XPS_INCLUDED), TRUE) -XPS_TOP_OBJ?=$(XPSOBJDIR)/xpstop.$(OBJ) -TOP_OBJ+= $(PCL_TOP_OBJ) $(PXL_TOP_OBJ) $(XPS_TOP_OBJ) -XCFLAGS?=-DXPS_INCLUDED -else -TOP_OBJ+= $(PCL_TOP_OBJ) $(PXL_TOP_OBJ) -endif +TOP_OBJ?=$(PCL_TOP_OBJ) $(PXL_TOP_OBJ) # note agfa gives its libraries incompatible names so they cannot be # properly found by the linker. Change the library names to reflect the @@ -131,7 +152,7 @@ endif # PL_SCALER = ufst # flags for artifex scaler ifeq ($(PL_SCALER), afs) - +UFST_BRIDGE?= # The mkromfs arguments for including the PCL fonts if COMPILE_INITS=1 PCLXL_ROMFS_ARGS?= -P ../urwfonts -d ttfonts / @@ -152,10 +173,6 @@ endif # PL_SCALER = afs GX_COLOR_INDEX_DEFINE?=-DGX_COLOR_INDEX_TYPE="unsigned long long" -# and this definition if devicen support is not required - -# GX_COLOR_INDEX_DEFINE= - HAVE_STDINT_H_DEFINE?=-DHAVE_STDINT_H HAVE_MKSTEMP_DEFINE?=-DHAVE_MKSTEMP @@ -167,13 +184,12 @@ HAVE_MKSTEMP_DEFINE?=-DHAVE_MKSTEMP GCFLAGS?=-Wall -Wundef -Wstrict-prototypes -Wmissing-declarations \ -Wmissing-prototypes -Wpointer-arith -Wwrite-strings \ - -Wcast-qual -Wwrite-strings \ + -Wcast-qual -Wwrite-strings -Wno-strict-aliasing \ -fno-builtin -fno-common \ -DNDEBUG \ $(HAVE_STDINT_H_DEFINE) $(HAVE_MKSTEMP_DEFINE) \ - $(GX_COLOR_INDEX_DEFINE) + $(GX_COLOR_INDEX_DEFINE) $(PSICFLAGS) $(PDL_INCLUDE_FLAGS) -# CFLAGS?=-g -O0 $(GCFLAGS) $(XCFLAGS) CFLAGS?= $(GCFLAGS) $(XCFLAGS) XINCLUDE?=-I/usr/X11R6/include @@ -183,7 +199,7 @@ XLIBS?=Xt SM ICE Xext X11 CCLD?=gcc -DD='$(GLGENDIR)$(D)' +DD=$(GLGENDIR)/ DEVICES_DEVS?=$(DD)ljet4.dev $(DD)djet500.dev $(DD)cljet5pr.dev $(DD)cljet5c.dev\ @@ -229,13 +245,10 @@ include $(COMMONDIR)/ugcc_top.mak include $(PLSRCDIR)/pl.mak include $(PXLSRCDIR)/pxl.mak include $(PCLSRCDIR)/pcl.mak -ifeq ($(XPS_INCLUDED), TRUE) -include $(XPSSRCDIR)/xps.mak -endif # Main program. -default: $(TARGET_XE)$(XE) +pdl_default: $(TARGET_XE)$(XE) echo Done. clean: config-clean clean-not-config-clean diff --git a/pl/plimpl.c b/pl/plimpl.c index bd20183cb..63e6025c6 100644 --- a/pl/plimpl.c +++ b/pl/plimpl.c @@ -28,11 +28,13 @@ extern pl_interp_implementation_t ps_implementation; /* Zero-terminated list of pointers to implementations */ pl_interp_implementation_t const * const pdl_implementation[] = { - &pcl_implementation, - &pxl_implementation, #ifdef XPS_INCLUDED &xps_implementation, #endif +#ifdef PCL_INCLUDED + &pcl_implementation, + &pxl_implementation, +#endif #ifdef PSI_INCLUDED &ps_implementation, #endif diff --git a/xps/xps.mak b/xps/xps.mak index d8fb67490..57d8806de 100644 --- a/xps/xps.mak +++ b/xps/xps.mak @@ -3,6 +3,7 @@ XPSGEN = $(XPSGENDIR)$(D) XPSOBJ = $(XPSOBJDIR)$(D) XPSO_ = $(O_)$(XPSOBJ) EXPATINCDIR = $(EXPATSRCDIR)$(D)lib +PLOBJ = $(PLOBJDIR)$(D) XPSCCC = $(CC_) $(I_)$(XPSSRCDIR)$(_I) $(I_)$(XPSGENDIR)$(_I) $(I_)$(PLSRCDIR)$(_I) $(I_)$(GLSRCDIR)$(_I) $(I_)$(EXPATINCDIR)$(_I) $(I_)$(ZSRCDIR)$(_I) $(C_) @@ -125,6 +126,11 @@ XPS_OBJS=\ $(XPSOBJ)xpsttf.$(OBJ) \ $(XPSOBJ)xpscff.$(OBJ) \ -$(XPSOBJ)xps.dev: $(XPS_MAK) $(ECHOGS_XE) $(XPS_OBJS) $(XPSGEN)expat.dev +# NB - note this is a bit squirrely. Right now the pjl interpreter is + required and shouldn't be and PLOBJ==XPSGEN is required. + +$(XPSOBJ)xps.dev: $(XPS_MAK) $(ECHOGS_XE) $(XPS_OBJS) $(XPSGEN)expat.dev \ + $(XPSGEN)pl.dev $(XPSGEN)$(PL_SCALER).dev $(XPSGEN)pjl.dev $(SETMOD) $(XPSOBJ)xps $(XPS_OBJS) - $(ADDMOD) $(XPSOBJ)xps -include $(XPSGEN)expat.dev + $(ADDMOD) $(XPSOBJ)xps -include $(XPSGEN)expat $(XPSGEN)pl $(XPSGEN)$(PL_SCALER) $(XPSGEN)pjl.dev + diff --git a/xps/xps_gcc.mak b/xps/xps_gcc.mak index fb4518c73..60583b09c 100644 --- a/xps/xps_gcc.mak +++ b/xps/xps_gcc.mak @@ -51,32 +51,19 @@ EXPATGENDIR?=$(GENDIR) EXPATOBJDIR?=$(GENDIR) # Executable path\name w/o the .EXE extension +TARGET_DEVS=$(XPSOBJDIR)/xps.dev TARGET_XE?=$(GENDIR)/gxps # Main file's name # this is already in pcl6_gcc.mak -#XPS_TOP_OBJ?=$(XPSOBJDIR)/xpstop.$(OBJ) -#TOP_OBJ+= $(XPS_TOP_OBJ) -#XCFLAGS?=-DXPS_INCLUDED +XPS_TOP_OBJ?=$(XPSOBJDIR)/xpstop.$(OBJ) +TOP_OBJ?=$(XPS_TOP_OBJ) -# Choose COMPILE_INITS=1 for init files and fonts in ROM (otherwise =0) -COMPILE_INITS?=0 +PDL_INCLUDE_FLAGS?=-DXPS_INCLUDED -# configuration assumptions -GX_COLOR_INDEX_DEFINE?=-DGX_COLOR_INDEX_TYPE="unsigned long long" -HAVE_STDINT_H_DEFINE?=-DHAVE_STDINT_H -HAVE_MKSTEMP_DEFINE?=-DHAVE_MKSTEMP - -GCFLAGS?=-Wall -Wpointer-arith -Wstrict-prototypes -Wwrite-strings -DNDEBUG $(HAVE_STDINT_H_DEFINE) $(HAVE_MKSTEMP_DEFINE) $(GX_COLOR_INDEX_DEFINE) -CFLAGS?=-g -O0 $(GCFLAGS) $(XCFLAGS) - -#FEATURE_DEVS?=$(DD)gsnogc.dev\ -# $(DD)ttflib.dev $(DD)psf1lib.dev $(DD)psf2lib.dev - -# "Subclassed" makefile include $(MAINSRCDIR)/pcl6_gcc.mak # Subsystems # this is already in pcl6_gcc.mak -#include $(XPSSRCDIR)/xps.mak +include $(XPSSRCDIR)/xps.mak include $(PSSRCDIR)/expat.mak |