From ce55990a3ea893f811028ae5093f44cb80f34df3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 14 Sep 2014 00:11:08 +0200 Subject: [PATCH] Move more to Makefile.common --- Makefile | 23 +++++++++++------------ Makefile.emscripten | 16 ++++++++-------- Makefile.win | 8 ++++---- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 14591efc4f..88b80ed162 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,14 @@ TARGET = retroarch tools/retroarch-joyconfig tools/retrolaunch/retrolaunch OBJDIR := obj-unix +ifeq ($(GLOBAL_CONFIG_DIR),) + GLOBAL_CONFIG_DIR = /etc +endif + OBJ := +LIBS := +DEFINES += -DHAVE_CONFIG_H -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER -DHAVE_OVERLAY +DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"' include Makefile.common @@ -28,21 +35,14 @@ RETROLAUNCH_OBJ = tools/retrolaunch/main.o \ HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h) ifeq ($(findstring Haiku,$(OS)),) - LIBS = -lm + LIBS += -lm DEBUG_FLAG = -g else - LIBS = -lroot -lnetwork + LIBS += -lroot -lnetwork # stable and nightly haiku builds are stuck on gdb 6.x but we use gcc4 DEBUG_FLAG = -gdwarf-2 endif -DEFINES = -DHAVE_CONFIG_H -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER -DHAVE_OVERLAY - -ifeq ($(GLOBAL_CONFIG_DIR),) - GLOBAL_CONFIG_DIR = /etc -endif -DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"' - ifeq ($(REENTRANT_TEST), 1) DEFINES += -Dmain=retroarch_main OBJ += console/test.o @@ -80,7 +80,8 @@ ifeq ($(HAVE_LAKKA), 1) endif endif -OBJ += playlist.o +OBJ += playlist.o \ + movie.o ifeq ($(HAVE_MENU_COMMON), 1) OBJ += frontend/menu/backend/menu_common_backend.o \ @@ -98,8 +99,6 @@ ifeq ($(HAVE_THREADS), 1) endif endif - OBJ += movie.o - ifeq ($(HAVE_NETPLAY), 1) OBJ += netplay.o ifneq ($(findstring Win32,$(OS)),) diff --git a/Makefile.emscripten b/Makefile.emscripten index aebff44b49..53991d52bc 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -1,13 +1,7 @@ TARGET = retroarch.js OBJ := - -include Makefile.common - -OBJ += frontend/platform/platform_emscripten.o \ - input/rwebinput_input.o \ - audio/rwebaudio.o \ - camera/rwebcam.o +DEFINES := -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER HAVE_OPENGL = 1 HAVE_RGUI = 1 @@ -24,10 +18,16 @@ ifneq ($(NATIVE_ZLIB),) WANT_MINIZ = 0 endif +include Makefile.common + +OBJ += frontend/platform/platform_emscripten.o \ + input/rwebinput_input.o \ + audio/rwebaudio.o \ + camera/rwebcam.o + libretro = libretro_emscripten.bc LIBS = -DEFINES = -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER LDFLAGS = -L. -s TOTAL_MEMORY=$(MEMORY) -s OUTLINING_LIMIT=50000 --js-library emscripten/library_rwebaudio.js --js-library emscripten/library_rwebinput.js --js-library emscripten/library_rwebcam.js --no-heap-copy ifeq ($(HAVE_RGUI), 1) diff --git a/Makefile.win b/Makefile.win index f179b2e7e0..cbeedcbba0 100644 --- a/Makefile.win +++ b/Makefile.win @@ -33,7 +33,10 @@ endif OBJDIR := obj-w32 -OBJ := +OBJ := +LIBS := -lm +JLIBS := +DEFINES := -I. -DHAVE_BUILTIN_AUTOCONFIG -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER -DHAVE_OVERLAY include Makefile.common @@ -63,8 +66,6 @@ endif libretro ?= -lretro -LIBS = -lm -DEFINES = -I. -DHAVE_BUILTIN_AUTOCONFIG -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER -DHAVE_OVERLAY LDFLAGS = -L. -static-libgcc ifeq ($(TDM_GCC),) @@ -75,7 +76,6 @@ ifeq ($(SCALER_NO_SIMD), 1) DEFINES += -DSCALER_NO_SIMD endif -JLIBS = ifeq ($(HAVE_RGUI), 1) OBJ += frontend/menu/disp/rgui.o