• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
6TOOLS_PREFIX := #prebuilt/windows/host/bin/
7TOOLS_EXE_SUFFIX := .exe
8
9# Settings to use MinGW has a cross-compiler under Linux
10ifneq ($(findstring Linux,$(UNAME)),)
11ifneq ($(strip $(USE_MINGW)),)
12HOST_ACP_UNAVAILABLE := true
13TOOLS_PREFIX := /usr/bin/i586-mingw32msvc-
14TOOLS_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
18endif
19endif
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#
37ifneq ($(findstring CYGWIN,$(UNAME)),)
38ifeq ($(strip $(USE_CYGWIN)),)
39$(combo_target)GLOBAL_CFLAGS += -mno-cygwin
40$(combo_target)GLOBAL_LDFLAGS += -mno-cygwin -mconsole
41endif
42endif
43
44$(combo_target)SHLIB_SUFFIX := .dll
45$(combo_target)EXECUTABLE_SUFFIX := .exe
46
47ifeq ($(combo_target),HOST_)
48# $(1): The file to check
49# TODO: find out what format cygwin's stat(1) uses
50define get-file-size
51999999999
52endef
53endif
54