aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu_unai/Makefile
diff options
context:
space:
mode:
authornotaz2012-01-19 01:33:12 +0200
committernotaz2012-01-19 01:38:45 +0200
commit62d7fa9555924ab8e152b546711d27add640b102 (patch)
tree28c231a8f642d28d357bbdce9edb2b79e199764e /plugins/gpu_unai/Makefile
parent5d834c089ea695dba7643cba8686ce2ac06d8db4 (diff)
downloadpcsx_rearmed-62d7fa9555924ab8e152b546711d27add640b102.tar.gz
pcsx_rearmed-62d7fa9555924ab8e152b546711d27add640b102.tar.bz2
pcsx_rearmed-62d7fa9555924ab8e152b546711d27add640b102.zip
refactor gpu plugins and Makefiles
name common gpu code gpulib, reduce amount of copy-paste in plugin Makefiles
Diffstat (limited to 'plugins/gpu_unai/Makefile')
-rw-r--r--plugins/gpu_unai/Makefile41
1 files changed, 12 insertions, 29 deletions
diff --git a/plugins/gpu_unai/Makefile b/plugins/gpu_unai/Makefile
index e4b6e6b..dd9e4ca 100644
--- a/plugins/gpu_unai/Makefile
+++ b/plugins/gpu_unai/Makefile
@@ -1,34 +1,17 @@
-CC = $(CROSS_COMPILE)gcc
+CC = $(CROSS_COMPILE)g++
-CFLAGS += -ggdb -fPIC -Wall -DREARMED
-ifndef DEBUG
-CFLAGS += -O2 -ffast-math -fomit-frame-pointer
-endif
-ifdef MAEMO
-CFLAGS += -DMAEMO
-endif
-ARM_CORTEXA8 ?= 1
-ifeq "$(ARM_CORTEXA8)" "1"
-CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-SRC += ../../frontend/cspace_neon.s
-else
-CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
-SRC += ../../frontend/cspace.c
-endif
-
-SRC += gpu.cpp gpu_arm.s
+ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
-TARGET = gpuPCSX4ALL.so
-LDFLAGS += -shared -Wl,-soname,$(TARGET)
+CFLAGS += -DREARMED
+CFLAGS += -ggdb -Wall -fPIC -O2 -ffast-math
--include Makefile.local
+SRC_STANDALONE += gpu.cpp
+SRC_GPULIB += gpulib_if.cpp
-all: $(TARGET)
-
-$(TARGET): $(SRC)
- $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
-
-# $(TARGET): *.h
+ifeq "$(ARCH)" "arm"
+SRC += gpu_arm.s
+endif
-clean:
- $(RM) $(TARGET) $(OBJ)
+BIN_STANDLALONE = gpuPCSX4ALL.so
+BIN_GPULIB = gpu_unai.so
+include ../gpulib/gpulib.mak