diff options
author | notaz | 2012-04-20 02:28:55 +0300 |
---|---|---|
committer | notaz | 2012-04-22 01:58:03 +0300 |
commit | 4132e8ca13b6395f8a9ef7ec7d01cbdcc19c037d (patch) | |
tree | ca9037636932b6e3914e9c98c7c3da9a83796686 /plugins | |
parent | 4a35de071887026bb6dcd6b852738a1866959df7 (diff) | |
download | pcsx_rearmed-4132e8ca13b6395f8a9ef7ec7d01cbdcc19c037d.tar.gz pcsx_rearmed-4132e8ca13b6395f8a9ef7ec7d01cbdcc19c037d.tar.bz2 pcsx_rearmed-4132e8ca13b6395f8a9ef7ec7d01cbdcc19c037d.zip |
bring in configure build system
not using autotools, trying to do something similar like qemu instead.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/dfxvideo/Makefile | 20 | ||||
-rw-r--r-- | plugins/gpu-gles/Makefile | 6 | ||||
-rw-r--r-- | plugins/gpu_neon/Makefile | 16 | ||||
-rw-r--r-- | plugins/gpu_unai/Makefile | 8 | ||||
-rw-r--r-- | plugins/gpulib/Makefile | 26 | ||||
-rw-r--r-- | plugins/gpulib/gpulib.mak | 23 | ||||
-rw-r--r-- | plugins/spunull/Makefile | 10 |
7 files changed, 53 insertions, 56 deletions
diff --git a/plugins/dfxvideo/Makefile b/plugins/dfxvideo/Makefile new file mode 100644 index 0000000..b6cc756 --- /dev/null +++ b/plugins/dfxvideo/Makefile @@ -0,0 +1,20 @@ +CFLAGS += -Wall -ggdb -O2 +CFLAGS += -fno-strict-aliasing -ffast-math +# ugh +CFLAGS += -I../../libpcsxcore + +include ../../config.mak + +SRC_STANDALONE += gpu.c +SRC_GPULIB += gpulib_if.c + +ifeq "$(ARCH)" "arm" +SRC_STANDALONE += draw_fb.c +else +SRC_STANDALONE += draw.c +LDLIBS_STANDALONE += -lX11 -lXv +endif + +BIN_STANDLALONE = gpuPEOPS.so +BIN_GPULIB = gpu_peops.so +include ../gpulib/gpulib.mak diff --git a/plugins/gpu-gles/Makefile b/plugins/gpu-gles/Makefile index 06552ed..894daec 100644 --- a/plugins/gpu-gles/Makefile +++ b/plugins/gpu-gles/Makefile @@ -1,9 +1,7 @@ -CC = $(CROSS_COMPILE)gcc
-
-ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
-
CFLAGS += -ggdb -fPIC -O2 # -Wall
+include ../../config.mak
+
SRC_STANDALONE += gpuDraw.c gpuFps.c gpuPlugin.c gpuPrim.c gpuTexture.c
SRC_GPULIB += gpulib_if.c
diff --git a/plugins/gpu_neon/Makefile b/plugins/gpu_neon/Makefile index 93839d2..8a7342b 100644 --- a/plugins/gpu_neon/Makefile +++ b/plugins/gpu_neon/Makefile @@ -1,18 +1,6 @@ -CC = $(CROSS_COMPILE)gcc +CFLAGS += -ggdb -Wall -O2 -ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}') - -HAVE_NEON = $(shell $(CC) -E -dD $(CFLAGS_) ../gpulib/gpu.h | grep -q '__ARM_NEON__ 1' && echo 1) - -# FIXME: rework NEON detection to get rid of this -ifeq "$(ARCH)" "arm" - ARM_CORTEXA8 ?= 1 - ifeq "$(ARM_CORTEXA8)" "1" - CFLAGS_ += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp - endif -endif - -CFLAGS += -ggdb -Wall -fPIC -O2 +include ../../config.mak SRC += psx_gpu_if.c diff --git a/plugins/gpu_unai/Makefile b/plugins/gpu_unai/Makefile index 57a0371..cf2e5d2 100644 --- a/plugins/gpu_unai/Makefile +++ b/plugins/gpu_unai/Makefile @@ -1,9 +1,7 @@ -CC = $(CROSS_COMPILE)g++ - -ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}') - -CFLAGS += -DREARMED CFLAGS += -ggdb -Wall -O3 -ffast-math +CFLAGS += -DREARMED + +include ../../config.mak SRC_STANDALONE += gpu.cpp SRC_GPULIB += gpulib_if.cpp diff --git a/plugins/gpulib/Makefile b/plugins/gpulib/Makefile index e65d81b..9ed992f 100644 --- a/plugins/gpulib/Makefile +++ b/plugins/gpulib/Makefile @@ -1,41 +1,37 @@ -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 ifndef DEBUG CFLAGS += -O2 endif +include ../../config.mak + 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 -fPIC -ASFLAGS += -mcpu=cortex-a8 -mfpu=neon +ifeq "$(HAVE_NEON)" "1" 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 +CFLAGS += `sdl-config --cflags` OBJS += vout_sdl.o -EXT = x86.a +EXT = $(ARCH).a endif +CFLAGS += $(PLUGIN_CFLAGS) TARGET = gpulib.$(EXT) -all: $(TARGET) +all: ../../config.mak $(TARGET) $(TARGET): $(OBJS) $(AR) crs $@ $^ clean: $(RM) $(TARGET) $(OBJS) + +../../config.mak: + @echo "Please run ./configure before running make!" + @exit 1 diff --git a/plugins/gpulib/gpulib.mak b/plugins/gpulib/gpulib.mak index 3a7f7cd..c82607a 100644 --- a/plugins/gpulib/gpulib.mak +++ b/plugins/gpulib/gpulib.mak @@ -1,25 +1,16 @@ # depends on ARCH definition # always adding gpulib to deps in case cspace is needed +# users must include ../../config.mak LDFLAGS += -shared +CFLAGS += $(PLUGIN_CFLAGS) ifeq "$(ARCH)" "arm" - ARM_CORTEXA8 ?= 1 - ifeq "$(ARM_CORTEXA8)" "1" - CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon \ - -fPIC -mfloat-abi=softfp - ASFLAGS += -mcpu=cortex-a8 -mfpu=neon - else - CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s - ASFLAGS += -mcpu=arm926ej-s -mfloat-abi=softfp - endif EXT = else - CFLAGS += -m32 - LDFLAGS += -m32 LDLIBS_GPULIB += `sdl-config --libs` - EXT = .x86 + EXT = .$(ARCH) endif -ifdef MAEMO +ifeq "$(PLATFORM)" "maemo" CFLAGS += -DMAEMO endif ifdef DEBUG @@ -35,7 +26,7 @@ ifdef BIN_GPULIB TARGETS += $(BIN_GPULIB)$(EXT) endif -all: $(TARGETS) +all: ../../config.mak $(TARGETS) ifdef BIN_STANDLALONE $(BIN_STANDLALONE)$(EXT): $(SRC) $(SRC_STANDALONE) $(GPULIB_A) @@ -52,3 +43,7 @@ $(GPULIB_A): clean: $(RM) $(TARGETS) + +../../config.mak: + @echo "Please run ./configure before running make!" + @exit 1 diff --git a/plugins/spunull/Makefile b/plugins/spunull/Makefile index f9b76ed..eb81cab 100644 --- a/plugins/spunull/Makefile +++ b/plugins/spunull/Makefile @@ -1,11 +1,13 @@ -CC = $(CROSS_COMPILE)gcc +all: ../../config.mak spunull.so -all: spunull.so - --include Makefile.local +include ../../config.mak spunull.so: spunull.c $(CC) $(CFLAGS) -shared -fPIC -ggdb -O2 -o $@ $^ clean: $(RM) spunull.so + +../../config.mak: + @echo "Please run ./configure before running make!" + @exit 1 |