psx_gpu: fix divide by 0
[pcsx_rearmed.git] / plugins / gpu_neon / Makefile
CommitLineData
1ab64c54 1CC = $(CROSS_COMPILE)gcc
6f2ee2be 2CXX = $(CROSS_COMPILE)g++
3CC_ = $(CC)
56f08d83 4
5ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
6
7CFLAGS += -ggdb -Wall -fPIC -O2
b094071f 8CFLAGS += -fno-strict-aliasing
b3db9409 9ifdef MAEMO
10CFLAGS += -DMAEMO
11endif
1ab64c54 12
56f08d83 13SRC += gpu.c
14ifeq "$(ARCH)" "arm"
7d993ee2 15ARM_CORTEXA8 ?= 1
16ifeq "$(ARM_CORTEXA8)" "1"
56f08d83 17CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
7d993ee2 18SRC += ../../frontend/cspace_neon.s
19else
20CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
21SRC += ../../frontend/cspace.c
22endif
23SRC += vout_fb.c
6f2ee2be 24EXT = so
25endif
26ifeq "$(ARCH)" "x86_64"
56f08d83 27CFLAGS += `sdl-config --cflags` -m32
28LDFLAGS += `sdl-config --libs`
29SRC += vout_sdl.c
6f2ee2be 30EXT = so.x86
56f08d83 31endif
1ab64c54 32
7d993ee2 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
6f2ee2be 39
90ca4913 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
6f2ee2be 42gpu_peops.$(EXT): SRC += peops_if.c
43gpu_peops.$(EXT): CFLAGS += -fno-strict-aliasing
b3db9409 44gpu_unai.$(EXT): SRC += unai_if.cpp ../gpu_unai/gpu_arm.s
6f2ee2be 45gpu_unai.$(EXT): CC_ = $(CXX)
46
47all: $(TARGETS)
1ab64c54 48
6f2ee2be 49$(TARGETS): $(SRC)
50 $(CC_) -o $@ $(SRC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@
1ab64c54
GI
51
52clean:
6f2ee2be 53 $(RM) $(TARGETS)