aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..6b4b5e4
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,60 @@
+#
+#
+# Makefile.am:
+#
+# Copyright (c) 2007 James McKenzie <james@fishsoup.dhs.org>,
+# All rights reserved.
+#
+# $Id: Makefile.am,v 1.1 2007/09/08 16:49:37 root Exp $
+#
+# $Log: Makefile.am,v $
+# Revision 1.1 2007/09/08 16:49:37 root
+# *** empty log message ***
+#
+#
+#
+#
+
+CPROTO=cproto
+INCLUDES =
+
+noinst_HEADERS=project.h prototypes.h
+
+bin_PROGRAMS = gpt
+
+SRCS=gpt.c version.c
+gpt_SOURCES = ${SRCS}
+gpt_LDADD =
+
+AM_CFLAGS=-g
+
+gpt_LDFLAGS =
+
+BUILT_SOURCES = version.h
+
+
+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 \"gpt Version ${VDEF} + Edits\"" > version.h; \
+ echo ${VDEF}-E > version-num; \
+ else \
+ echo "#define VERSION \"gpt Version ${VNUM}\"" > version.h; \
+ echo ${VNUM} > version-num; \
+ fi
+