Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2006 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | # Configuration for Linux on x86. |
| 18 | # Included by combo/select.make |
| 19 | |
| 20 | # right now we get these from the environment, but we should |
| 21 | # pick them from the tree somewhere |
| 22 | TOOLS_PREFIX := #prebuilt/windows/host/bin/ |
| 23 | TOOLS_EXE_SUFFIX := .exe |
| 24 | |
| 25 | # Settings to use MinGW has a cross-compiler under Linux |
| 26 | ifneq ($(findstring Linux,$(UNAME)),) |
| 27 | ifneq ($(strip $(USE_MINGW)),) |
| 28 | HOST_ACP_UNAVAILABLE := true |
| 29 | TOOLS_PREFIX := /usr/bin/i586-mingw32msvc- |
| 30 | TOOLS_EXE_SUFFIX := |
| 31 | HOST_GLOBAL_CFLAGS += -DUSE_MINGW |
| 32 | HOST_C_INCLUDES += /usr/lib/gcc/i586-mingw32msvc/3.4.4/include |
| 33 | HOST_GLOBAL_LD_DIRS += -L/usr/i586-mingw32msvc/lib |
| 34 | endif |
| 35 | endif |
| 36 | |
| 37 | HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX) |
| 38 | HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX) |
| 39 | HOST_AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX) |
| 40 | |
| 41 | HOST_GLOBAL_CFLAGS += -include $(call select-android-config-h,windows) |
| 42 | HOST_GLOBAL_LDFLAGS += --enable-stdcall-fixup |
| 43 | |
| 44 | # when building under Cygwin, ensure that we use Mingw compilation by default. |
| 45 | # you can disable this (i.e. to generate Cygwin executables) by defining the |
| 46 | # USE_CYGWIN variable in your environment, e.g.: |
| 47 | # |
| 48 | # export USE_CYGWIN=1 |
| 49 | # |
| 50 | # note that the -mno-cygwin flags are not needed when cross-compiling the |
| 51 | # Windows host tools on Linux |
| 52 | # |
| 53 | ifneq ($(findstring CYGWIN,$(UNAME)),) |
| 54 | ifeq ($(strip $(USE_CYGWIN)),) |
| 55 | HOST_GLOBAL_CFLAGS += -mno-cygwin |
| 56 | HOST_GLOBAL_LDFLAGS += -mno-cygwin -mconsole |
| 57 | endif |
| 58 | endif |
| 59 | |
| 60 | HOST_SHLIB_SUFFIX := .dll |
| 61 | HOST_EXECUTABLE_SUFFIX := .exe |
| 62 | |
| 63 | # $(1): The file to check |
| 64 | # TODO: find out what format cygwin's stat(1) uses |
| 65 | define get-file-size |
| 66 | 999999999 |
| 67 | endef |