summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2011-06-22 21:39:01 +0100
committerRobin Watts <Robin.Watts@artifex.com>2011-06-23 18:17:02 +0100
commitca0f4ff4a0df386dd4d494a418f09336d06c2451 (patch)
tree8586179f4a094320e2196a7502ede3d51e29e5a2 /common
parent3b3261eca08cd73ca355b28fe5125c98d411820d (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 'common')
-rw-r--r--common/gccdefs.mak18
-rw-r--r--common/generic.mak4
-rw-r--r--common/msvc_top.mak33
-rw-r--r--common/ugcc_top.mak18
4 files changed, 45 insertions, 28 deletions
diff --git a/common/gccdefs.mak b/common/gccdefs.mak
index 2ed231a68..c5e6bda77 100644
--- a/common/gccdefs.mak
+++ b/common/gccdefs.mak
@@ -1,8 +1,18 @@
-# Copyright (C) 1997 Aladdin Enterprises. All rights reserved.
-# Unauthorized use, copying, and/or distribution prohibited.
+# Copyright (C) 1997-2011 Artifex Software, Inc. All rights reserved.
+# All Rights Reserved.
+#
+# This software is provided AS-IS with no warranty, either express or
+# implied.
+#
+# This software is distributed under license and may not be copied, modified
+# or distributed except as expressly authorized under the terms of that
+# license. Refer to licensing information at http://www.artifex.com/
+# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
+# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
# gccdefs.mak
# Definitions for compilation with gcc.
-CC_=gcc $(GENOPT) $(CFLAGS) $(XCFLAGS) -c
-CCAUX=gcc $(CFLAGS)
+CC=gcc
+AR=ar
+CCAUX=$(CC)
diff --git a/common/generic.mak b/common/generic.mak
index 7abdcd3a6..4c762a2b8 100644
--- a/common/generic.mak
+++ b/common/generic.mak
@@ -69,8 +69,8 @@
GS_XE=$(GLOBJDIR)$(D)gs$(XE)
# Define the echogs executable.
-# Currently it always lives in the GLOBJ directory.
-ECHOGS_XE=$(GLOBJDIR)$(D)echogs$(XE)
+# Currently it always lives in the AUX directory.
+ECHOGS_XE=$(AUXDIR)$(D)echogs$(XE)
# Define the commands for building module descriptions.
SETMOD=$(ECHOGS_XE) -e .dev -w- -Q-obj
diff --git a/common/msvc_top.mak b/common/msvc_top.mak
index e3a77a62f..f5b328492 100644
--- a/common/msvc_top.mak
+++ b/common/msvc_top.mak
@@ -41,16 +41,15 @@ clean_gs:
erase $(TARGET_XE).lib
# Define names of utility programs
-AUXGENDIR=$(GLGENDIR)
-AUXGEN=$(AUXGENDIR)$(D)
-ANSI2KNR_XE=$(AUXGEN)ansi2knr.exe
-ECHOGS_XE=$(AUXGEN)echogs.exe
-GENARCH_XE=$(AUXGEN)genarch.exe
-GENCONF_XE=$(AUXGEN)genconf.exe
-GENDEV_XE=$(AUXGEN)gendev.exe
-GENINIT_XE=$(AUXGEN)geninit.exe
-GENHT_XE=$(AUXGEN)genht.exe
-MKROMFS_XE=$(AUXGEN)mkromfs$(XEAUX)
+AUX=$(AUXDIR)$(D)
+ANSI2KNR_XE=$(AUX)ansi2knr.exe
+ECHOGS_XE=$(AUX)echogs.exe
+GENARCH_XE=$(AUX)genarch.exe
+GENCONF_XE=$(AUX)genconf.exe
+GENDEV_XE=$(AUX)gendev.exe
+GENINIT_XE=$(AUX)geninit.exe
+GENHT_XE=$(AUX)genht.exe
+MKROMFS_XE=$(AUX)mkromfs$(XEAUX)
# Platform specification
@@ -101,9 +100,10 @@ FORCE:
$(GENDIR)/ldgs.tr: FORCE
-if not exist $(GLGENDIR) mkdir $(GLGENDIR)
-if not exist $(GLOBJDIR) mkdir $(GLOBJDIR)
+ -if not exist $(AUXDIR) mkdir $(AUXDIR)
$(MAKE) /F $(PSSRCDIR)\msvc32.mak MSVC_VERSION="$(MSVC_VERSION)" \
GLSRCDIR="$(GLSRCDIR)" DEBUG=$(DEBUG) NOPRIVATE=$(NOPRIVATE) \
- DEBUGSYM=$(DEBUGSYM) TDEBUG=$(TDEBUG) \
+ DEBUGSYM=$(DEBUGSYM) TDEBUG=$(TDEBUG) AUXDIR="$(AUXDIR)" \
GLGENDIR="$(GLGENDIR)" GLOBJDIR="$(GLOBJDIR)" \
EXPATSRCDIR="$(EXPATSRCDIR)" SHARE_EXPAT="$(SHARE_EXPAT)" \
EXPAT_CFLAGS="$(EXPAT_CFLAGS)" LCMSSRCDIR="$(LCMSSRCDIR)" \
@@ -129,7 +129,7 @@ $(GENDIR)/ldgs.tr: FORCE
FEATURE_DEVS="$(FEATURE_DEVS)" DEVICE_DEVS="$(DEVICE_DEVS)" \
BAND_LIST_STORAGE=$(BAND_LIST_STORAGE) BAND_LIST_COMPRESSOR=$(BAND_LIST_COMPRESSOR) \
CPU_TYPE="$(CPU_TYPE)" CONFIG="$(CONFIG)" \
- $(GLOBJDIR)\gsargs.$(OBJ) $(GLOBJDIR)\echogs.exe \
+ $(GLOBJDIR)\gsargs.$(OBJ) $(AUXDIR)\echogs.exe \
$(GLOBJDIR)\ld.tr $(GLOBJDIR)\gconfig.$(OBJ) \
$(GLOBJDIR)\gscdefs.$(OBJ) $(GLOBJDIR)\iconfig.$(OBJ) \
$(GLOBJDIR)\gsromfs$(COMPILE_INITS).$(OBJ)
@@ -148,10 +148,11 @@ $(GENDIR)/ldgs.tr: FORCE
-echo $(PSICFLAGS)
-if not exist $(GLGENDIR) mkdir $(GLGENDIR)
-if not exist $(GLOBJDIR) mkdir $(GLOBJDIR)
+ -if not exist $(AUXDIR) mkdir $(AUXDIR)
echo > $(GLOBJDIR)/gs_init.ps
$(MAKE) /F $(GLSRCDIR)\msvclib.mak MSVC_VERSION="$(MSVC_VERSION)" \
GLSRCDIR="$(GLSRCDIR)" DEBUG=$(DEBUG) NOPRIVATE=$(NOPRIVATE) \
- DEBUGSYM=$(DEBUGSYM) TDEBUG=$(TDEBUG) \
+ DEBUGSYM=$(DEBUGSYM) TDEBUG=$(TDEBUG) AUXDIR="$(AUXDIR)" \
GLGENDIR="$(GLGENDIR)" GLOBJDIR="$(GLOBJDIR)" \
EXPATSRCDIR="$(EXPATSRCDIR)" SHARE_EXPAT="$(SHARE_EXPAT)" \
EXPAT_CFLAGS="$(EXPAT_CFLAGS)" LCMSSRCDIR="$(LCMSSRCDIR)" \
@@ -179,7 +180,7 @@ $(GENDIR)/ldgs.tr: FORCE
BAND_LIST_STORAGE=$(BAND_LIST_STORAGE) BAND_LIST_COMPRESSOR=$(BAND_LIST_COMPRESSOR) \
GLOBJ=$(GLOBJ) GLGEN=$(GLGEN) \
CPU_TYPE="$(CPU_TYPE)" CONFIG="$(CONFIG)" \
- $(GLOBJDIR)\gsargs.$(OBJ) $(GLOBJDIR)\echogs.exe \
+ $(GLOBJDIR)\gsargs.$(OBJ) $(AUXDIR)\echogs.exe \
$(GLOBJDIR)\ld.tr $(GLOBJDIR)\gconfig.$(OBJ) \
$(GLOBJDIR)\gscdefs.$(OBJ) $(GLOBJDIR)\gsromfs$(COMPILE_INITS).$(OBJ)
$(CP_) $(GENDIR)\ld.tr $(GENDIR)\ldgs.tr
@@ -187,8 +188,8 @@ $(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 -ol $(GENDIR)\ldconf.tr
+$(GENDIR)\pconf.h $(GENDIR)\ldconf.tr: $(TARGET_DEVS) $(AUXDIR)\genconf$(XE)
+ $(AUXDIR)\genconf -n - $(TARGET_DEVS) -h $(GENDIR)\pconf.h -ol $(GENDIR)\ldconf.tr
!if "$(TDEBUG)" == "1"
$(GENDIR)\lib32.rsp: $(MAKEFILE)
diff --git a/common/ugcc_top.mak b/common/ugcc_top.mak
index 386bd4a91..aa9f2c9ed 100644
--- a/common/ugcc_top.mak
+++ b/common/ugcc_top.mak
@@ -27,12 +27,17 @@ include $(COMMONDIR)/generic.mak
# these gems were plucked from the old ugcclib.mak. The CC options
# seem to be out of sync.
-BINDIR=./libobj
+
+CCLD=$(CC)
+CCAUXLD=$(CCAUX)
+
+CCFLAGS=$(GENOPT) $(CFLAGS) $(XCFLAGS)
+CC_=$(CC) $(CCFLAGS) -c
+CCAUX_=$(CCAUX) $(CFLAGS) -c
+
GLD=$(GLGENDIR)/
-CCFLAGS=$(GENOPT) $(CFLAGS)
-CC_=$(CC) $(CCFLAGS)
-CCAUX=$(CC)
CC_NO_WARN=$(CC_) -Wno-cast-qual -Wno-traditional
+CCAUX_NO_WARN=$(CCAUX_) -Wno-cast-qual -Wno-traditional
CC_SHARED=$(CC_)
# Which CMS are we using?
@@ -62,6 +67,7 @@ include $(GLSRCDIR)/freetype.mak
UGCC_TOP_DIR:
@if test ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi
+ @if test ! -d $(AUXDIR); then mkdir $(AUXDIR); fi
# Configure for debugging
pdl-debug: UGCC_TOP_DIR
@@ -97,8 +103,8 @@ pdl-clean:
# 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
+$(GENDIR)/pconf.h $(GENDIR)/ldconf.tr: $(TARGET_DEVS) $(AUXDIR)/genconf$(XE)
+ $(AUXDIR)/genconf -n - $(TARGET_DEVS) -h $(GENDIR)/pconf.h -p "%s&s&&" -o $(GENDIR)/ldconf.tr
# Create a library
$(TARGET_LIB): $(ld_tr) $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) $(XOBJS) $(GLOBJDIR)/gsromfs$(COMPILE_INITS).$(OBJ)