HOST_windows-x86.mk revision 31ef1037bf7b66e949ecf52a1a29672d43ebfef8
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 22TOOLS_PREFIX := #prebuilt/windows/host/bin/ 23TOOLS_EXE_SUFFIX := .exe 24 25# Settings to use MinGW has a cross-compiler under Linux 26ifneq ($(findstring Linux,$(UNAME)),) 27ifneq ($(strip $(USE_MINGW)),) 28HOST_ACP_UNAVAILABLE := true 29TOOLS_EXE_SUFFIX := 30HOST_GLOBAL_CFLAGS += -DUSE_MINGW 31ifneq ($(strip $(BUILD_HOST_64bit)),) 32TOOLS_PREFIX := /usr/bin/amd64-mingw32msvc- 33HOST_C_INCLUDES += /usr/lib/gcc/amd64-mingw32msvc/4.4.2/include 34HOST_GLOBAL_LD_DIRS += -L/usr/amd64-mingw32msvc/lib 35else 36TOOLS_PREFIX := /usr/bin/i586-mingw32msvc- 37HOST_C_INCLUDES += /usr/lib/gcc/i586-mingw32msvc/3.4.4/include 38HOST_GLOBAL_LD_DIRS += -L/usr/i586-mingw32msvc/lib 39endif # BUILD_HOST_64bit 40endif # USE_MINGW 41endif # Linux 42 43HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX) 44HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX) 45HOST_AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX) 46 47HOST_GLOBAL_CFLAGS += -include $(call select-android-config-h,windows) 48HOST_GLOBAL_LDFLAGS += --enable-stdcall-fixup 49ifneq ($(strip $(BUILD_HOST_static)),) 50# Statically-linked binaries are desirable for sandboxed environment 51HOST_GLOBAL_LDFLAGS += -static 52endif # BUILD_HOST_static 53 54# when building under Cygwin, ensure that we use Mingw compilation by default. 55# you can disable this (i.e. to generate Cygwin executables) by defining the 56# USE_CYGWIN variable in your environment, e.g.: 57# 58# export USE_CYGWIN=1 59# 60# note that the -mno-cygwin flags are not needed when cross-compiling the 61# Windows host tools on Linux 62# 63ifneq ($(findstring CYGWIN,$(UNAME)),) 64ifeq ($(strip $(USE_CYGWIN)),) 65HOST_GLOBAL_CFLAGS += -mno-cygwin 66HOST_GLOBAL_LDFLAGS += -mno-cygwin -mconsole 67endif 68endif 69 70HOST_SHLIB_SUFFIX := .dll 71HOST_EXECUTABLE_SUFFIX := .exe 72 73# $(1): The file to check 74# TODO: find out what format cygwin's stat(1) uses 75define get-file-size 76999999999 77endef 78