X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=Makefile;h=c822bb12fd0dd6a981d9def108308cd884072b0b;hp=2602abbdb9cc29cb1d7eef03c660918265dd0cfe;hb=ee78346e30720ddb3f4c97b6598bdc6dc7257f98;hpb=a96a5eb2d6a6720cc7bba6a30d1c25473f345a89 diff --git a/Makefile b/Makefile index 2602abbd..c822bb12 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,11 @@ AS = $(CROSS_COMPILE)as CC = $(CROSS_COMPILE)gcc LD = $(CROSS_COMPILE)ld +ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}') + CFLAGS += -ggdb -Ifrontend LDFLAGS += -lz -lpthread -ldl -lpng -ifdef CROSS_COMPILE +ifeq "$(ARCH)" "arm" CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -ffast-math ASFLAGS += -mcpu=cortex-a8 -mfpu=neon endif @@ -55,14 +57,12 @@ plugins/cdrcimg/%.o: CFLAGS += -Wall OBJS += plugins/cdrcimg/cdrcimg.o # gui -OBJS += gui/Plugin.o - OBJS += frontend/main.o frontend/plugin.o frontend/plugin_lib.o OBJS += frontend/menu.o OBJS += frontend/linux/fbdev.o frontend/linux/in_evdev.o OBJS += frontend/linux/plat.o frontend/linux/oshide.o OBJS += frontend/common/fonts.o frontend/common/input.o frontend/common/readpng.o -ifdef CROSS_COMPILE +ifeq "$(ARCH)" "arm" OBJS += frontend/arm_utils.o OBJS += frontend/plat_omap.o else @@ -84,14 +84,18 @@ frontend/revision.h: FORCE $(TARGET): $(OBJS) $(CC) -o $@ $^ $(LDFLAGS) -Wl,-Map=$@.map -spunull.so: plugins/spunull/spunull.c - $(CC) $(CFLAGS) -shared -fPIC -ggdb -O2 -o $@ $^ +PLUGINS = plugins/spunull/spunull.so plugins/gpu_unai/gpuPCSX4ALL.so \ + plugins/gpu-gles/gpuGLES.so -plugins/gpu-gles/gpuGLES.so: - make -C plugins/gpu-gles/ +$(PLUGINS): + make -C $(dir $@) clean: - $(RM) $(TARGET) $(OBJS) + $(RM) $(TARGET) $(OBJS) $(TARGET).map + +clean_plugins: + for dir in $(PLUGINS) ; do \ + $(MAKE) -C $$(dirname $$dir) clean; done # ----------- release ----------- @@ -99,7 +103,7 @@ PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh VER ?= $(shell git describe --abbrev=0 master) -rel: pcsx spunull.so plugins/gpu-gles/gpuGLES.so \ +rel: pcsx $(PLUGINS) \ pandora/pcsx.sh pandora/pcsx.pxml pandora/pcsx.png \ pandora/picorestore pandora/readme.txt skin COPYING rm -rf out