1
|
1 PREFIX = /usr/local
|
|
2
|
|
3 MAJOR = 0
|
|
4 MINOR = 2
|
|
5 REVISION = 0
|
|
6 VER = ${MAJOR}.${MINOR}.${REVISION}
|
|
7
|
|
8 CC = gcc
|
|
9 #OBJS = guess.o
|
|
10
|
|
11 SRCS = guess.c \
|
|
12 arabic_impl.c \
|
|
13 cjk_impl.c \
|
|
14 greek_impl.c \
|
|
15 hebrew_impl.c \
|
|
16 russian_impl.c \
|
|
17 turkish_impl.c
|
|
18
|
|
19
|
|
20 #SRCS = ${OBJS:.o=.c} guess_tab.c libguess.h test.c
|
|
21
|
|
22 OBJS = ${SRCS:.c=.o}
|
|
23
|
|
24 LIBS = libguess.so libguess.a
|
|
25 CFLAGS += -fPIC
|
|
26 SONAME = libguess.so.${MAJOR}
|
|
27
|
|
28
|
|
29 all: $(LIBS)
|
|
30
|
|
31 libguess.so: ${OBJS}
|
|
32 ${CC} -o libguess.so -shared -Wl,-soname,${SONAME} ${OBJS}
|
|
33
|
|
34 libguess.a: ${OBJS}
|
|
35 ar rc libguess.a ${OBJS}
|
|
36 ranlib libguess.a
|
|
37
|
|
38 $(OBJS) : $(SRCS) libguess.h guess_tab.c
|
|
39
|
|
40
|
|
41 guess_tab.c : guess.scm
|
|
42 gosh guess.scm guess_tab.c
|
|
43
|
|
44 test: test.c guess.c
|
|
45 gcc -g -o test test.c guess.c
|
|
46
|
|
47 install:
|
|
48 install -m644 libguess.h ${PREFIX}/include
|
|
49 rm -f ${PREFIX}/lib/libguess.*
|
|
50 install -m755 libguess.so ${PREFIX}/lib/libguess.so.${VER}
|
|
51 install -m644 libguess.a ${PREFIX}/lib
|
|
52 ln -sf ${PREFIX}/lib/libguess.so.${VER} ${PREFIX}/lib/libguess.so.${MAJOR}
|
|
53 ln -sf ${PREFIX}/lib/libguess.so.${MAJOR} ${PREFIX}/lib/libguess.so
|
|
54
|
|
55 clean:
|
|
56 rm -f $(LIBS) $(OBJS) test
|
|
57
|
|
58 distclean: clean
|
|
59 rm -f *~ core*
|
|
60
|