chiark / gitweb /
*** empty log message ***
[sympathy.git] / src / Makefile.am
1 #
2 #
3 # Makefile.am:
4 #
5 # Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
6 # All rights reserved.
7 #
8 # $Id$
9 #
10 # $Log$
11 # Revision 1.5  2008/02/08 15:06:42  james
12 # *** empty log message ***
13 #
14 # Revision 1.4  2008/02/07 01:04:16  james
15 # *** empty log message ***
16 #
17 # Revision 1.3  2008/02/07 00:39:13  james
18 # *** empty log message ***
19 #
20 # Revision 1.2  2008/02/04 01:32:39  james
21 # *** empty log message ***
22 #
23 # Revision 1.1  2008/02/03 16:20:24  james
24 # *** empty log message ***
25 #
26 #
27 #
28 #
29
30 INCLUDES = 
31
32 SRCS= ansi.c crt.c html.c libsympathy.c render.c  version.c vt102.c tty.c \
33         history.c buf.c
34 CPROTO=cproto
35
36 SYMPATHYSRCS=${SRCS}
37
38 noinst_HEADERS= project.h prototypes.h
39
40
41 libsympathy_a_SOURCES =  ${SYMPATHYSRCS}
42 libsympathy_la_SOURCES = ${SYMPATHYSRCS}
43
44 libsympathy_a_CFLAGS = ${AM_CFLAGS}
45
46 BUILT_SOURCES = version.h
47
48 lib_LIBRARIES=libsympathy.a
49 lib_LTLIBRARIES=libsympathy.la
50
51 include_HEADERS=sympathy.h
52
53 AM_CFLAGS=-g
54
55 libsympathy_la_LDFLAGS = \
56         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
57         -release $(LT_RELEASE) \
58         -export-dynamic 
59
60 VFD=${srcdir}/..
61 VF=${shell cat ${VFD}/version-files}
62 VFS=${VF:%=${VFD}/%}
63 VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
64 VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }'  }
65 VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
66
67 protos:
68         echo > prototypes.h
69         ${CPROTO} -v ${INCLUDES} ${SRCS} > prototypes.tmp
70         mv -f prototypes.tmp prototypes.h
71
72 version.h: $(VFD)/version-files $(VFD)/version-major \
73         $(VFD)/version-minor $(VFD)/version-micro \
74         $(VFD)/version-md5sums ${VFS} Makefile
75         if [ .${VNUM} = . ]; then \
76                 echo "#define VERSION \"libsympathy Version ${VDEF} + Edits\"" > version.h; \
77                 echo ${VDEF}-E > version-num; \
78         else \
79                 echo "#define VERSION \"libsympathy Version ${VNUM}\"" > version.h; \
80                 echo ${VNUM} > version-num; \
81         fi
82