blob: 68590a83ee1bd9d63b6959f2452d63aeedafdb67 (
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
|
$NetBSD: patch-ab,v 1.1.1.1 2002/06/19 09:25:25 agc Exp $
--- hzconvert/Makefile.orig Mon Jan 8 18:03:21 2001
+++ hzconvert/Makefile
@@ -1,22 +1,17 @@
-CC=gcc -I../include
-CFLAGS=-O2 -Wall -g
-SHARED_LIB=libhz.so
-SHARED_LIB_MAJOR=$(SHARED_LIB).0
-SHARED_LIB_MINOR=$(SHARED_LIB_MAJOR).0
+CFLAGS+=-Wall -I../include
+LIB=libhz.a
OBJS=b2g.o b2u.o g2u.o hz2gb.o b2g_tables.o b2u_tables.o g2u_tables.o io.o unicode.o judge.o judge3.o gbpercent.o b5percent.o search.o
%.o: %.c
- $(CC) -fPIC $(CFLAGS) -c $<
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
-all: libhzconvert
+all: $(LIB)
-libhzconvert: $(OBJS)
- ar rs ../lib/libhz.a $(OBJS)
- gcc -fPIC -shared -Wl,-soname,$(SHARED_LIB_MAJOR) -o ../lib/$(SHARED_LIB_MINOR) $(OBJS) -ldl
- rm -f ../lib/$(SHARED_LIB_MAJOR)
- rm -f ../lib/$(SHARED_LIB)
- cd ../lib;ln -s $(SHARED_LIB_MINOR) $(SHARED_LIB_MAJOR)
- cd ../lib;ln -s $(SHARED_LIB_MAJOR) $(SHARED_LIB)
+$(LIB): $(OBJS)
+ $(LIBTOOL) --mode=link $(CC) -o $(LIB:.a=.la) $(OBJS:.o=.lo) -rpath $(PREFIX)/lib
+
+install: all
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) $(LIB:.a=.la) $(PREFIX)/lib
clean:
rm -f *.o *~ ../lib/lib*
|