1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
Description: correct linker variables
This patch set sets all the linker-specific variables correctly
---
Last-Update: 2011-11-18
Index: pgplot5-5.2.2/makemake
===================================================================
--- pgplot5-5.2.2.orig/makemake
+++ pgplot5-5.2.2/makemake
@@ -658,6 +658,8 @@ CPGPLOT_LIB=$CPGPLOT_LIB
#
SHARED_LIB=$SHARED_LIB
SHARED_LD=$SHARED_LD
+SHARED_LD_PGPLOT_OPTS=$SHARED_LD_PGPLOT_OPTS
+SHARED_LD_CPGPLOT_OPTS=$SHARED_LD_CPGPLOT_OPTS
#
# The libraries that the shared PGPLOT library depends upon.
# This is for systems that allow one to specify what libraries
@@ -667,6 +669,7 @@ SHARED_LD=$SHARED_LD
# libraries when they link their executables.
#
SHARED_LIB_LIBS=$SHARED_LIB_LIBS
+SHARED_LIB_CPGPLOT_LIBS=$SHARED_LIB_CPGPLOT_LIBS
#
# Ranlib command if required
#
@@ -806,7 +809,8 @@ grexec.o: grexec.f
# libraries.
#-----------------------------------------------------------------------
-lib : libpgplot.a $(SHARED_LIB)
+#lib : libpgplot.a $(SHARED_LIB)
+lib : libpgplot.a
libpgplot.a : $(PG_ROUTINES) $(PG_NON_STANDARD) $(GR_ROUTINES) \
$(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
@@ -816,6 +820,16 @@ libpgplot.a : $(PG_ROUTINES) $(PG_NON_ST
$(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq`
$(RANLIB) libpgplot.a
+#shared: $(PG_ROUTINES) $(PG_NON_STANDARD) $(GR_ROUTINES) \
+# $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
+# $(SHARED_LD)
+
+shared: $(PG_ROUTINES) $(PG_NON_STANDARD) \
+ $(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
+ $(SHARED_LD) $(SHARED_LD_PGPLOT_OPTS) `ls $(PG_ROUTINES) \
+ $(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
+ $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS)
+
EOD
# Emit the shared library dependency if requested.
@@ -824,7 +838,7 @@ if test -n "$SHARED_LIB" -a -n "$SHARED_
cat >> makefile << \EOD
$(SHARED_LIB): $(PG_ROUTINES) $(PG_NON_STANDARD) \
$(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
- $(SHARED_LD) `ls $(PG_ROUTINES) \
+ $(SHARED_LD) $(SHARED_LD_PGPLOT_OPTS) `ls $(PG_ROUTINES) \
$(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
$(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS)
EOD
@@ -1019,13 +1033,15 @@ EOD
cat >> makefile << \EOD
+DEB_HOST_MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
# Miscellaneous include files required by drivers
griv00.o : $(DRVDIR)/gadef.h $(DRVDIR)/gmdef.h $(DRVDIR)/gphdef.h
grivas.o : $(DRVDIR)/gadef.h
grtv00.o : $(DRVDIR)/imdef.h
pgxwin.o : $(DRVDIR)/pgxwin.h
-pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h
+pndriv.o : /usr/include/png.h /usr/include/pngconf.h /usr/include/zlib.h $(or $(wildcard /usr/include/zconf.h),/usr/include/$(DEB_HOST_MULTIARCH)/zconf.h)
x2driv.o figdisp_comm.o: $(DRVDIR)/commands.h
@@ -1039,6 +1055,8 @@ cpg: libcpgplot.a cpgplot.h cpgdemo
@echo 'will be needed.'
@echo ' '
+cpg-shared: libcpgplot.so
+
pgbind: $(SRC)/cpg/pgbind.c
$(CCOMPL) $(CFLAGC) $(SRC)/cpg/pgbind.c -o pgbind
@@ -1050,6 +1068,13 @@ libcpgplot.a cpgplot.h: $(PG_SOURCE) pgb
$(RANLIB) libcpgplot.a
rm -f cpg*.o
+libcpgplot.so: $(PG_SOURCE) pgbind
+ ./pgbind $(PGBIND_FLAGS) -w $(PG_SOURCE)
+ $(CCOMPL) -c $(CFLAGC) cpg*.c
+ rm -f cpg*.c
+ $(SHARED_LD) $(SHARED_LD_CPGPLOT_OPTS) cpg*.o $(SHARED_LIB_CPGPLOT_LIBS)
+ rm -f cpg*.o
+
cpgdemo: cpgplot.h $(SRC)/cpg/cpgdemo.c libcpgplot.a
$(CCOMPL) $(CFLAGD) -c -I. $(SRC)/cpg/cpgdemo.c
$(FCOMPL) -o cpgdemo cpgdemo.o $(CPGPLOT_LIB) $(LIBS)
|