| 1 | # CROSS_COMPILE ?= |
| 2 | CC = winegcc |
| 3 | RC = wrc |
| 4 | |
| 5 | CFLAGS += -Wall -ggdb -fno-strict-aliasing -mno-cygwin |
| 6 | ifndef DEBUG |
| 7 | CFLAGS += -O2 |
| 8 | endif |
| 9 | LDFLAGS += -ggdb |
| 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 -b$(patsubst %-,%,$(CROSS_COMPILE)) |
| 15 | # wine defines wchar_t correctly, doesn't use -fshort-wchar, we can't too |
| 16 | WGCC_FLAGS += -fno-short-wchar |
| 17 | # WGCC_FLAGS += --sysroot $(WINEROOT) |
| 18 | CFLAGS += $(WGCC_FLAGS) |
| 19 | LDFLAGS += $(WGCC_FLAGS) |
| 20 | |
| 21 | # should not be needed, but.. |
| 22 | WINEROOT ?= $(HOME)/stuff/wine_arm/inst |
| 23 | CFLAGS += -isystem$(WINEROOT)/include/wine/msvcrt |
| 24 | CFLAGS += -isystem$(WINEROOT)/include/wine/windows |
| 25 | LDFLAGS += -L$(WINEROOT)/lib/wine -L$(WINEROOT)/lib |
| 26 | |
| 27 | CVT_OPT = -a |
| 28 | BUILTIN = 1 |
| 29 | export ARM |
| 30 | else |
| 31 | CFLAGS += -Wno-unused-but-set-variable |
| 32 | CFLAGS += -m32 |
| 33 | LDFLAGS += -m32 |
| 34 | endif |
| 35 | |
| 36 | |