diff options
author | Diego Elio Pettenò <flameeyes@gmail.com> | 2011-02-08 16:41:18 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gmail.com> | 2011-02-08 16:41:18 +0100 |
commit | 06834930632cc2997f3cea770fa7a8931f3fa5ed (patch) | |
tree | aa652041ccde43338539c151f0fe2afd053b07d5 /Makefile.am | |
parent | b7067704706b6dd72b00d14a17be213a06bea502 (diff) | |
download | libatasmart-06834930632cc2997f3cea770fa7a8931f3fa5ed.tar.gz |
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.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 16 |
1 files changed, 7 insertions, 9 deletions
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 |