Home | History | Annotate | Download | only in combo
      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_EXE_SUFFIX :=
     30 HOST_GLOBAL_CFLAGS += -DUSE_MINGW
     31 ifneq ($(strip $(BUILD_HOST_64bit)),)
     32 TOOLS_PREFIX := /usr/bin/amd64-mingw32msvc-
     33 HOST_C_INCLUDES += /usr/lib/gcc/amd64-mingw32msvc/4.4.2/include
     34 HOST_GLOBAL_LD_DIRS += -L/usr/amd64-mingw32msvc/lib
     35 else
     36 TOOLS_PREFIX := /usr/bin/i586-mingw32msvc-
     37 HOST_C_INCLUDES += /usr/lib/gcc/i586-mingw32msvc/3.4.4/include
     38 HOST_GLOBAL_LD_DIRS += -L/usr/i586-mingw32msvc/lib
     39 endif # BUILD_HOST_64bit
     40 endif # USE_MINGW
     41 endif # Linux
     42 
     43 HOST_CC := $(TOOLS_PREFIX)gcc$(TOOLS_EXE_SUFFIX)
     44 HOST_CXX := $(TOOLS_PREFIX)g++$(TOOLS_EXE_SUFFIX)
     45 HOST_AR := $(TOOLS_PREFIX)ar$(TOOLS_EXE_SUFFIX)
     46 
     47 HOST_GLOBAL_CFLAGS += -include $(call select-android-config-h,windows)
     48 HOST_GLOBAL_LDFLAGS += --enable-stdcall-fixup
     49 ifneq ($(strip $(BUILD_HOST_static)),)
     50 # Statically-linked binaries are desirable for sandboxed environment
     51 HOST_GLOBAL_LDFLAGS += -static
     52 endif # 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 #
     63 ifneq ($(findstring CYGWIN,$(UNAME)),)
     64 ifeq ($(strip $(USE_CYGWIN)),)
     65 HOST_GLOBAL_CFLAGS += -mno-cygwin
     66 HOST_GLOBAL_LDFLAGS += -mno-cygwin -mconsole
     67 endif
     68 endif
     69 
     70 HOST_SHLIB_SUFFIX := .dll
     71 HOST_EXECUTABLE_SUFFIX := .exe
     72 
     73 # $(1): The file to check
     74 # TODO: find out what format cygwin's stat(1) uses
     75 define get-file-size
     76 999999999
     77 endef
     78