diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2012-02-09 17:15:41 -0700 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2012-02-12 15:38:06 -0700 |
commit | e2867c6bcb2dc6cf9325e9ac87f980684469dee4 (patch) | |
tree | a3f40dee008793f087398a24d02e679c164b84c2 | |
parent | a13600f1c241c3e36dbe4973e9d78a8934b16004 (diff) |
PCL shared library build for unix.
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | common/ugcc_top.mak | 14 | ||||
-rw-r--r-- | main/pcl6_gcc.mak | 19 |
3 files changed, 33 insertions, 3 deletions
@@ -29,6 +29,9 @@ pcl: tiff pcl-lib: tiff $(MAKE) -C main -f pcl6_gcc.mak pdl-product-lib # build PCL and PCLXL lib +pcl-lib-shared: tiff + $(MAKE) -C main -f pcl6_gcc.mak pdl-product-solib # build PCL and PCLXL shared lib + pcl-debug: tiff $(MAKE) -C main -f pcl6_gcc.mak pdl-debug GENDIR="./debugobj" diff --git a/common/ugcc_top.mak b/common/ugcc_top.mak index 4b73d287e..67a4d4c31 100644 --- a/common/ugcc_top.mak +++ b/common/ugcc_top.mak @@ -91,6 +91,9 @@ pdl-product: UGCC_TOP_DIR pdl-product-lib: UGCC_TOP_DIR $(MAKE) -f $(firstword $(MAKEFILE)) GENOPT='' GCFLAGS='$(GCFLAGS)' CFLAGS='-O2 $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS)' lib +pdl-product-solib: UGCC_TOP_DIR + $(MAKE) -f $(firstword $(MAKEFILE)) GENOPT='' GCFLAGS='$(GCFLAGS)' CFLAGS='-fPIC -O2 $(GCFLAGS) $(XCFLAGS)' LDFLAGS='$(XLDFLAGS) $(LD_FLAGS_SO)' solib + pdl-clean: $(RMN_) $(GENDIR)/*.dev $(GENDIR)/devs*.tr $(GENDIR)/gconfig*.h $(RMN_) $(GENDIR)/gconfx*.h $(GENDIR)/j*.h @@ -114,10 +117,19 @@ $(GENDIR)/pconf.h $(GENDIR)/ldconf.tr: $(TARGET_DEVS) $(AUXDIR)/genconf$(XE) $(TARGET_LIB): $(ld_tr) $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) $(XOBJS) $(GLOBJDIR)/gsromfs$(COMPILE_INITS).$(OBJ) $(ECHOGS_XE) -w $(GENDIR)/ldall.tr -n - $(AR) $(ARFLAGS) $@ $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(TOP_OBJ) $(XOBJS) -s - cat $(GENDIR)/ldt.tr $(GENDIR)/ldconf.tr | grep ".o" >>$(GENDIR)/ldall.tr + cat $(ld_tr) $(GENDIR)/ldconf.tr >>$(GENDIR)/ldall.tr $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -s - $(GLOBJDIR)/gsromfs$(COMPILE_INITS).$(OBJ) $(MAIN_OBJ) LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; sh <$(GENDIR)/ldall.tr +$(TARGET_SOLIB): $(ld_tr) $(GENDIR)/ldconf.tr $(MAIN_OBJ) $(TOP_OBJ) $(XOBJS) $(GLOBJDIR)/gsromfs$(COMPILE_INITS).$(OBJ) + $(ECHOGS_XE) -w $(GENDIR)/ldall.tr -n - $(CCLD) $(LDFLAGS) -o $@ + $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -n -s $(TOP_OBJ) $(XOBJS) -s + cat $(ld_tr) $(GENDIR)/ldconf.tr >>$(GENDIR)/ldall.tr + $(ECHOGS_XE) -a $(GENDIR)/ldall.tr -s - $(GLOBJDIR)/gsromfs$(COMPILE_INITS).$(OBJ) $(MAIN_OBJ) $(EXTRALIBS) $(STDLIBS) + LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; sh <$(GENDIR)/ldall.tr + ln -s $(PCL6_SONAME_MAJOR_MINOR) $(GENDIR)/$(PCL6_SONAME_MAJOR) + ln -s $(PCL6_SONAME_MAJOR_MINOR) $(GENDIR)/$(PCL6_SONAME) + ifeq ($(PSICFLAGS), -DPSI_INCLUDED) # Link a Unix executable. NB - XOBS is not concatenated to the link # list here. It seems to have been done earlier on unlike the diff --git a/main/pcl6_gcc.mak b/main/pcl6_gcc.mak index 2fbc9c65e..a4cdf2a21 100644 --- a/main/pcl6_gcc.mak +++ b/main/pcl6_gcc.mak @@ -123,7 +123,19 @@ DD?=$(GLGENDIR)/ TARGET_DEVS?=$(PXLOBJDIR)/pjl.dev $(PXLOBJDIR)/pxl.dev $(PCLOBJDIR)/pcl5c.dev $(PCLOBJDIR)/hpgl2c.dev TARGET_XE?=$(GENDIR)/pcl6 -TARGET_LIB?=$(GENDIR)/pcl6.a +TARGET_LIB?=$(GENDIR)/libpcl6.a + +# PCL6 shared library definitions - this pretty much follows along how +# the gs dll is prepared. +PCL6_SONAME_BASE?=libpcl6 +PCL6_SOEXT?=so +PCL6_SONAME?=$(PCL6_SONAME_BASE).$(PCL6_SOEXT) +PCL6_SONAME_MAJOR?=$(PCL6_SONAME).$(GS_VERSION_MAJOR) +PCL6_SONAME_MAJOR_MINOR?=$(PCL6_SONAME_MAJOR).$(GS_VERSION_MINOR) +LD_FLAGS_SO?=-shared -Wl,-soname=$(PCL6_SONAME_MAJOR) -fPIC + +TARGET_SOLIB?=$(GENDIR)/$(PCL6_SONAME_MAJOR_MINOR) + MAIN_OBJ?=$(PLOBJDIR)/plmain.$(OBJ) $(PLOBJDIR)/plimpl.$(OBJ) REALMAIN_OBJ?=$(PLOBJDIR)/realmain.$(OBJ) REALMAIN_SRC?=realmain @@ -246,7 +258,10 @@ pdl-default: $(TARGET_XE)$(XE) echo Done. lib: $(TARGET_LIB) - echo Done lib. + echo done building library. + +solib: $(TARGET_SOLIB) + echo done building shared library. #### Implementation stub $(PLOBJDIR)plimpl.$(OBJ): $(PLSRCDIR)plimpl.c \ |