gpu_neon: update for armv5pollux build
[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
1ab64c54 9
56f08d83 10SRC += gpu.c
11ifeq "$(ARCH)" "arm"
7d993ee2 12ARM_CORTEXA8 ?= 1
13ifeq "$(ARM_CORTEXA8)" "1"
56f08d83 14CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
7d993ee2 15SRC += ../../frontend/cspace_neon.s
16else
17CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
18SRC += ../../frontend/cspace.c
19endif
20SRC += vout_fb.c
6f2ee2be 21EXT = so
22endif
23ifeq "$(ARCH)" "x86_64"
56f08d83 24CFLAGS += `sdl-config --cflags` -m32
25LDFLAGS += `sdl-config --libs`
26SRC += vout_sdl.c
6f2ee2be 27EXT = so.x86
56f08d83 28endif
1ab64c54 29
7d993ee2 30HAVE_NEON = $(shell $(CC_) -E -dD $(CFLAGS) gpu.h | grep -q '__ARM_NEON__ 1' && echo 1)
31
32TARGETS = gpu_peops.$(EXT) gpu_unai.$(EXT)
33ifeq "$(HAVE_NEON)" "1"
34TARGETS += gpu_neon.$(EXT)
35endif
6f2ee2be 36
37gpu_neon.$(EXT): SRC += psx_gpu_if.c
38gpu_neon.$(EXT): CFLAGS += -fno-strict-aliasing
39gpu_peops.$(EXT): SRC += peops_if.c
40gpu_peops.$(EXT): CFLAGS += -fno-strict-aliasing
41gpu_unai.$(EXT): SRC += unai_if.cpp
42gpu_unai.$(EXT): CC_ = $(CXX)
43
44all: $(TARGETS)
1ab64c54 45
6f2ee2be 46$(TARGETS): $(SRC)
47 $(CC_) -o $@ $(SRC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@
1ab64c54
GI
48
49clean:
6f2ee2be 50 $(RM) $(TARGETS)