From 06834930632cc2997f3cea770fa7a8931f3fa5ed Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Tue, 8 Feb 2011 16:41:18 +0100 Subject: build-sys: make libatasmart easily cross-compilable Pick up the AX_CC_FOR_BUILD macro from autoconf-archive (improved, going to be sent there soon), then use that one to find the host's compiler. Build the strpool in a different directory, since you cannot override CC and other variables on a per-target basis yet. While this adds recursivity to the build system is the best hope you have to properly solve the cross-compilation. Update .gitignore accordingly to the above changes, and make sure bootstrap.sh search macro files in the m4 directory. --- Makefile.am | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index b5f9476..1c70db1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,8 @@ EXTRA_DIST = \ blob-examples/WDC_WD5000AAKS--00TMA0-12.01C01 \ vala/atasmart.vapi -SUBDIRS = +# build the strpool tool first +SUBDIRS = strpool . CLEANFILES = atasmart.strpool.c @@ -64,9 +65,6 @@ sbin_PROGRAMS = \ skdump \ sktest -noinst_PROGRAMS = \ - strpool - lib_LTLIBRARIES = \ libatasmart.la @@ -90,13 +88,13 @@ libatasmart_la_LIBADD = \ libatasmart_la_CFLAGS = \ $(LIBUDEV_CFLAGS) -strpool_SOURCES = \ - strpool.c - BUILT_SOURCES = \ atasmart.strpool.c -atasmart.strpool.c: atasmart.c strpool - $(top_builddir)/strpool $< $@ +strpool/strpool: + $(MAKE) -C strpool strpool + +atasmart.strpool.c: atasmart.c strpool/strpool + $(top_builddir)/strpool/strpool $< $@ ACLOCAL_AMFLAGS = -I m4 -- cgit