[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cross compiling build tools with EXEEXT
From: |
Ralf Wildenhues |
Subject: |
Re: Cross compiling build tools with EXEEXT |
Date: |
Sun, 7 Dec 2008 20:03:45 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello Theo,
* Theo Markettos wrote on Mon, Dec 01, 2008 at 01:32:12PM CET:
> I'm trying to run an existing autoconf/automake setup in a cross compiler.
> The cross compiler script generally Does The Right Thing about setting up
> --build, --host etc etc.
> noinst_PROGRAMS = bf_test
> So far I've modified the Makefile.am to build bf_test using $(CC_FOR_BUILD)
> and some special make rules:
>
> bf_test_SOURCES = file1.c file2.c file3.c
>
> bf_test: $(bf_test_SOURCES)
> $(CC_FOR_BUILD) -o bf_test $(bf_test_SOURCES)
>
> That's fine, only the cross compiler needs to put an extension ,e1f on
> executables for the host system. $(EXEEXT) is set up for this, and normally
> it works fine.
> Is there some way of saying "I want the following built for the build system
> not the host system, so build them according to the native rules" - which
> would use CC_FOR_BUILD, EXEEXT_FOR_BUILD, etc? Maybe a list of targets
> called something like noinst_BUILD_PROGRAMS?
I think you might have to go without Automake rules and special
variables. IOW, don't use noinst_PROGRAMS, define your own rules for
bf_test$(EXEEXT_FOR_BUILD) and its objects, and hook things into
all-local, (MOSTLY)CLEANFILES and/or (mostly)clean-local. If you need
bf_test to generate source files listed in the current Makefile.am,
then you may need to list bf_test$(EXEEXT_FOR_BUILD) in BUILT_SOURCES.
I think that if OTOH you only produce stuff for the build system in the
current Makefile.am, then you can probably just overwrite
EXEEXT = $(EXEEXT_FOR_BUILD)
and most things should work as needed.
Hope that helps.
Cheers,
Ralf