83b73d5614
PR: 39482 Submitted by: Ports Fury
103 lines
3.6 KiB
Text
103 lines
3.6 KiB
Text
--- lib/Makefile.orig Wed Jun 12 13:00:32 2002
|
|
+++ lib/Makefile Tue Jun 18 00:00:00 2002
|
|
@@ -31,12 +31,14 @@
|
|
# Library objects to be linked but not built by Makefile.common:
|
|
LIBOBJECTS_X = util/shhopt.o util/nstring.o
|
|
|
|
+SHLIBOBJECTS = $(patsubst %.o, %.lo, $(LIBOBJECTS))
|
|
+
|
|
MANUALS3 = libnetpbm
|
|
MANUALS5 = pbm pgm ppm pnm pam
|
|
|
|
INTERFACE_HEADERS = pm.h pbm.h bitio.h pbmfont.h \
|
|
- pgm.h ppm.h ppm.h ppmcmap.h ppmfloyd.h colorname.h \
|
|
- pnm.h pam.h pammap.h util/shhopt.h util/nstring.h
|
|
+ pgm.h ppm.h ppm.h ppmcmap.h ppmdraw.h ppmfloyd.h colorname.h \
|
|
+ pnm.h pam.h pammap.h util/pm_shhopt.h util/pm_nstring.h
|
|
|
|
HEADERLINKS = pm_config.h version.h compile.h shhopt.h
|
|
|
|
@@ -57,6 +59,9 @@
|
|
|
|
$(LIBOBJECTS): %.o: %.c $(HEADERLINKS)
|
|
# Note that the user may have configured -I options into CFLAGS.
|
|
+ $(CC) -c $(INCLUDE) $(CFLAGS) $(CADD) -o $@ $<
|
|
+
|
|
+$(SHLIBOBJECTS): %.lo: %.c $(HEADERLINKS)
|
|
$(CC) -c $(INCLUDE) $(CFLAGS) $(CFLAGS_SHLIB) $(CADD) -o $@ $<
|
|
|
|
SUBDIRS = util
|
|
@@ -67,7 +72,7 @@
|
|
MAJ = $(NETPBM_MAJOR_RELEASE)
|
|
MIN = $(NETPBM_MINOR_RELEASE)
|
|
|
|
-SONAME = libnetpbm.so.$(MAJ)
|
|
+SONAME = libnetpbm.so.$(SOVER)
|
|
|
|
ifeq ($(NETPBMLIBTYPE),irixshared)
|
|
# The libxxx.so link is needed to link the executables.
|
|
@@ -97,12 +102,9 @@
|
|
# The $(SONAME) link is only needed to test the programs without
|
|
# installing the libraries (in that case, you also need to direct the
|
|
# dynamic linker to the source directories, e.g. set LD_LIBRARY_PATH).
|
|
-$(SONAME): libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN)
|
|
- rm -f $@
|
|
- $(SYMLINK) $< $@
|
|
-libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN): $(LIBOBJECTS) $(LIBOBJECTS_X)
|
|
- $(LD) $(LDSHLIB) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
|
|
- -lc $(CADD)
|
|
+$(SONAME): $(SHLIBOBJECTS) $(LIBOBJECTS_X)
|
|
+ $(LD) $(LDSHLIB) -o $@ $(SHLIBOBJECTS) $(LIBOBJECTS_X) \
|
|
+ $(CADD)
|
|
endif
|
|
|
|
ifeq ($(NETPBMLIBTYPE),dll)
|
|
@@ -181,13 +183,10 @@
|
|
.PHONY: install.lib
|
|
ifeq ($(NETPBMLIBTYPE),unixshared)
|
|
# install a Unix-style shared library
|
|
-install.lib: $(PKGDIR)/lib $(PKGDIR)/link
|
|
- cd $(PKGDIR)/lib ; rm -f libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).*
|
|
- $(INSTALL) -c -m $(INSTALL_PERM_LIBD) \
|
|
- libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN) $(PKGDIR)/lib/
|
|
- cd $(PKGDIR)/lib/ ; \
|
|
- rm -f libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ); \
|
|
- $(SYMLINK) libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN) $(SONAME)
|
|
+install.lib: $(PKGDIR)/lib
|
|
+ cd $(PKGDIR)/lib ; rm -f libnetpbm.$(NETPBMLIBSUFFIX).*
|
|
+ ${BSD_INSTALL_DATA} \
|
|
+ $(SONAME) $(PKGDIR)/lib/
|
|
endif
|
|
ifeq ($(NETPBMLIBTYPE),dll)
|
|
#install a Windows DLL shared library
|
|
@@ -217,23 +216,23 @@
|
|
# directory when you compile your programs.
|
|
|
|
%_installhdr: $(PKGDIR)/include
|
|
- $(INSTALL) -c -m $(INSTALL_PERM_HDR) \
|
|
+ ${BSD_INSTALL_DATA} \
|
|
$(SRCDIR)/lib/$(@:%_installhdr=%) $(PKGDIR)/include/;
|
|
|
|
.PHONY: install.staticlib
|
|
-install.staticlib: $(PKGDIR)/link
|
|
- $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.$(STATICLIBSUFFIX) \
|
|
- $(PKGDIR)/link
|
|
+install.staticlib: $(PKGDIR)/lib
|
|
+ ${BSD_INSTALL_DATA} libnetpbm.$(STATICLIBSUFFIX) \
|
|
+ $(PKGDIR)/lib
|
|
|
|
# Install a shared library stub -- the ".so" file used at link time to
|
|
# prepare a program for dynamically linking a library at run time
|
|
.PHONY: install.sharedlibstub
|
|
-install.sharedlibstub: $(PKGDIR)/link
|
|
+install.sharedlibstub: $(PKGDIR)/lib
|
|
ifeq ($(NETPBMLIBTYPE),unixshared)
|
|
# install the link-time (.so) links to the runtime libraries
|
|
- cd $(PKGDIR)/link ; \
|
|
+ cd $(PKGDIR)/lib ; \
|
|
rm -f libnetpbm.$(NETPBMLIBSUFFIX); \
|
|
- $(SYMLINK) ../lib/libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
|
|
+ $(SYMLINK) $(SONAME) \
|
|
libnetpbm.$(NETPBMLIBSUFFIX)
|
|
endif
|
|
ifeq ($(NETPBMLIBTYPE),dll)
|