5 # Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
11 # Revision 1.20 2008/02/27 15:04:32 james
12 # *** empty log message ***
14 # Revision 1.19 2008/02/27 10:47:34 james
15 # *** empty log message ***
17 # Revision 1.18 2008/02/26 23:23:17 james
18 # *** empty log message ***
20 # Revision 1.17 2008/02/24 00:42:53 james
21 # *** empty log message ***
23 # Revision 1.16 2008/02/22 23:39:27 james
24 # *** empty log message ***
26 # Revision 1.15 2008/02/15 16:48:56 james
27 # *** empty log message ***
29 # Revision 1.14 2008/02/15 03:32:07 james
30 # *** empty log message ***
32 # Revision 1.13 2008/02/14 16:21:17 james
33 # *** empty log message ***
35 # Revision 1.12 2008/02/14 02:46:44 james
36 # *** empty log message ***
38 # Revision 1.11 2008/02/14 01:55:57 james
39 # *** empty log message ***
41 # Revision 1.10 2008/02/13 18:05:06 james
42 # *** empty log message ***
44 # Revision 1.9 2008/02/13 16:57:29 james
45 # *** empty log message ***
47 # Revision 1.8 2008/02/13 09:12:20 james
48 # *** empty log message ***
50 # Revision 1.7 2008/02/12 22:36:46 james
51 # *** empty log message ***
53 # Revision 1.6 2008/02/09 15:47:28 james
54 # *** empty log message ***
56 # Revision 1.5 2008/02/08 15:06:42 james
57 # *** empty log message ***
59 # Revision 1.4 2008/02/07 01:04:16 james
60 # *** empty log message ***
62 # Revision 1.3 2008/02/07 00:39:13 james
63 # *** empty log message ***
65 # Revision 1.2 2008/02/04 01:32:39 james
66 # *** empty log message ***
68 # Revision 1.1 2008/02/03 16:20:24 james
69 # *** empty log message ***
77 # NB order here matters.
78 PROJECTHDRS= crt.h utf8.h tty.h ansi.h vt102.h keys.h history.h ring.h slide.h \
79 log.h ipc.h symsocket.h keydis.h cmd.h lockfile.h context.h \
80 vt102_charset.h prototypes.h
82 HDRS=project.h ${PROJECTHDRS}
85 SRCS=ansi.c crt.c html.c libsympathy.c render.c version.c vt102.c tty.c \
86 keydis.c history.c ring.c ptty.c terminal.c util.c log.c ipc.c \
87 slide.c symsocket.c serial.c cmd.c lockfile.c utf8.c vt102_charset.c
93 noinst_HEADERS= prototypes.h ${HDRS}
95 EXTRA_DIST=sympathy.h.tail
98 -rm -f sympathy.h version.h version-num
100 libsympathy_a_SOURCES = ${SYMPATHYSRCS}
101 libsympathy_la_SOURCES = ${SYMPATHYSRCS}
103 libsympathy_a_CFLAGS = ${AM_CFLAGS}
105 BUILT_SOURCES = version.h sympathy.h
107 lib_LIBRARIES=libsympathy.a
108 lib_LTLIBRARIES=libsympathy.la
110 include_HEADERS=sympathy.h
114 libsympathy_la_LDFLAGS = \
115 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
116 -release $(LT_RELEASE) \
120 VF=${shell cat ${VFD}/version-files}
122 VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
123 VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }' }
124 VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
128 ${CPROTO} -e -v ${INCLUDES} ${SRCS} > prototypes.tmp
129 mv -f prototypes.tmp prototypes.h
131 tidy: ${SRCS} ${HDRS}
132 indent -i2 -ts0 ${SRCS} ${HDRS}
135 sympathy.h: ${PROJECTHDRS} sympathy.h.head sympathy.h.tail
136 cat sympathy.h.head ${PROJECTHDRS} sympathy.h.tail > $@ || /bin/rm -f $@
138 version.h: $(VFD)/version-files $(VFD)/version-major \
139 $(VFD)/version-minor $(VFD)/version-micro \
140 $(VFD)/version-md5sums ${VFS} Makefile
141 if [ .${VNUM} = . ]; then \
142 echo "#define VERSION \"libsympathy Version ${VDEF} + Edits\"" > version.h; \
143 echo ${VDEF}-E > version-num; \
145 echo "#define VERSION \"libsympathy Version ${VNUM}\"" > version.h; \
146 echo ${VNUM} > version-num; \