The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1 | # Configuration for Linux on x86. |
| 2 | # Included by combo/select.make |
| 3 | |
| 4 | # right now we get these from the environment, but we should |
| 5 | # pick them from the tree somewhere |
| 6 | TOOLS_PREFIX := #prebuilt/windows/host/bin/ |
| 7 | TOOLS_EXE_SUFFIX := .exe |
| 8 | |
| 9 | # Settings to use MinGW has a cross-compiler under Linux |
| 10 | ifneq ($(findstring Linux,$(UNAME)),) |
| 11 | ifneq ($(strip $(USE_MINGW)),) |
| 12 | HOST_ACP_UNAVAILABLE := true |
| 13 | TOOLS_PREFIX := /usr/bin/i586-mingw32msvc- |
| 14 | TOOLS_EXE_SUFFIX := |
| 15 | $(combo_target)GLOBAL_CFLAGS += -DUSE_MINGW |
| 16 | $(combo_target)C_INCLUDES += /usr/lib/gcc/i586-mingw32msvc/3.4.4/include |
| 17 | $(combo_target)GLOBAL_LD_DIRS += -L/usr/i586-mingw32msvc/lib |
| 18 | endif |
| 19 | endif |
| 20 | |
| 21 | $(combo_target)CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX) |
| 22 | $(combo_target)CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX) |
| 23 | $(combo_target)AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX) |
| 24 | |
| 25 | $(combo_target)GLOBAL_CFLAGS += -include $(call select-android-config-h,windows) |
| 26 | $(combo_target)GLOBAL_LDFLAGS += --enable-stdcall-fixup |
| 27 | |
| 28 | # when building under Cygwin, ensure that we use Mingw compilation by default. |
| 29 | # you can disable this (i.e. to generate Cygwin executables) by defining the |
| 30 | # USE_CYGWIN variable in your environment, e.g.: |
| 31 | # |
| 32 | # export USE_CYGWIN=1 |
| 33 | # |
| 34 | # note that the -mno-cygwin flags are not needed when cross-compiling the |
| 35 | # Windows host tools on Linux |
| 36 | # |
| 37 | ifneq ($(findstring CYGWIN,$(UNAME)),) |
| 38 | ifeq ($(strip $(USE_CYGWIN)),) |
| 39 | $(combo_target)GLOBAL_CFLAGS += -mno-cygwin |
| 40 | $(combo_target)GLOBAL_LDFLAGS += -mno-cygwin -mconsole |
| 41 | endif |
| 42 | endif |
| 43 | |
| 44 | $(combo_target)SHLIB_SUFFIX := .dll |
| 45 | $(combo_target)EXECUTABLE_SUFFIX := .exe |
| 46 | |
| 47 | ifeq ($(combo_target),HOST_) |
| 48 | # $(1): The file to check |
| 49 | # TODO: find out what format cygwin's stat(1) uses |
| 50 | define get-file-size |
| 51 | 999999999 |
| 52 | endef |
| 53 | endif |