From 15e504106224cc69d9862de475f7d85a71322547 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 23 Jan 2016 18:22:27 +0100 Subject: [PATCH] Cleanups --- Makefile | 26 ++------------------------ Makefile.common | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 17d93308..0606eadb 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,6 @@ RM = @rm -f # some structures and thus they can't be linked against each other. DEFS = -DINLINE="static __inline__" -Dasm=__asm__ -CFLAGS = -I$(CORE_DIR) -I$(CORE_DIR)/includes -I$(CORE_DIR)/libretro -I$(CORE_DIR)/cpu/m68000 -I$(CORE_DIR)/cpu/m68000 RETRO_PROFILE = 0 CFLAGS += -DRETRO_PROFILE=$(RETRO_PROFILE) @@ -240,35 +239,14 @@ SOURCES_C := # include the various .mak files include Makefile.common -all: $(TARGET) -# platform .mak files will want to add to this -ifeq ($(STATIC_LINKING),1) -CFLAGS += -I$(CORE_DIR)/libretro/includes/zlib -else -SOURCES_C += deps/zlib/adler32.c \ - deps/zlib/compress.c \ - deps/zlib/crc32.c \ - deps/zlib/deflate.c \ - deps/zlib/gzclose.c \ - deps/zlib/gzlib.c \ - deps/zlib/gzread.c \ - deps/zlib/gzwrite.c \ - deps/zlib/inffast.c \ - deps/zlib/inflate.c \ - deps/zlib/inftrees.c \ - deps/zlib/trees.c \ - deps/zlib/uncompr.c \ - deps/zlib/zutil.c \ - deps/zlib/ioapi.c \ - deps/zlib/unzip.c -endif +CFLAGS += $(INCFLAGS) # combine the various definitions to one CDEFS = $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS) $(ASMDEFS) $(DBGDEFS) OBJECTS := $(SOURCES_C:.c=.o) -# primary target +all: $(TARGET) $(TARGET): $(OBJECTS) ifeq ($(STATIC_LINKING),1) @echo Archiving $@... diff --git a/Makefile.common b/Makefile.common index 91309c30..b2b741de 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1,3 +1,9 @@ +INCFLAGS := -I$(CORE_DIR) \ + -I$(CORE_DIR)/includes \ + -I$(CORE_DIR)/libretro \ + -I$(CORE_DIR)/cpu/m68000 \ + -I$(CORE_DIR)/cpu/m68000 + SOURCES_C += $(CORE_DIR)/libretro/libretro.c \ $(CORE_DIR)/libretro/osd.c \ $(CORE_DIR)/libretro/keyboard.c \ @@ -2564,3 +2570,24 @@ SOURCES_C += $(CORE_DIR)/sound/ymf271.c else SOUNDDEFS += -DHAS_YMF271=0 endif + +ifeq ($(STATIC_LINKING),1) +INCFLAGS += -I$(CORE_DIR)/libretro/includes/zlib +else +SOURCES_C += deps/zlib/adler32.c \ + deps/zlib/compress.c \ + deps/zlib/crc32.c \ + deps/zlib/deflate.c \ + deps/zlib/gzclose.c \ + deps/zlib/gzlib.c \ + deps/zlib/gzread.c \ + deps/zlib/gzwrite.c \ + deps/zlib/inffast.c \ + deps/zlib/inflate.c \ + deps/zlib/inftrees.c \ + deps/zlib/trees.c \ + deps/zlib/uncompr.c \ + deps/zlib/zutil.c \ + deps/zlib/ioapi.c \ + deps/zlib/unzip.c +endif