-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathMakefile
36 lines (27 loc) · 1.03 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
TOPDIR = $(PWD)
SDKVERSION = 7.0
DEVROOT = $(shell xcode-select --print-path)
TOOLCHAINROOT = $(DEVROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin
SDKROOT= $(DEVROOT)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(SDKVERSION).sdk
CC = $(TOOLCHAINROOT)/clang -arch armv7 -arch armv7s -arch arm64
CXX = $(TOOLCHAINROOT)/clang++
LDID = $(TOPDIR)/ldid-host
CFLAGS = -Os -I$(SDKROOT)/usr/include/ -Iinclude
LDFLAGS = -L$(SDKROOT)/usr/lib/ -F/$(SDKROOT)/System/Library/PrivateFrameworks -framework OpenCL -miphoneos-version-min=5.0 -isysroot $(SDKROOT)
EXECUTABLE = transmission endianness ldid-host
T_SRC = transmission.c
E_SRC = endianness.c
LDID_DIR = ldid
S_CPPSRC = ldid.cpp
S_CSRC = lookup2.c sha1.c
all: ldid-host transmission endianness
ldid-host: $(S_OBJECTS)
cd $(LDID_DIR); $(CXX) -O2 -o $(TOPDIR)/$@ $(S_CPPSRC) -I. -x c $(S_CSRC)
transmission: $(T_SRC)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
$(LDID) -S $@
endianness: $(E_SRC)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
$(LDID) -S $@
clean:
rm -f $(T_OBJECTS) $(E_OBJECTS) $(EXECUTABLE)