psx_gpu: partial interlace mode support
[pcsx_rearmed.git] / plugins / gpu_neon / Makefile.test
... / ...
CommitLineData
1CC = $(CROSS_COMPILE)gcc
2CXX = $(CROSS_COMPILE)g++
3CC_ = $(CROSS_COMPILE)gcc
4
5ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
6HAVE_NEON = $(shell $(CC_) -E -dD $(CFLAGS) gpu.h | grep -q '__ARM_NEON__ 1' && echo 1)
7
8CFLAGS += -ggdb -Wall -DTEST
9ifndef DEBUG
10CFLAGS += -O2
11endif
12ifeq "$(ARCH)" "arm"
13CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
14endif
15ifeq "$(ARCH)" "x86_64"
16CFLAGS += -m32
17endif
18
19TARGETS = test_neon test_peops test_unai
20
21SRC += test.c
22
23all: $(TARGETS)
24
25test_neon: SRC += psx_gpu_if.c
26test_neon: psx_gpu_if.c psx_gpu/*.c
27test_neon: CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
28ifeq "$(HAVE_NEON)" "1"
29test_neon: SRC += psx_gpu/psx_gpu_arm_neon.S
30test_neon: CFLAGS += -DNEON_BUILD
31else
32test_neon: CFLAGS += -fno-strict-aliasing
33endif
34test_peops: SRC += peops_if.c
35test_peops: CFLAGS += -fno-strict-aliasing
36test_unai: SRC += unai_if.cpp
37test_unai: CC_ = $(CXX)
38ifeq "$(ARCH)" "arm"
39test_unai: SRC += ../gpu_unai/gpu_arm.s
40endif
41
42$(TARGETS): $(SRC)
43 $(CC_) -o $@ $(SRC) $(CFLAGS) $(LDFLAGS)
44
45clean:
46 $(RM) $(TARGETS)