aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: 63a00b4dea6f0c26b79a34b94af1f18e3764cf73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#
#
# Makefile.am:
#
# Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
# All rights reserved.
#
# $Id$
#
# $Log$
# Revision 1.10  2008/02/13 18:05:06  james
# *** empty log message ***
#
# Revision 1.9  2008/02/13 16:57:29  james
# *** empty log message ***
#
# Revision 1.8  2008/02/13 09:12:20  james
# *** empty log message ***
#
# Revision 1.7  2008/02/12 22:36:46  james
# *** empty log message ***
#
# Revision 1.6  2008/02/09 15:47:28  james
# *** empty log message ***
#
# Revision 1.5  2008/02/08 15:06:42  james
# *** empty log message ***
#
# Revision 1.4  2008/02/07 01:04:16  james
# *** empty log message ***
#
# Revision 1.3  2008/02/07 00:39:13  james
# *** empty log message ***
#
# Revision 1.2  2008/02/04 01:32:39  james
# *** empty log message ***
#
# Revision 1.1  2008/02/03 16:20:24  james
# *** empty log message ***
#
#
#
#

INCLUDES=

PROJECTHDRS= crt.h tty.h ansi.h vt102.h keys.h history.h ring.h slide.h log.h ipc.h context.h symsocket.h prototypes.h

HDRS=project.h 

SRCS=ansi.c crt.c html.c libsympathy.c render.c  version.c vt102.c tty.c \
	history.c ring.c ptty.c terminal.c util.c log.c ipc.c slide.c symsocket.c

CPROTO=cproto

SYMPATHYSRCS=${SRCS}

noinst_HEADERS= prototypes.h ${HDRS}


libsympathy_a_SOURCES =  ${SYMPATHYSRCS}
libsympathy_la_SOURCES = ${SYMPATHYSRCS}

libsympathy_a_CFLAGS = ${AM_CFLAGS}

BUILT_SOURCES = version.h sympathy.h

lib_LIBRARIES=libsympathy.a
lib_LTLIBRARIES=libsympathy.la

include_HEADERS=sympathy.h

AM_CFLAGS=-g -Werror

libsympathy_la_LDFLAGS = \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -release $(LT_RELEASE) \
        -export-dynamic 

VFD=${srcdir}/..
VF=${shell cat ${VFD}/version-files}
VFS=${VF:%=${VFD}/%}
VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }'  }
VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }

protos:
	echo > prototypes.h
	${CPROTO} -e -v ${INCLUDES} ${SRCS} > prototypes.tmp
	mv -f prototypes.tmp prototypes.h

tidy: ${SRCS} ${HDRS}
	indent -i2 -ts0 ${SRCS} ${HDRS}	

sympathy.h: ${PROJECTHDRS} sympathy.h.head sympathy.h.tail
	cat sympathy.h.head ${PROJECTHDRS} sympathy.h.tail > $@ || /bin/rm -f $@

version.h: $(VFD)/version-files $(VFD)/version-major \
	$(VFD)/version-minor $(VFD)/version-micro \
	$(VFD)/version-md5sums ${VFS} Makefile
	if [ .${VNUM} = . ]; then \
		echo "#define VERSION \"libsympathy Version ${VDEF} + Edits\"" > version.h; \
		echo ${VDEF}-E > version-num; \
	else \
		echo "#define VERSION \"libsympathy Version ${VNUM}\"" > version.h; \
		echo ${VNUM} > version-num; \
	fi