summaryrefslogtreecommitdiff
path: root/inputmethod/unicon-im/patches/patch-af
blob: b40ead16698fcf62521295d69bf8591769cde228 (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
$NetBSD: patch-af,v 1.2 2006/01/15 13:56:10 rxg Exp $

--- ImmModules/TL-1/Makefile.in.orig	Wed Jun  7 13:49:56 2000
+++ ImmModules/TL-1/Makefile.in
@@ -1,24 +1,26 @@
 # Generated automatically from Makefile.in by configure.
 prefix=@prefix@
-CFLAGS=@CFLAGS@
-PROG = TL_hzinput.so
+CFLAGS=-Wall -I../../include -I. @CFLAGS@
+PROG = TL_hzinput.a
 TL_OBJS = xl_hzinput.o TL_hzinput.o  xl_phrase.o xl_sysphrase.o xl_mfile.o
 
-CFLAGS = -g -Wall -I../../include -I.
+CC = $(LIBTOOL) --mode=compile @CC@
+
+all: $(TL_OBJS)
+	$(LIBTOOL) --mode=link @CC@ -o $(PROG:.a=.la) $(TL_OBJS:.o=.lo) -rpath $(prefix)/lib/unicon -module -avoid-version
 
-all:dlib
 dlib: $(PROG)
 
 xl_mfile.o : xl_mfile.c xl_mfile.h
-	gcc $(CFLAGS) -c xl_mfile.c -o xl_mfile.o
+	$(CC) $(CFLAGS) -c xl_mfile.c -o xl_mfile.o
 TL_hzinput.o : TL_hzinput.c
-	gcc $(CFLAGS) -DUNICON2_LIB=\"$(prefix)/lib/unicon2\" -c TL_hzinput.c -o TL_hzinput.o
+	$(CC) $(CFLAGS) -DUNICON2_LIB=\"$(prefix)/lib/unicon\" -c TL_hzinput.c -o TL_hzinput.o
 xl_hzinput.o : xl_hzinput.c
-	gcc $(CFLAGS) -c xl_hzinput.c -o xl_hzinput.o
+	$(CC) $(CFLAGS) -c xl_hzinput.c -o xl_hzinput.o
 xl_phrase.o : xl_phrase.c
-	gcc $(CFLAGS) -c xl_phrase.c -o xl_phrase.o
+	$(CC) $(CFLAGS) -c xl_phrase.c -o xl_phrase.o
 xl_sysphrase.o : xl_sysphrase.c
-	gcc $(CFLAGS) -c xl_sysphrase.c -o xl_sysphrase.o
+	$(CC) $(CFLAGS) -c xl_sysphrase.c -o xl_sysphrase.o
 $(PROG): $(TL_OBJS)
 	gcc $(TL_OBJS) -shared -o $(PROG)
 
@@ -60,12 +62,14 @@
 levelphrase : levelphrase.c
 	gcc -g -I../../include -I.  levelphrase.c -o levelphrase
 install:
-	mkdir -p $(prefix)/lib/unicon2/{gb,gbk,big5}
-	cp -f *.so $(prefix)/lib/unicon2
-	cp -f *.bin $(prefix)/lib/unicon2
-	cp -f gb/*.tab $(prefix)/lib/unicon2/gb
-	cp -f gbk/*.tab $(prefix)/lib/unicon2/gbk
-	cp -f xcin-25/*.tab $(prefix)/lib/unicon2/big5
+	$(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(PROG:.a=.la) $(prefix)/lib/unicon
+	$(BSD_INSTALL_DATA) *.bin $(prefix)/lib/unicon
+	$(BSD_INSTALL_DATA_DIR) $(prefix)/lib/unicon/gb
+	$(BSD_INSTALL_DATA) gb/*.tab $(prefix)/lib/unicon/gb
+	$(BSD_INSTALL_DATA_DIR) $(prefix)/lib/unicon/gbk
+	$(BSD_INSTALL_DATA) gbk/*.tab $(prefix)/lib/unicon/gbk
+	$(BSD_INSTALL_DATA_DIR) $(prefix)/lib/unicon/big5
+	$(BSD_INSTALL_DATA) xcin-25/*.tab $(prefix)/lib/unicon/big5
 
 clean:
 	rm -f *.o core a.out *.bak cin2tab test *.so