1ab64c54 |
1 | CC = $(CROSS_COMPILE)gcc |
56f08d83 |
2 | |
3 | ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}') |
4 | |
62d7fa95 |
5 | HAVE_NEON = $(shell $(CC) -E -dD $(CFLAGS_) ../gpulib/gpu.h | grep -q '__ARM_NEON__ 1' && echo 1) |
1ab64c54 |
6 | |
62d7fa95 |
7 | # FIXME: rework NEON detection to get rid of this |
56f08d83 |
8 | ifeq "$(ARCH)" "arm" |
62d7fa95 |
9 | ARM_CORTEXA8 ?= 1 |
10 | ifeq "$(ARM_CORTEXA8)" "1" |
11 | CFLAGS_ += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp |
12 | endif |
56f08d83 |
13 | endif |
1ab64c54 |
14 | |
62d7fa95 |
15 | CFLAGS += -ggdb -Wall -fPIC -O2 |
7d993ee2 |
16 | |
62d7fa95 |
17 | SRC += psx_gpu_if.c |
b78edec7 |
18 | |
62d7fa95 |
19 | CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP |
7d993ee2 |
20 | ifeq "$(HAVE_NEON)" "1" |
62d7fa95 |
21 | SRC += psx_gpu/psx_gpu_arm_neon.S |
22 | CFLAGS += -DNEON_BUILD |
b78edec7 |
23 | else |
62d7fa95 |
24 | CFLAGS += -fno-strict-aliasing |
b78edec7 |
25 | endif |
6f2ee2be |
26 | |
62d7fa95 |
27 | BIN_GPULIB = gpu_neon.so |
28 | include ../gpulib/gpulib.mak |