fix non-cross compile
[ia32rtools.git] / winelib.mak
1 # CROSS_COMPILE ?=
2 CC = winegcc
3 RC = wrc
4
5 CFLAGS += -Wall -g -gdwarf-2 -fno-strict-aliasing -mno-cygwin
6 ifndef DEBUG
7 CFLAGS += -O2
8 endif
9 LDFLAGS += -g
10
11 ifdef ARM
12 CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=neon
13 CFLAGS += -Wno-unused -fsigned-char
14 WGCC_FLAGS += -marm
15 ifneq ($(CROSS_COMPILE),)
16 WGCC_FLAGS += -b$(patsubst %-,%,$(CROSS_COMPILE))
17 endif
18 # wine defines wchar_t correctly, doesn't use -fshort-wchar, we can't too
19 WGCC_FLAGS += -fno-short-wchar
20 # WGCC_FLAGS += --sysroot $(WINEROOT)
21 CFLAGS += $(WGCC_FLAGS)
22 LDFLAGS += $(WGCC_FLAGS)
23
24 # should not be needed, but..
25 WINEROOT ?= $(HOME)/stuff/wine_arm/inst
26 CFLAGS += -isystem$(WINEROOT)/include/wine/msvcrt
27 CFLAGS += -isystem$(WINEROOT)/include/wine/windows
28 LDFLAGS += -L$(WINEROOT)/lib/wine -L$(WINEROOT)/lib
29
30 CVT_OPT = -a
31 BUILTIN = 1
32 export ARM
33 else
34 CFLAGS += -Wno-unused-but-set-variable
35 CFLAGS += -m32
36 LDFLAGS += -m32
37 endif
38
39