gpu: improve timings of clipped sprites
[pcsx_rearmed.git] / plugins / gpulib / 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
b78edec7 19TARGETS = test_neon test_peops test_unai
90ca4913 20
adb4b2c6 21SRC += test.c
22
23all: $(TARGETS)
24
62d7fa95 25test_neon: SRC += ../gpu_neon/psx_gpu_if.c
b78edec7 26test_neon: CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
27ifeq "$(HAVE_NEON)" "1"
62d7fa95 28test_neon: SRC += ../gpu_neon/psx_gpu/psx_gpu_arm_neon.S
b78edec7 29test_neon: CFLAGS += -DNEON_BUILD
30else
31test_neon: CFLAGS += -fno-strict-aliasing
32endif
62d7fa95 33test_peops: SRC += ../dfxvideo/gpulib_if.c
adb4b2c6 34test_peops: CFLAGS += -fno-strict-aliasing
62d7fa95 35test_unai: SRC += ../gpu_unai/gpulib_if.cpp
adb4b2c6 36test_unai: CC_ = $(CXX)
b78edec7 37ifeq "$(ARCH)" "arm"
38test_unai: SRC += ../gpu_unai/gpu_arm.s
39endif
adb4b2c6 40
41$(TARGETS): $(SRC)
42 $(CC_) -o $@ $(SRC) $(CFLAGS) $(LDFLAGS)
43
44clean:
45 $(RM) $(TARGETS)