summaryrefslogtreecommitdiff
path: root/graphics/netpbm/files/patch-bb
blob: 5d6bc74a915f62d1b66a2dcaba160c5e1aa28deb (plain) (blame)
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
105
106
107
108
--- Makefile.common.orig	Thu Jul 12 14:27:12 2001
+++ Makefile.common	Tue Jul 24 00:00:00 2001
@@ -157,28 +157,23 @@
 
 $(LIBOBJECTS): %.o: $(SRCSUBDIR)/%.c $(HEADERLINKS)
 # Note that the user may have configured -I options into CFLAGS.
+	$(CC) -c $(INCLUDE) $(CFLAGS) $(CDEBUG) -o $@ $<
+
+$(SHLIBOBJECTS): %.lo: $(SRCSUBDIR)/%.c $(HEADERLINKS)
 	$(CC) -c $(INCLUDE) $(CFLAGS) $(CFLAGS_SHLIB) $(CDEBUG) -o $@ $<
 
-SONAME = lib$(LIBROOT).so.$(MAJ)
+SONAME = lib$(LIBROOT).so.$(SOVER)
 
 ifeq ($(NETPBMLIBTYPE),unixshared)
 # The libxxx.so link is needed to link the executables.
 lib$(LIBROOT).$(NETPBMLIBSUFFIX): $(SONAME)
 	rm -f $@
 	$(SYMLINK) $< $@
-# 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): lib$(LIBROOT).$(NETPBMLIBSUFFIX).$(MAJ).$(MIN)
-	rm -f $@
-	$(SYMLINK) $< $@
-lib$(LIBROOT).$(NETPBMLIBSUFFIX).$(MAJ).$(MIN): \
-    $(LIBOBJECTS) $(LIBOBJECTS_X) $(LIBLIBS) $(LIBOPT)
-	$(LD) $(LDSHLIB) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
-          `$(LIBOPT) $(LIBLIBS)` -lc $(CDEBUG)
-endif
-ifeq ($(NETPBMLIBTYPE),unixstatic)
-lib$(LIBROOT).$(NETPBMLIBSUFFIX): $(LIBOBJECTS) $(LIBOBJECTS_X)
+$(SONAME): lib$(LIBROOT).$(LIB_SUFFIX) \
+    $(SHLIBOBJECTS) $(LIBOBJECTS_X) $(LIBLIBS) $(LIBOPT)
+	$(LD) $(LDSHLIB) -o $@ $(SHLIBOBJECTS) $(LIBOBJECTS_X) \
+          `$(LIBOPT) $(LIBLIBS)` $(LDFLAGS) $(CDEBUG)
+lib$(LIBROOT).$(LIB_SUFFIX): $(LIBOBJECTS) $(LIBOBJECTS_X)
 	-rm -f $@
 	ar rc $@ $(LIBOBJECTS) $(LIBOBJECTS_X)
 ifneq ($(RANLIB)x,x)
@@ -238,7 +233,7 @@
 install.merge.common: $(MERGENAME) $(NOMERGEBINARIES) install.script
 	cd $(INSTALLBINARIES) ; rm -f $(BINARIES) $(MERGE_ALIASES)
 ifneq ($(MERGENAME)x,x)
-	$(INSTALL) -c $(STRIPFLAG) -m $(INSTALL_PERM_BIN) \
+	${BSD_INSTALL_PROGRAM} \
             $(MERGENAME) $(INSTALLBINARIES)
 	cd $(INSTALLBINARIES) ; \
 	   for i in $(MERGEBINARIES) $(MERGE_ALIASES) ; \
@@ -248,7 +243,7 @@
 ifneq ($(NOMERGEBINARIES)x,x)
 	for x in $(NOMERGEBINARIES); \
         do \
-           $(INSTALL) -c $(STRIPFLAG) -m $(INSTALL_PERM_BIN) \
+           ${BSD_INSTALL_PROGRAM} \
                $$x $(INSTALLBINARIES); \
 	done
 endif
@@ -259,7 +254,7 @@
 # Make and Install know that pbmmake.exe counts as pbmmake.
 	for x in $(BINARIES); \
 	do \
-	   $(INSTALL) -c $(STRIPFLAG) -m $(INSTALL_PERM_BIN) \
+	   ${BSD_INSTALL_PROGRAM} \
                $$x $(INSTALLBINARIES); \
 	done
 
@@ -268,7 +263,7 @@
 ifneq ($(SCRIPTS)x,x)
 	for x in $(SCRIPTS); \
 	do \
-	   $(INSTALL) -c -m $(INSTALL_PERM_BIN) $(SRCSUBDIR)/$$x \
+	   ${BSD_INSTALL_SCRIPT} $(SRCSUBDIR)/$$x \
                $(INSTALLSCRIPTS); \
 	done
 endif
@@ -305,7 +300,7 @@
 # directory when you compile your programs.
 	for x in $(INTERFACE_HEADERS); \
 	do \
-	   $(INSTALL) -c -m $(INSTALL_PERM_HDR) $(SRCSUBDIR)/$$x \
+	   ${BSD_INSTALL_DATA} $(SRCSUBDIR)/$$x \
                $(INSTALLHDRS); \
 	done
 
@@ -313,17 +308,17 @@
 #
 .PHONY: install.staticlib
 install.staticlib: lib$(LIBROOT).$(LIB_SUFFIX)
-	$(INSTALL) -c -m $(INSTALL_PERM_LIBS) $< $(INSTALLLIBS)/$<
+	${BSD_INSTALL_DATA} $< $(INSTALLLIBS)/$<
 
 .PHONY: install.lib.common
 ifeq ($(NETPBMLIBTYPE),unixshared)
 # install a Unix-style shared library
-install.lib.common: lib$(LIBROOT).$(NETPBMLIBSUFFIX).$(MAJ).$(MIN) 
-	cd $(INSTALLLIBS) ; rm -f lib$(LIBROOT).$(NETPBMLIBSUFFIX).$(MAJ).*
-	$(INSTALL) -c -m $(INSTALL_PERM_LIBD) $< $(INSTALLLIBS)
+install.lib.common: $(SONAME)
+	cd $(INSTALLLIBS) ; rm -f lib$(LIBROOT).$(NETPBMLIBSUFFIX).*
+	${BSD_INSTALL_DATA} $< $(INSTALLLIBS)
 	cd $(INSTALLLIBS) ; \
           rm -f lib$(LIBROOT).$(NETPBMLIBSUFFIX).$(MAJ); \
-          $(SYMLINK) $< lib$(LIBROOT).$(NETPBMLIBSUFFIX).$(MAJ)
+          $(SYMLINK) $< lib$(LIBROOT).$(NETPBMLIBSUFFIX)
 endif
 ifeq ($(NETPBMLIBTYPE),dll)
 #install a Windows DLL shared library