Hello everyone.

I need to build a native library and a cross-compiled libarary from
the same set of source files, but I don't find any method to specify
per-target compiler.

LISTING: configure.ac

AC_CANONICAL_SYSTEM
AC_PROG_CC
CC_FOR_BUILD=gcc
AC_SUBSET(CC_FOR_BUILD)


LISTING: Makefile.am

lib_LTLIBRARIES = libfoo-i686.la libfoo-or32.la

# native
libfoo_i686_la_SOURCES = foo.c
libfoo_i686_la_CC = $(CC_FOR_BUILD)  # it's not support
libfoo_i686_la_CFLAGS = $(CFLAGS_FOR_BUILD)

# cross-compiled
libfoo_or32_la_SOURCES = foo.c

I read the manual and guessed that AM_ENABLE_MULTILIB might be what
I'm looking for. But there isn't much information in the manual on how
the corresponding Makefile should be. Neither on Internet nor the
mailing list archive, surprisingly.


--
Tzu-Chien Chiu - SMedia Technology Corp.
URL: http://www.csie.nctu.edu.tw/~jwchiu/


Reply via email to