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