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/gpulib | |
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/gpulib')
-rw-r--r-- | plugins/gpulib/Makefile | 26 | ||||
-rw-r--r-- | plugins/gpulib/gpulib.mak | 23 |
2 files changed, 20 insertions, 29 deletions
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 |