psx_gpu: fix divide by 0
[pcsx_rearmed.git] / plugins / gpu_neon / Makefile.test
CommitLineData
adb4b2c6 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}')
90ca4913 6HAVE_NEON = $(shell $(CC_) -E -dD $(CFLAGS) gpu.h | grep -q '__ARM_NEON__ 1' && echo 1)
adb4b2c6 7
9a6e7816 8CFLAGS += -ggdb -Wall -DTEST
90ca4913 9ifndef DEBUG
adb4b2c6 10CFLAGS += -O2
90ca4913 11endif
adb4b2c6 12ifeq "$(ARCH)" "arm"
13CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
14endif
15ifeq "$(ARCH)" "x86_64"
16CFLAGS += -m32
17endif
18
adb4b2c6 19TARGETS = test_peops test_unai
90ca4913 20ifeq "$(HAVE_NEON)" "1"
21TARGETS += test_neon
22endif
23
adb4b2c6 24SRC += test.c
25
26all: $(TARGETS)
27
90ca4913 28test_neon: SRC += psx_gpu_if.c psx_gpu/psx_gpu_arm_neon.S
29test_neon: psx_gpu_if.c psx_gpu/*.c
30test_neon: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
adb4b2c6 31test_peops: SRC += peops_if.c
32test_peops: CFLAGS += -fno-strict-aliasing
90ca4913 33test_unai: SRC += unai_if.cpp ../gpu_unai/gpu_arm.s
adb4b2c6 34test_unai: CC_ = $(CXX)
35
36$(TARGETS): $(SRC)
37 $(CC_) -o $@ $(SRC) $(CFLAGS) $(LDFLAGS)
38
39clean:
40 $(RM) $(TARGETS)