X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/bd504ef0e0b883cdd7917b73b3574eb9ce669905..39236c6e673c41db228275375ab7fdb0f837b292:/SETUP/kextsymboltool/Makefile diff --git a/SETUP/kextsymboltool/Makefile b/SETUP/kextsymboltool/Makefile index 607ef0839..17cf1108f 100644 --- a/SETUP/kextsymboltool/Makefile +++ b/SETUP/kextsymboltool/Makefile @@ -9,26 +9,31 @@ include $(MakeInc_def) OBJS = kextsymboltool.o -CFLAGS = -isysroot $(HOST_SDKROOT) -g -O0 -I$(SOURCE) -I. +CFLAGS = -isysroot $(HOST_SDKROOT) -mmacosx-version-min=$(HOST_OS_VERSION) -g -O0 -I$(SOURCE) -I. WARNFLAGS = -Wall -LDFLAGS = -isysroot $(HOST_SDKROOT) -L$(HOST_SPARSE_SDKROOT)/usr/local/lib/system -lstdc++ +LDFLAGS = -isysroot $(HOST_SDKROOT) -mmacosx-version-min=$(HOST_OS_VERSION) -L$(HOST_SPARSE_SDKROOT)/usr/local/lib/system -lstdc++ ifneq ($(HOST_SPARSE_SDKROOT),/) LDFLAGS += -lmacho endif -kextsymboltool: $(OBJS) - $(_v)$(HOST_CC) $(LDFLAGS) -o $@ $^ +.PHONY: force + +.SparseSDK: force + $(_v)echo '$(HOST_SPARSE_SDKROOT)' | cmp -s - $@ || echo '$(HOST_SPARSE_SDKROOT)' > $@ + +kextsymboltool: $(OBJS) .SparseSDK @echo HOST_LD $@ - $(_v)$(HOST_CODESIGN) -s - $@ + $(_v)$(HOST_CC) $(LDFLAGS) -o $@ $(OBJS) @echo HOST_CODESIGN $@ + $(_v)env CODESIGN_ALLOCATE=$(HOST_CODESIGN_ALLOCATE) $(HOST_CODESIGN) -s - $@ -.c.o: - $(_v)$(HOST_CC) $(WARNFLAGS) $(CFLAGS) -c -o $@ $< +%.o: %.c @echo HOST_CC $@ + $(_v)$(HOST_CC) $(WARNFLAGS) $(CFLAGS) -c -o $@ $< -do_build_setup: kextsymboltool +do_build_setup:: kextsymboltool include $(MakeInc_rule) include $(MakeInc_dir)