11# You may not be able to build with a modern Xcode, since we still support 10.6.
22# So, if we have Xcode 4.6 around, we should use it.
3+ #
4+ # You can do this by downloading Xcode 4.6.3 as a dmg from Apple, then
5+ # copying the contents into /Applications, then taking your ancient
6+ # MacOSX10.6.sdk that you keep kicking around, and copying it into
7+ # /Applications/Xcode-4.6.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/.
8+ # Don't you love backwards compatibility?
39
4- XCODEBUILD ?= /Applications/Xcode46-DP4 .app/Contents/Developer/usr/bin/xcodebuild
10+ XCODEBUILD ?= /Applications/Xcode-4.6.3 .app/Contents/Developer/usr/bin/xcodebuild
511
612# Ok, no joy there?
713ifeq (,$(wildcard $(XCODEBUILD ) ) )
@@ -19,13 +25,17 @@ all: build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext build/HoRNDIS.pkg
1925build/Release/HoRNDIS.kext : HoRNDIS.cpp HoRNDIS.h HoRNDIS-Info.plist HoRNDIS.xcodeproj HoRNDIS.xcodeproj/project.pbxproj
2026 $(XCODEBUILD )
2127
22- build/HoRNDIS-kext.pkg : build/Release/HoRNDIS.kext
23- pkgbuild --component $< --install-location /System/Library/Extensions/ $@
28+ build/root : build/Release/HoRNDIS.kext build/signed/HoRNDIS.kext
29+ rm -rf build/root
30+ mkdir -p build/root/System/Library/Extensions/
31+ cp -R build/Release/HoRNDIS.kext build/root/System/Library/Extensions/
32+ mkdir -p build/root/Library/Extensions
33+ cp -R build/signed/HoRNDIS.kext build/root/Library/Extensions/
2434
25- build/HoRNDIS-signed- kext.pkg : build/signed/HoRNDIS.kext
26- pkgbuild --component $< --install-location /Library/Extensions/ $@
35+ build/HoRNDIS-kext.pkg : build/root
36+ pkgbuild --identifier com.joshuawise.kexts.HoRNDIS --root $< $@
2737
28- build/HoRNDIS.pkg : build/HoRNDIS-kext.pkg build/HoRNDIS-signed-kext.pkg package/Distribution.xml
38+ build/HoRNDIS.pkg : build/HoRNDIS-kext.pkg package/Distribution.xml
2939 productbuild --distribution package/Distribution.xml --package-path build --resources package/resources $(if $(CODESIGN_INST ) ,--sign $(CODESIGN_INST ) ) build/HoRNDIS.pkg
3040
3141ifeq (,$(CODESIGN_KEXT ) )
0 commit comments