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