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