about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--doc/HISTORY2
-rw-r--r--lib/Makefile10
2 files changed, 7 insertions, 5 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 3b124c3b..dd467ba4 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -27,6 +27,8 @@ not yet  BJH  Release 11.04.00
               large for unsigned integer.  Always broken (Pamstack was new in
               Netpbm 10.0 (June 2002).
 
+              Build: Include LDFLAGS in link of shared library.
+
 23.06.28 BJH  Release 11.03.00
 
               pamstack: Add -firstmaxval, -lcmmaxval
diff --git a/lib/Makefile b/lib/Makefile
index 5040e40f..ffe2a143 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -136,7 +136,7 @@ PERLPROG = print "sgi$(MAJ)." . join(":sgi$(MAJ) . ", (0..$(MIN))) . "\n"
 
 $(SONAME): \
     $(LIBOBJECTS) $(LIBOBJECTS_X) 
-	$(LD) $(LDSHLIB) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
+	$(LD) $(LDSHLIB) $(LDFLAGS) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
           -lc \
 	  -soname libnetpbm.$(NETPBMLIBSUFFIX) \
 	  -set_version $(shell perl -e '$(PERLPROG)') \
@@ -155,7 +155,7 @@ $(SONAME): libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN)
 	rm -f $@
 	$(SYMLINK) $< $@
 libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN): $(LIBOBJECTS) $(LIBOBJECTS_X)
-	$(LD) $(LDSHLIB) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
+	$(LD) $(LDSHLIB) $(LDFLAGS) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
           $(SHLIB_CLIB) -lm $(LADD)
 endif
 
@@ -165,10 +165,10 @@ $(NETPBMSHLIBPREFIX)netpbm$(DLLVER).dll: $(LIBOBJECTS) $(LIBOBJECTS_X) libnetpbm
 else
 $(NETPBMSHLIBPREFIX)netpbm$(DLLVER).dll: $(LIBOBJECTS) $(LIBOBJECTS_X)
 endif
-	$(LD) $(LDSHLIB) -Wl,--export-all-symbols \
+	$(LD) $(LDSHLIB) $(LDFLAGS) -Wl,--export-all-symbols \
             -Wl,-soname,$(NETPBMSHLIBPREFIX)netpbm$(DLLVER).dll \
 	    -Wl,--output-def,$(NETPBMSHLIBPREFIX)netpbm$(DLLVER).def \
-            -Wl,--out-implib,libnetpbm.dll.a -o $@ $(LDFLAGS) \
+            -Wl,--out-implib,libnetpbm.dll.a -o $@ \
             $(LIBOBJECTS) $(LIBOBJECTS_X) $(LDLIBS) $(LADD) 
 endif
 
@@ -182,7 +182,7 @@ libnetpbm.$(MAJ).dylib: libnetpbm.$(MAJ).$(MIN).dylib
 	$(SYMLINK) $< $@
 
 libnetpbm.$(MAJ).$(MIN).dylib: $(LIBOBJECTS) $(LIBOBJECTS_X) 
-	$(LD) $(LDSHLIB) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
+	$(LD) $(LDSHLIB) $(LDFLAGS) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
            -lc $(LADD)
 endif