summaryrefslogtreecommitdiff
path: root/graphics/netpbm/patches/patch-ab
blob: feecaaa5e01f3e39599ad4e8787d1e45cf543445 (plain)
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
$NetBSD: patch-ab,v 1.6 2000/06/05 00:36:31 wiz Exp $

--- Makefile.common.orig	Thu Jun  1 19:38:14 2000
+++ Makefile.common	Mon Jun  5 01:38:40 2000
@@ -67,7 +67,7 @@
 $(OBJECTS): %.o: %.c
 	$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
 
-LIBOPT = $(SRCDIR)/libopt
+LIBOPT = $(ECHO)
 
 # Rules for conventional single-object file executables
 $(PORTBINARIES): %: %.o $(NETPBMLIBS) $(LIBOPT)
@@ -97,7 +97,7 @@
 # BUILDING NETPBM LIBRARIES
 
 $(LIBOBJECTS): %.o: %.c
-	$(CC) -c $(CFLAGS) $(CFLAGS_SHLIB) $(INCLUDE) -o $@ $<
+	$(LIBTOOL) $(CC) -c $(CFLAGS) $(CFLAGS_SHLIB) $(INCLUDE) $<
 
 SONAME = lib$(LIBROOT).so.$(MAJ)
 
@@ -117,10 +117,8 @@
           `$(LIBOPT) $(LIBLIBS)` -lc
 
 # Static library.  Unused by default, but with a small change to make files...
-lib$(LIBROOT).a: $(LIBOBJECTS) $(LIBOBJECTS_X)
-	-rm -f $@
-	ar rc $@ $(LIBOBJECTS) $(LIBOBJECTS_X)
-	-ranlib $@
+lib$(LIBROOT).la: $(LIBOBJECTS) $(LIBOBJECTS_X)
+	$(LIBTOOL) --mode=link $(CC) -rpath $(PREFIX)/lib -version-info $(MAJ):$(MIN) -o $@ $(LIBOBJECTS:.o=.lo) $(LIBOBJECTS_X:.o=.lo)
 
 # Some maintenance notes about $(INSTALL):  Some install programs can install
 # multiple files in one shot; others can take only one file at a time.  Some
@@ -157,7 +155,7 @@
 # Make and Install know that pbmmake.exe counts as pbmmake.
 	for x in $(BINARIES); \
 	do \
-	   $(INSTALL) -c -s -m $(INSTALL_PERM_BIN) $$x $(INSTALLBINARIES); \
+	   $(LIBTOOL) --mode=install $(INSTALL) -c -s -m $(INSTALL_PERM_BIN) $$x $(INSTALLBINARIES); \
 	done
 
 .PHONY: install.script
@@ -208,8 +206,8 @@
 # built.  If a previous make STATICLIB=N didn't build the static
 # library, the dependency here will do that.
 .PHONY: install.staticlib
-install.staticlib: lib$(LIBROOT).a
-	$(INSTALL) -c -m $(INSTALL_PERM_LIBS) $< $(INSTALLLIBS)/$<
+install.staticlib: lib$(LIBROOT).la
+	$(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) lib$(LIBROOT).la $(PREFIX)/lib
 
 .PHONY: install.lib.common
 ifeq ($(NETPBMLIBSUFFIX),so)
@@ -223,7 +221,7 @@
 
 .PHONY: clean.common
 clean.common:
-	-rm -f *.o *.o2 *.a *.so* *.cat *~ core *.core *.i *.s merge.h \
+	-rm -f *.o *.o2 *.la *.so* *.cat *~ core *.core *.i *.s merge.h \
           $(BINARIES) $(MERGENAME)
 
 .PHONY: dep