forked from corecodec/coremake
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgcc_osx.inc
45 lines (38 loc) · 1.07 KB
/
gcc_osx.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#define TARGET_OSX
#define OUTPUT_EXE %(NAME)
#define OUTPUT_CON %(NAME)
#define OUTPUT_DLL lib%(NAME).dylib
#define OUTPUT_DLL_LIB lib%(NAME).lo
#define OUTPUT_LIB lib%(NAME).a
#define ASM yasm
IFNDEF STRIP
#define STRIP %(CC_PREFIX)strip
ENDIF
#define STRIPFLAGS -x
// TODO should come from config.h
#ifndef TARGET_IPHONE
#define CCENV MACOSX_DEPLOYMENT_TARGET_ppc=10.3 MACOSX_DEPLOYMENT_TARGET_i386=10.5
#endif
#define GLIBC
IF %(SDK)
CCFLAGS = %(CCFLAGS) -isysroot %(SDK)
ENDIF
IF %(SYSLIB_ROOT)
LFLAGS= -Wl,-syslibroot,%(SYSLIB_ROOT)
ELIF %(SDK)
LFLAGS= -isysroot %(SDK) -Wl,-syslibroot,%(SDK)
ENDIF
CCFLAGS = %(CCFLAGS) -pipe -O3
IF %(SDK_PATH)
CCFLAGS = -I%(SDK_PATH)/include %(CCFLAGS)
ENDIF
//#define ASMFLAGS -f elf32
//#define LFLAGS
//#define LDFLAGS -Wl,-dynamic,-search_paths_first
//#define FFSLDFLAGS -Wl,-bind_at_load
#ifdef PIC
#define SHFLAGS -dynamiclib -Wl,-single_module -Wl,-install_name,\$(OUTPUT)
#else
#define SHFLAGS -dynamiclib -Wl,-read_only_relocs,suppress -Wl,-single_module -Wl,-install_name,\$(OUTPUT)
#endif
#include "gcc.inc"