annotate Makefile.old @ 6:c61a7765c8f5 default tip

added COPYING to make the licence and copyrights clear.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 08 Mar 2012 11:08:07 +0900
parents d9b6ff839eab
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
1 PREFIX = /usr/local
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
2
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
3 MAJOR = 0
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
4 MINOR = 2
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
5 REVISION = 0
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
6 VER = ${MAJOR}.${MINOR}.${REVISION}
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
7
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
8 CC = gcc
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
9 OBJS = guess.o
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
10 SRCS = ${OBJS:.o=.c} guess_tab.c libguess.h test.c
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
11 LIBS = libguess.so libguess.a
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
12 CFLAGS += -fPIC
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
13 SONAME = libguess.so.${MAJOR}
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
14
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
15
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
16 all: $(LIBS)
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
17
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
18 libguess.so: ${OBJS}
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
19 ${CC} -o libguess.so -shared -Wl,-soname,${SONAME} ${OBJS}
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
20
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
21 libguess.a: ${OBJS}
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
22 ar rc libguess.a ${OBJS}
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
23 ranlib libguess.a
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
24
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
25 $(OBJS) : $(SRCS)
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
26
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
27 guess_tab.c : guess.scm
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
28 gosh guess.scm guess_tab.c
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
29
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
30 test: test.c guess.c
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
31 gcc -g -o test test.c guess.c
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
32
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
33 install:
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
34 install -m644 libguess.h ${PREFIX}/include
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
35 rm -f ${PREFIX}/lib/libguess.*
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
36 install -m755 libguess.so ${PREFIX}/lib/libguess.so.${VER}
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
37 install -m644 libguess.a ${PREFIX}/lib
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
38 ln -sf ${PREFIX}/lib/libguess.so.${VER} ${PREFIX}/lib/libguess.so.${MAJOR}
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
39 ln -sf ${PREFIX}/lib/libguess.so.${MAJOR} ${PREFIX}/lib/libguess.so
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
40
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
41 clean:
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
42 rm -f $(LIBS) $(OBJS) test
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
43
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
44 distclean: clean
d9b6ff839eab initial import
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
diff changeset
45 rm -f *~ core*