gpu_neon: flush queues before reads too
[pcsx_rearmed.git] / plugins / gpu_neon / Makefile
... / ...
CommitLineData
1CC = $(CROSS_COMPILE)gcc
2CXX = $(CROSS_COMPILE)g++
3CC_ = $(CC)
4
5ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
6
7CFLAGS += -ggdb -Wall -fPIC -O2
8CFLAGS += -fno-strict-aliasing
9ifdef MAEMO
10CFLAGS += -DMAEMO
11endif
12
13SRC += gpu.c
14ifeq "$(ARCH)" "arm"
15ARM_CORTEXA8 ?= 1
16ifeq "$(ARM_CORTEXA8)" "1"
17CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
18SRC += ../../frontend/cspace_neon.s
19else
20CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
21SRC += ../../frontend/cspace.c
22endif
23SRC += vout_fb.c
24EXT = so
25endif
26ifeq "$(ARCH)" "x86_64"
27CFLAGS += `sdl-config --cflags` -m32
28LDFLAGS += `sdl-config --libs`
29SRC += vout_sdl.c
30EXT = so.x86
31endif
32
33HAVE_NEON = $(shell $(CC_) -E -dD $(CFLAGS) gpu.h | grep -q '__ARM_NEON__ 1' && echo 1)
34
35TARGETS = gpu_peops.$(EXT) gpu_unai.$(EXT)
36ifeq "$(HAVE_NEON)" "1"
37TARGETS += gpu_neon.$(EXT)
38endif
39
40gpu_neon.$(EXT): SRC += psx_gpu_if.c psx_gpu/psx_gpu_arm_neon.S
41gpu_neon.$(EXT): CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
42gpu_peops.$(EXT): SRC += peops_if.c
43gpu_peops.$(EXT): CFLAGS += -fno-strict-aliasing
44gpu_unai.$(EXT): SRC += unai_if.cpp ../gpu_unai/gpu_arm.s
45gpu_unai.$(EXT): CC_ = $(CXX)
46
47all: $(TARGETS)
48
49$(TARGETS): $(SRC)
50 $(CC_) -o $@ $(SRC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@
51
52clean:
53 $(RM) $(TARGETS)