Code

build system: Define the 'version' target in the toplevel Makefile.
[template.git] / src / Makefile.am
1 AM_CFLAGS = @STRICT_CFLAGS@
3 include_HEADERS = foobar.h fb_features.h
4 lib_LTLIBRARIES = libfoobar.la
6 BUILT_SOURCES = fb_features.h
8 libfoobar_la_SOURCES = foobar.c foobar.h fb_features.h
9 libfoobar_la_LDFLAGS = -version-info 0:0:0
11 bin_PROGRAMS = fb
13 fb_SOURCES = fb.c foobar.h
14 fb_CFLAGS = $(AM_CFLAGS) -DBUILD_DATE="\"$$( date --utc '+%F %T' ) (UTC)\""
15 fb_LDADD = libfoobar.la
17 fb_features.h: fb_features.h.in ../version
18         source ../version; sed \
19             -e "s/@FB_VERSION_MAJOR@/$$VERSION_MAJOR/g" \
20             -e "s/@FB_VERSION_MINOR@/$$VERSION_MINOR/g" \
21             -e "s/@FB_VERSION_PATCH@/$$VERSION_PATCH/g" \
22             -e "s/@FB_VERSION_EXTRA@/$$VERSION_EXTRA/g" \
23             -e "s/@FB_VERSION_STRING@/$$VERSION_STRING/g" \
24             fb_features.h.in > fb_features.h
26 .PHONY: FORCE