-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (32 loc) · 1.5 KB
/
Makefile
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
46
47
48
49
50
51
52
53
#CLANG = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CLANG := clang
LINK = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
ARCH = arm64
MIN_VERSION = 10.8
DEBUG_PATH = bin/debug
SYSROOT = $(wildcard /Applications/Xcode.app/Contests/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/)
IBTOOL = /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool
SDK = $(wildcard /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX1*)
FRAME = $(wildcard /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/System/Library/Frameworks)
LIB = $(wildcard /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/*/usr/lib)
FLAGS = -g -O0 -fmodules -x objective-c -fno-objc-arc
%.nib: %.xib
$(IBTOOL) --errors --warnings --notices --output-format human-readable-text --compile $@ ./$< --sdk $(SDK)
%.o: %.m
$(CLANG) -arch $(ARCH) $(FLAGS) -Wall -c $< -o $@
SOG_OBJS := \
main.o
# Controller.o
LDFLAGS := -arch $(ARCH) \
-framework Cocoa
#-isysroot $(SYSROOT)
#-F $(FRAME)
sog.dylib: $(SOG_OBJS)
$(CLANG) $(SOG_OBJS) $(LDFLAGS) -dynamiclib -rdynamic -o $@
sog.dll: $(SOG_OBJS)
$(CLANG) $(SOG_OBJS) $(LDFLAGS) -dynamiclib -rdynamic -o $@
sog.so: $(SOG_OBJS)
$(CLANG) $(SOG_OBJS) $(LDFLAGS) -dynamiclib -rdynamic -o $@
sog: $(SOG_OBJS)
$(CLANG) $(SOG_OBJS) $(LDFLAGS) -o $@
.DEFAULT_GOAL := sog