From e39e8942860e620953f1dba3e30a732b1958ce6b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 11 Aug 2015 23:54:27 +0200 Subject: [PATCH] allow for build directory different than source directory --- cctools/ar/Makefile.am | 2 +- cctools/as/Makefile.am | 2 +- cctools/as/arm/Makefile.am | 2 +- cctools/as/i386/Makefile.am | 2 +- cctools/as/ppc/Makefile.am | 2 +- cctools/as/ppc64/Makefile.am | 2 +- cctools/as/x86_64/Makefile.am | 2 +- cctools/ld/Makefile.am | 2 +- cctools/ld64/src/ld/Makefile.am | 8 ++++---- cctools/ld64/src/ld/parsers/Makefile.am | 2 +- cctools/ld64/src/other/Makefile.am | 4 ++-- cctools/m4/llvm.m4 | 2 +- cctools/misc/Makefile.am | 2 +- cctools/otool/Makefile.am | 6 +++--- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cctools/ar/Makefile.am b/cctools/ar/Makefile.am index e4a9d0e3..fb930394 100644 --- a/cctools/ar/Makefile.am +++ b/cctools/ar/Makefile.am @@ -1,6 +1,6 @@ bin_PROGRAMS = ar ar_LDADD = \ - $(top_srcdir)/libstuff/libstuff.la + $(top_builddir)/libstuff/libstuff.la ar_CFLAGS = -D__DARWIN_UNIX03 -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff $(WARNINGS) $(LTO_DEF) $(ENDIAN_FLAG) diff --git a/cctools/as/Makefile.am b/cctools/as/Makefile.am index deaf3147..efe4bb4b 100644 --- a/cctools/as/Makefile.am +++ b/cctools/as/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS=arm i386 x86_64 ppc ppc64 bin_PROGRAMS = as as_LDADD = \ - $(top_srcdir)/libstuff/libstuff.la + $(top_builddir)/libstuff/libstuff.la as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff $(WARNINGS) $(LTO_DEF) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 $(ENDIAN_FLAG) diff --git a/cctools/as/arm/Makefile.am b/cctools/as/arm/Makefile.am index 1e918012..0abb0473 100644 --- a/cctools/as/arm/Makefile.am +++ b/cctools/as/arm/Makefile.am @@ -1,7 +1,7 @@ libexec_PROGRAMS = arm-as arm_as_LDADD = \ - $(top_srcdir)/libstuff/libstuff.la + $(top_builddir)/libstuff/libstuff.la arm_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEF) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DARM $(ENDIAN_FLAG) diff --git a/cctools/as/i386/Makefile.am b/cctools/as/i386/Makefile.am index 18be3aa0..2950c53c 100644 --- a/cctools/as/i386/Makefile.am +++ b/cctools/as/i386/Makefile.am @@ -1,7 +1,7 @@ libexec_PROGRAMS = i386-as i386_as_LDADD = \ - $(top_srcdir)/libstuff/libstuff.la + $(top_builddir)/libstuff/libstuff.la i386_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEF) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DI386 -Di486 -Di586 -Di686 -UPPC $(ENDIAN_FLAG) diff --git a/cctools/as/ppc/Makefile.am b/cctools/as/ppc/Makefile.am index 8d215565..8658cf8b 100644 --- a/cctools/as/ppc/Makefile.am +++ b/cctools/as/ppc/Makefile.am @@ -1,7 +1,7 @@ libexec_PROGRAMS = ppc-as ppc_as_LDADD = \ - $(top_srcdir)/libstuff/libstuff.la + $(top_builddir)/libstuff/libstuff.la ppc_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEF) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DPPC $(ENDIAN_FLAG) diff --git a/cctools/as/ppc64/Makefile.am b/cctools/as/ppc64/Makefile.am index 64c15d5c..414da6da 100644 --- a/cctools/as/ppc64/Makefile.am +++ b/cctools/as/ppc64/Makefile.am @@ -1,7 +1,7 @@ libexec_PROGRAMS = ppc64-as ppc64_as_LDADD = \ - $(top_srcdir)/libstuff/libstuff.la + $(top_builddir)/libstuff/libstuff.la ppc64_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEF) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DPPC -DARCH64 $(ENDIAN_FLAG) diff --git a/cctools/as/x86_64/Makefile.am b/cctools/as/x86_64/Makefile.am index 3e474c32..e351b781 100644 --- a/cctools/as/x86_64/Makefile.am +++ b/cctools/as/x86_64/Makefile.am @@ -1,7 +1,7 @@ libexec_PROGRAMS = x86_64-as x86_64_as_LDADD = \ - $(top_srcdir)/libstuff/libstuff.la + $(top_builddir)/libstuff/libstuff.la x86_64_as_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff -I$(top_srcdir)/as $(WARNINGS) $(LTO_DEF) -DNeXT_MOD -DASLIBEXECDIR="\"$(ASLIBEXECDIR)/\"" -D__DARWIN_UNIX03 -DI386 -Di486 -Di586 -Di686 -DARCH64 $(ENDIAN_FLAG) diff --git a/cctools/ld/Makefile.am b/cctools/ld/Makefile.am index ed34eb03..a4e318d0 100644 --- a/cctools/ld/Makefile.am +++ b/cctools/ld/Makefile.am @@ -1,6 +1,6 @@ bin_PROGRAMS = ld_classic ld_classic_LDADD = \ - $(top_srcdir)/libstuff/libstuff.la $(UUID_LIB) + $(top_builddir)/libstuff/libstuff.la $(UUID_LIB) ld_classic_CFLAGS = -D__DARWIN_UNIX03 -I$(top_srcdir)/include -I$(top_srcdir)/include/foreign -I$(top_srcdir)/libstuff $(WARNINGS) $(LTO_DEF) $(ENDIAN_FLAG) -DDEBUG diff --git a/cctools/ld64/src/ld/Makefile.am b/cctools/ld64/src/ld/Makefile.am index 5803c914..d21387cd 100644 --- a/cctools/ld64/src/ld/Makefile.am +++ b/cctools/ld64/src/ld/Makefile.am @@ -2,10 +2,10 @@ SUBDIRS = parsers passes bin_PROGRAMS = ld ld_LDADD = \ - $(top_srcdir)/ld64/src/3rd/libhelper.la \ - $(top_srcdir)/ld64/src/3rd/BlocksRuntime/libBlocksRuntime.la \ - $(top_srcdir)/ld64/src/ld/parsers/libParsers.la \ - $(top_srcdir)/ld64/src/ld/passes/libPasses.la \ + $(top_builddir)/ld64/src/3rd/libhelper.la \ + $(top_builddir)/ld64/src/3rd/BlocksRuntime/libBlocksRuntime.la \ + $(top_builddir)/ld64/src/ld/parsers/libParsers.la \ + $(top_builddir)/ld64/src/ld/passes/libPasses.la \ $(DL_LIB) \ $(UUID_LIB) \ $(LTO_LIB) diff --git a/cctools/ld64/src/ld/parsers/Makefile.am b/cctools/ld64/src/ld/parsers/Makefile.am index 0f1899be..cc16f86b 100644 --- a/cctools/ld64/src/ld/parsers/Makefile.am +++ b/cctools/ld64/src/ld/parsers/Makefile.am @@ -8,7 +8,7 @@ noinst_HEADERS = \ opaque_section_file.h libParsers_la_LIBADD = \ - $(top_srcdir)/ld64/src/3rd/libhelper.la + $(top_builddir)/ld64/src/3rd/libhelper.la libParsers_la_CXXFLAGS = \ -D__DARWIN_UNIX03 \ diff --git a/cctools/ld64/src/other/Makefile.am b/cctools/ld64/src/other/Makefile.am index 1df63d39..867993b2 100644 --- a/cctools/ld64/src/other/Makefile.am +++ b/cctools/ld64/src/other/Makefile.am @@ -39,12 +39,12 @@ ObjectDump_SOURCES = \ ObjectDump.cpp \ $(top_srcdir)/ld64/src/ld/debugline.c ObjectDump_LDADD = \ - $(top_srcdir)/ld64/src/ld/parsers/libParsers.la \ + $(top_builddir)/ld64/src/ld/parsers/libParsers.la \ $(LTO_LIB) dyldinfo_SOURCES = dyldinfo.cpp dyldinfo_LDADD = \ - $(top_srcdir)/ld64/src/3rd/libhelper.la + $(top_builddir)/ld64/src/3rd/libhelper.la diff --git a/cctools/m4/llvm.m4 b/cctools/m4/llvm.m4 index a3e28ec8..29dafca6 100644 --- a/cctools/m4/llvm.m4 +++ b/cctools/m4/llvm.m4 @@ -39,7 +39,7 @@ AC_DEFUN([CHECK_LLVM], LTO_DEF=-DLTO_SUPPORT # DO NOT include the LLVM include dir directly, # it may cause the build to fail. - `cp -r $LLVM_INCLUDE_DIR/llvm-c/lto.h include/llvm-c/lto.h 2>/dev/null 1>&2` + cp -f $LLVM_INCLUDE_DIR/llvm-c/lto.h `dirname ${0}`/include/llvm-c/lto.h AC_SUBST([LTO_DEF]) AC_SUBST([LTO_RPATH]) AC_SUBST([LTO_LIB]) ]) diff --git a/cctools/misc/Makefile.am b/cctools/misc/Makefile.am index 1f1c869d..73f4da11 100644 --- a/cctools/misc/Makefile.am +++ b/cctools/misc/Makefile.am @@ -18,7 +18,7 @@ bin_PROGRAMS = \ codesign_allocate LDADD = \ - $(top_srcdir)/libstuff/libstuff.la \ + $(top_builddir)/libstuff/libstuff.la \ $(DL_LIB) \ $(LTO_RPATH) diff --git a/cctools/otool/Makefile.am b/cctools/otool/Makefile.am index f677f239..a4a66579 100644 --- a/cctools/otool/Makefile.am +++ b/cctools/otool/Makefile.am @@ -2,12 +2,12 @@ bin_PROGRAMS = otool if ISDARWIN otool_LDADD = \ -$(top_srcdir)/libstuff/libstuff.la \ +$(top_builddir)/libstuff/libstuff.la \ $(PTHREAD_FLAGS) $(CXXABI_LIB) $(DL_LIB) -lobjc else otool_LDADD = \ -$(top_srcdir)/libstuff/libstuff.la \ -$(top_srcdir)/libobjc2/libobjc.la \ +$(top_builddir)/libstuff/libstuff.la \ +$(top_builddir)/libobjc2/libobjc.la \ $(PTHREAD_FLAGS) $(CXXABI_LIB) $(DL_LIB) endif