diff options
author | notaz | 2012-01-19 01:33:12 +0200 |
---|---|---|
committer | notaz | 2012-01-19 01:38:45 +0200 |
commit | 62d7fa9555924ab8e152b546711d27add640b102 (patch) | |
tree | 28c231a8f642d28d357bbdce9edb2b79e199764e /plugins/gpulib/Makefile | |
parent | 5d834c089ea695dba7643cba8686ce2ac06d8db4 (diff) | |
download | pcsx_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/gpulib/Makefile')
-rw-r--r-- | plugins/gpulib/Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/gpulib/Makefile b/plugins/gpulib/Makefile new file mode 100644 index 0000000..a244524 --- /dev/null +++ b/plugins/gpulib/Makefile @@ -0,0 +1,38 @@ +CC = $(CROSS_COMPILE)gcc +AS = $(CROSS_COMPILE)as +AR = $(CROSS_COMPILE)ar + +ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}') + +CFLAGS += -ggdb -Wall -fPIC -O2 + +OBJS += gpu.o + +ifeq "$(ARCH)" "arm" +ARM_CORTEXA8 ?= 1 +ifeq "$(ARM_CORTEXA8)" "1" +CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp +ASFLAGS += -mcpu=cortex-a8 -mfpu=neon +OBJS += cspace_neon.o +else +CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s +ASFLAGS += -mcpu=arm926ej-s -mfloat-abi=softfp +OBJS += cspace.o +endif +OBJS += vout_fb.o +EXT = a +else +CFLAGS += `sdl-config --cflags` -m32 +OBJS += vout_sdl.o +EXT = x86.a +endif + +TARGET = gpulib.$(EXT) + +all: $(TARGET) + +$(TARGET): $(OBJS) + $(AR) crs $@ $^ + +clean: + $(RM) $(TARGET) $(OBJS) |