]> git.saurik.com Git - apple/xnu.git/blob - SETUP/kextsymboltool/Makefile
3ae439d365793953a17046df47f78f10bddd0546
[apple/xnu.git] / SETUP / kextsymboltool / Makefile
1 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
6
7 include $(MakeInc_cmd)
8 include $(MakeInc_def)
9
10 OBJS = kextsymboltool.o
11
12 CFLAGS = -isysroot $(HOST_SDKROOT) -mmacosx-version-min=$(HOST_OS_VERSION) -g -O0 -I$(SOURCE) -I.
13
14 WARNFLAGS = -Wall
15
16 LDFLAGS = -isysroot $(HOST_SDKROOT) -mmacosx-version-min=$(HOST_OS_VERSION) -L$(HOST_SPARSE_SDKROOT)/usr/local/lib/system -lstdc++
17 ifneq ($(HOST_SPARSE_SDKROOT),/)
18 LDFLAGS += -lmacho
19 endif
20
21 .SparseSDK: ALWAYS
22 $(_v)echo '$(HOST_SPARSE_SDKROOT)' | cmp -s - $@ || echo '$(HOST_SPARSE_SDKROOT)' > $@
23
24 kextsymboltool: $(OBJS) .SparseSDK
25 @echo HOST_LD $@
26 $(_v)$(HOST_CC) $(LDFLAGS) -o $@ $(OBJS)
27 @echo HOST_CODESIGN $@
28 $(_v)env CODESIGN_ALLOCATE=$(HOST_CODESIGN_ALLOCATE) $(HOST_CODESIGN) -s - $@
29
30 %.o: %.c
31 @echo HOST_CC $@
32 $(_v)$(HOST_CC) $(WARNFLAGS) $(CFLAGS) -c -o $@ $<
33
34 do_build_setup:: kextsymboltool
35
36 include $(MakeInc_rule)
37 include $(MakeInc_dir)