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