diff options
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..b740cf3 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,69 @@ +# +# +# Makefile.am: +# +# Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>, +# All rights reserved. +# +# $Id$ +# +# $Log$ +# Revision 1.1 2008/02/03 16:20:24 james +# *** empty log message *** +# +# +# +# + +INCLUDES = + +SRCS= libsympathy.c version.c +CPROTO=cproto + +SYMPATHYSRCS=${SRCS} + +noinst_HEADERS= project.h prototypes.h + + +libsympathy_a_SOURCES = ${SYMPATHYSRCS} +libsympathy_la_SOURCES = ${SYMPATHYSRCS} + +libsympathy_a_CFLAGS = ${AM_CFLAGS} + +BUILT_SOURCES = version.h + +lib_LIBRARIES=libsympathy.a +lib_LTLIBRARIES=libsympathy.la + +include_HEADERS=sympathy.h + +AM_CFLAGS=-g + +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} -v ${INCLUDES} ${SRCS} > prototypes.tmp + mv -f prototypes.tmp prototypes.h + +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 + |