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