notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix negcon not working correctly in some games
[pcsx_rearmed.git]
/
plugins
/
gpulib
/
Makefile
diff --git
a/plugins/gpulib/Makefile
b/plugins/gpulib/Makefile
index
a244524
..
cff6141
100644
(file)
--- a/
plugins/gpulib/Makefile
+++ b/
plugins/gpulib/Makefile
@@
-1,38
+1,46
@@
-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
-CFLAGS += -ggdb -Wall -fPIC -O2
+include ../../config.mak
OBJS += gpu.o
ifeq "$(ARCH)" "arm"
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
+OBJS += vout_pl.o
EXT = a
else
EXT = a
else
-CFLAGS += `sdl-config --cflags` -m32
-OBJS += vout_sdl.o
-EXT = x86.a
+#CFLAGS += `sdl-config --cflags`
+#OBJS += vout_sdl.o
+OBJS += vout_pl.o
+EXT = $(ARCH).a
endif
endif
+CFLAGS += $(PLUGIN_CFLAGS)
+
+# need to compile to another dir, same files are compiled
+# into main binary without PIC
+OBJS2 = $(patsubst %.o,obj/%.o,$(OBJS))
TARGET = gpulib.$(EXT)
TARGET = gpulib.$(EXT)
-all: $(TARGET)
+all:
../../config.mak obj
$(TARGET)
-$(TARGET): $(OBJS)
+$(TARGET): $(OBJS
2
)
$(AR) crs $@ $^
$(AR) crs $@ $^
+obj/%.o: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
+
+obj/%.o: %.s
+ $(AS) $(ASFLAGS) -o $@ $^
+
clean:
clean:
- $(RM) $(TARGET) $(OBJS)
+ $(RM) $(TARGET) $(OBJS2)
+
+obj:
+ mkdir -p $@
+
+../../config.mak:
+ @echo "Please run ./configure before running make!"
+ @exit 1