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.9 2000/08/10 10:44:10 wiz Exp $
--- Makefile.common.orig Fri Aug 4 02:17:52 2000
+++ Makefile.common Thu Aug 10 12:16:47 2000
@@ -68,7 +68,7 @@
# Note that the user may have configured -I options into CFLAGS.
$(CC) -c $(INCLUDE) $(CFLAGS) -o $@ $<
-LIBOPT = $(SRCDIR)/libopt
+LIBOPT = /bin/echo # XXX must exist, can't be ${ECHO} (shell builtin)
# Rules for conventional single-object file executables
$(PORTBINARIES): %: %.o $(NETPBMLIBS) $(LIBOPT)
@@ -103,7 +103,7 @@
$(LIBOBJECTS): %.o: %.c
# Note that the user may have configured -I options into CFLAGS.
- $(CC) -c $(INCLUDE) $(CFLAGS) $(CFLAGS_SHLIB) -o $@ $<
+ $(LIBTOOL) $(CC) -c $(INCLUDE) $(CFLAGS) $(CFLAGS_SHLIB) $<
SONAME = lib$(LIBROOT).so.$(MAJ)
@@ -123,10 +123,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
@@ -169,7 +167,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
@@ -222,8 +220,8 @@
# built. So if you later do a make install.staticlib, the dependency
# here causes the static library to be built at that time.
.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
# install a shared library
@@ -235,7 +233,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
|