Mercurial > libguess
changeset 1:04f2be1c8464
update Makefile
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Sat, 01 Dec 2007 03:27:31 +0900 |
parents | d9b6ff839eab |
children | 754a4550c64e |
files | Makefile |
diffstat | 1 files changed, 60 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Sat Dec 01 03:27:31 2007 +0900 @@ -0,0 +1,60 @@ +PREFIX = /usr/local + +MAJOR = 0 +MINOR = 2 +REVISION = 0 +VER = ${MAJOR}.${MINOR}.${REVISION} + +CC = gcc +#OBJS = guess.o + +SRCS = guess.c \ + arabic_impl.c \ + cjk_impl.c \ + greek_impl.c \ + hebrew_impl.c \ + russian_impl.c \ + turkish_impl.c + + +#SRCS = ${OBJS:.o=.c} guess_tab.c libguess.h test.c + +OBJS = ${SRCS:.c=.o} + +LIBS = libguess.so libguess.a +CFLAGS += -fPIC +SONAME = libguess.so.${MAJOR} + + +all: $(LIBS) + +libguess.so: ${OBJS} + ${CC} -o libguess.so -shared -Wl,-soname,${SONAME} ${OBJS} + +libguess.a: ${OBJS} + ar rc libguess.a ${OBJS} + ranlib libguess.a + +$(OBJS) : $(SRCS) libguess.h guess_tab.c + + +guess_tab.c : guess.scm + gosh guess.scm guess_tab.c + +test: test.c guess.c + gcc -g -o test test.c guess.c + +install: + install -m644 libguess.h ${PREFIX}/include + rm -f ${PREFIX}/lib/libguess.* + install -m755 libguess.so ${PREFIX}/lib/libguess.so.${VER} + install -m644 libguess.a ${PREFIX}/lib + ln -sf ${PREFIX}/lib/libguess.so.${VER} ${PREFIX}/lib/libguess.so.${MAJOR} + ln -sf ${PREFIX}/lib/libguess.so.${MAJOR} ${PREFIX}/lib/libguess.so + +clean: + rm -f $(LIBS) $(OBJS) test + +distclean: clean + rm -f *~ core* +