blob: f26d304d6ecfc69771de13c3bcdecb88393bb621 (
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
65
|
$NetBSD: patch-aa,v 1.4 2007/08/30 23:05:14 agc Exp $
Patches to use NetBSD's libtool and PKG_SYSCONFDIR.
DESTDIR patches too
--- Makefile.in.orig 2006-05-26 21:14:56.000000000 +0100
+++ Makefile.in 2007-08-30 23:51:57.000000000 +0100
@@ -9,6 +9,7 @@
INCDIR= $(prefix)/include
MANDIR= $(prefix)/man
ETCDIR= $(prefix)/etc
+EGDIR= $(prefix)/share/examples/libutf
# SVR4, I hate you. What ****idiot**** dreamed this up????
# Yeah, like all csh or rc users need this crap...
@@ -26,31 +27,38 @@
RANLIB= @RANLIB@
$(LIBS) : $(OBJS)
- $(AR) $(ARFLAGS) $(LIBS) $(OBJS)
+ ${LIBTOOL} --mode=link cc -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 3:0
ci:
ci -l ure.c ure.h urelang.c utf.c utf.h
install: $(LIBS)
- $(srcdir)/mkinstalldirs $(LIBDIR) $(INCDIR) $(ETCDIR) $(MANDIR)/man3
- $(INSTALL_DATA) $(LIBS) $(LIBDIR) ; $(RANLIB) $(LIBDIR)/$(LIBS)
- $(INSTALL_DATA) $(srcdir)/ure.h $(INCDIR)
- $(INSTALL_DATA) $(srcdir)/utf.h $(INCDIR)
- $(INSTALL_DATA) $(srcdir)/langcoll.utf $(ETCDIR)
- $(INSTALL_DATA) $(srcdir)/utf.3 $(MANDIR)/man3
- $(INSTALL_DATA) $(srcdir)/ure.3 $(MANDIR)/man3
+ $(srcdir)/mkinstalldirs ${DESTDIR}$(LIBDIR) ${DESTDIR}$(INCDIR) ${DESTDIR}$(EGDIR) ${DESTDIR}$(MANDIR)/man3
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${LIBS:.a=.la} ${DESTDIR}${PREFIX}/lib
+ $(INSTALL_DATA) $(srcdir)/ure.h ${DESTDIR}$(INCDIR)
+ $(INSTALL_DATA) $(srcdir)/utf.h ${DESTDIR}$(INCDIR)
+ $(INSTALL_DATA) $(srcdir)/langcoll.utf ${DESTDIR}$(EGDIR)
+ $(INSTALL_DATA) $(srcdir)/utf.3 ${DESTDIR}$(MANDIR)/man3
+ $(INSTALL_DATA) $(srcdir)/ure.3 ${DESTDIR}$(MANDIR)/man3
uninstall:
rm -f $(LIBDIR)/libure.a
rm -f $(LIBDIR)/$(LIBS)
- rm -f $(ETCDIR)/langcoll.utf
+ rm -f $(EGDIR)/langcoll.utf
rm -f $(INCDIR)/ure.h $(INCDIR)/urelang.h $(INCDIR)/utf.h
gurep: gurep.o $(LIBS)
- $(CC) gurep.o $(LIBS) -o gurep
+ ${LIBTOOL} --mode=link ${CC} gurep.o ${LIBS:.a=.la} -o gurep
findword: findword.o $(LIBS)
- $(CC) findword.o $(LIBS) -o findword
+ ${LIBTOOL} --mode=link ${CC} findword.o ${LIBS:.a=.la} -o findword
+
+ure.o: ure.c ure.h utf.h
+ ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c ure.c
+urelang.o: urelang.c ure.h utf.h
+ ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c urelang.c
+utf.o: utf.c utf.h
+ ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c utf.c
tst: gurep findword
test -d tests || ln -s $(srcdir)/tests .
|