|  | 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 | # uncomment to use wine's msvcrt as the C library instead of glibc | 
|  | 11 | # LDFLAGS += -mno-cygwin | 
|  | 12 |  | 
|  | 13 | ifdef ARM | 
|  | 14 | CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=neon | 
|  | 15 | CFLAGS += -Wno-unused -fsigned-char | 
|  | 16 | WGCC_FLAGS += -marm | 
|  | 17 | ifneq ($(CROSS_COMPILE),) | 
|  | 18 | WGCC_FLAGS += -b$(patsubst %-,%,$(CROSS_COMPILE)) | 
|  | 19 | endif | 
|  | 20 | # wine defines wchar_t correctly, doesn't use -fshort-wchar, we can't too | 
|  | 21 | WGCC_FLAGS += -fno-short-wchar | 
|  | 22 | # WGCC_FLAGS += --sysroot $(WINEROOT) | 
|  | 23 | CFLAGS += $(WGCC_FLAGS) | 
|  | 24 | LDFLAGS += $(WGCC_FLAGS) | 
|  | 25 |  | 
|  | 26 | # should not be needed, but.. | 
|  | 27 | WINEROOT ?= $(HOME)/stuff/wine_arm/inst | 
|  | 28 | CFLAGS += -isystem$(WINEROOT)/include/wine/msvcrt | 
|  | 29 | CFLAGS += -isystem$(WINEROOT)/include/wine/windows | 
|  | 30 | LDFLAGS += -L$(WINEROOT)/lib/wine -L$(WINEROOT)/lib | 
|  | 31 |  | 
|  | 32 | CVT_OPT = -a | 
|  | 33 | BUILTIN = 1 | 
|  | 34 | export ARM | 
|  | 35 | else | 
|  | 36 | CFLAGS += -Wno-unused-but-set-variable | 
|  | 37 | CFLAGS += -m32 | 
|  | 38 | LDFLAGS += -m32 | 
|  | 39 | endif | 
|  | 40 |  | 
|  | 41 |  |