Correct options when building for RetroArch.
[SquirrelJME.git] / ratufacoat / libretro / Makefile.osx_x86_64
blob9f6db4338b7d38a83f51cc77da0d7dc7ca3504d0
1 ##############
2 # Works on hosts Linux
3 # Compile and install OSXCROSS: https://github.com/tpoechtrager/osxcross
5 #########################
6 # Check the host platform
8 include $(BUILD_DIR)/Makefile.common.hostcheck
10 #########################
11 # Set the target platform
13 TARGET_PLATFORM = osx_x86_64
15 #################
16 # Toolchain setup
18 CC  = $(OSXCROSS_ROOT_DIR)/target/bin/x86_64-apple-darwin13-cc
19 CXX = $(OSXCROSS_ROOT_DIR)/target/bin/x86_64-apple-darwin13-c++
20 AS  = $(OSXCROSS_ROOT_DIR)/target/bin/x86_64-apple-darwin13-as
21 AR  = $(OSXCROSS_ROOT_DIR)/target/bin/x86_64-apple-darwin13-ar
23 ############
24 # Extensions
26 OBJEXT = .osx_x86_64.o
27 SOEXT  = .osx_x86_64.dylib
28 LIBEXT = .osx_x86_64.a
30 ################
31 # Platform setup
33 STATIC_LINKING = 0
34 platform       = osx
35 PLATDEFS       =
36 PLATCFLAGS     = -fpic -fstrict-aliasing
37 PLATCXXFLAGS   = -fpic -fstrict-aliasing
38 PLATLDFLAGS    = -shared -lm
39 PLATLDXFLAGS   = -shared -lm
41 ################
42 # libretro setup
44 RETRODEFS     = -D__LIBRETRO__
45 RETROCFLAGS   =
46 RETROCXXFLAGS =
47 RETROLDFLAGS  =
48 RETROLDXFLAGS =
50 #################
51 # Final variables
53 DEFINES  = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
54 CFLAGS   = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
55 CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
56 LDFLAGS  = $(PLATLDFLAGS) $(RETROLDFLAGS)
57 LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
59 ########
60 # Tuning
62 ifneq ($(DEBUG),)
63   CFLAGS   += -O0 -g
64   CXXFLAGS += -O0 -g
65 else
66   CFLAGS   += -O3 -DNDEBUG
67   CXXFLAGS += -O3 -DNDEBUG
68 endif
70 ifneq ($(LOG_PERFORMANCE),)
71   CFLAGS   += -DLOG_PERFORMANCE
72   CXXFLAGS += -DLOG_PERFORMANCE
73 endif
75 ####################################
76 # Variable setup for Makefile.common
78 CORE_DIR  ?= ..
79 BUILD_DIR ?= .
80 INCLUDES   =
82 include $(BUILD_DIR)/Makefile.common
84 ###############
85 # Include rules
87 include $(BUILD_DIR)/Makefile.rules