diff options
author | Lauri Leukkunen <lle@rahina.org> | 2007-05-25 00:04:28 +0300 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2007-05-25 00:04:28 +0300 |
commit | 29e8b10285f7f3a9e6b550e31618e940ee68fec6 (patch) | |
tree | 89ed2b298896e9c8be95a2c59ca86b9ed61551c7 | |
parent | fb3bb21b9317d1dc6fb1241adbf036f08ea8da91 (diff) |
Build system obeys ./configure --prefix properly
Signed-off-by: Lauri Leukkunen <lle@rahina.org>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | config.mak.in | 4 | ||||
-rw-r--r-- | configure.ac | 4 |
4 files changed, 16 insertions, 1 deletions
@@ -15,4 +15,5 @@ utils/sb_gcc_wrapper *.d autom4te.cache mapping/libmapping.a +config.mak @@ -15,7 +15,7 @@ export CC CFLAGS CXX CXXFLAGS TOPDIR LLBUILD targets = subdirs = mapping preload utils --include .config +include config.mak include $(LLBUILD)/Makefile.include all: $(targets) @@ -23,6 +23,12 @@ all: $(targets) gcc_bins = addr2line ar as cc c++ c++filt cpp g++ gcc gcov gdb gdbtui gprof ld nm objcopy objdump ranlib rdi-stub readelf run size strings strip gcc_bins_expanded = $(foreach v,$(gcc_bins),$(prefix)/bin/host-$(v)) +config.mak: configure + ./configure + +configure: configure.ac autogen.sh + ./autogen.sh + install: $(targets) install -d -m 755 $(prefix)/bin install -d -m 755 $(prefix)/lib diff --git a/config.mak.in b/config.mak.in new file mode 100644 index 0000000..96b1ddb --- /dev/null +++ b/config.mak.in @@ -0,0 +1,4 @@ +prefix=@prefix@ +CC=@CC@ +CXX=@CXX@ + diff --git a/configure.ac b/configure.ac index 1d97ed2..32728ec 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,7 @@ AC_INIT([sb2], [1.99b], [lle@rahina.org]) #AM_MAINTAINER_MODE #AC_CONFIG_SRCDIR([src/libfakechroot.c]) AC_CONFIG_HEADER([include/config.h]) +AC_CONFIG_FILES([config.mak]) AC_LANG_C # Checks for programs. @@ -172,5 +173,8 @@ ssize_t readlink(const char *path, char *buf, size_t bufsize) { return 0; }]])], readlink_type="ssize_t", readlink_type="int") AC_DEFINE_UNQUOTED(READLINK_TYPE, ${readlink_type}) +AC_SUBST(PREFIX, ${prefix}) +AC_SUBST(CC, ${CC}) +AC_SUBST(CXX, ${CXX}) AC_OUTPUT |