From 5d3e093d432a31fb8a8267cbf30f1ed892f49508 Mon Sep 17 00:00:00 2001 From: root <> Date: Sun, 8 Feb 2009 16:25:32 +0000 Subject: *** empty log message *** --- src/Makefile.am | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/Makefile.am (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..fb8a416 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,76 @@ +# +# +# Makefile.am: +# +# Copyright (c) 2009 James McKenzie <20@madingley.org>, +# All rights reserved. +# +# $Id$ +# +# $Log$ +# Revision 1.1 2009/02/08 16:25:32 root +# *** empty log message *** +# +# +# +# + +INCLUDES = + +SRCS= libjwg.c version.c +CPROTO=cproto + +JWGSRCS=${SRCS} + +noinst_HEADERS= project.h prototypes.h jwg-tail.h ext_prototypes.h + +libjwg_a_SOURCES = ${JWGSRCS} +libjwg_la_SOURCES = ${JWGSRCS} + +libjwg_a_CFLAGS = ${AM_CFLAGS} + +BUILT_SOURCES = version.h jwg.h + +lib_LIBRARIES=libjwg.a +lib_LTLIBRARIES=libjwg.la + +include_HEADERS=jwg.h + +AM_CFLAGS=-g + +libjwg_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` } + + +jwg.h:jwg-head.h ext_prototypes.h jwg-tail.h + cat jwg-head.h ext_prototypes.h jwg-tail.h > jwg.h + +protos: + echo > prototypes.h + echo > ext_prototypes.h + cat jwg-head.h ext_prototypes.h jwg-tail.h > jwg.h + ${CPROTO} -v -DINT_PROTOS ${INCLUDES} ${SRCS} > prototypes.tmp + mv -f prototypes.tmp prototypes.h + ${CPROTO} -v -DEXT_PROTOS ${INCLUDES} ${SRCS} > ext_prototypes.h + cat jwg-head.h ext_prototypes.h jwg-tail.h > jwg.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 \"libjwg Version ${VDEF} + Edits\"" > version.h; \ + echo ${VDEF}-E > version-num; \ + else \ + echo "#define VERSION \"libjwg Version ${VNUM}\"" > version.h; \ + echo ${VNUM} > version-num; \ + fi + -- cgit v1.2.3