Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Commit

Permalink
lang/swift/objc_runtime_ivars stop using xcodebuild to make a framework.
Browse files Browse the repository at this point in the history
Make the directory hierarchy and copy in the files manually in the
makefile to avoid the dependency on Xcode.

(cherry picked from commit c21535b)
  • Loading branch information
jasonmolenda committed Sep 11, 2019
1 parent 8ad67ed commit 9ea83ea
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 572 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,23 @@ include $(LEVEL)/Makefile.rules

SWIFTFLAGS += -framework aTestFramework -framework Cocoa -F $(shell pwd) -Xlinker -rpath -Xlinker $(shell pwd)

CFLAGS += -arch $(ARCH)
LD_FLAGS := -dynamiclib

aTestFramework.framework:
xcodebuild -configuration Release -project $(SRCDIR)/framework/aTestFramework/aTestFramework.xcodeproj CONFIGURATION_BUILD_DIR=$(shell pwd)
$(CXX) $(CFLAGS) $(LD_FLAGS) -o aTestFramework $(SRCDIR)/MyClass.mm -I $(SRCDIR) -framework Foundation
mkdir -p aTestFramework.framework/Versions/A/Headers
mkdir -p aTestFramework.framework/Versions/A/Modules
mkdir -p aTestFramework.framework/Versions/A/Resources
(cd aTestFramework.framework/Versions; ln -s A Current )
(cd aTestFramework.framework; ln -s Versions/Current/Headers Headers)
(cd aTestFramework.framework; ln -s Versions/Current/Modules Modules)
(cd aTestFramework.framework; ln -s Versions/Current/Resources Resources)
mv aTestFramework aTestFramework.framework/Versions/A
[ -d aTestFramework.dSYM ] && mv aTestFramework.dSYM aTestFramework.framework/Versions/A
(cd aTestFramework.framework; ln -s Versions/Current/aTestFramework aTestFramework)
cp $(SRCDIR)/MyClass.h aTestFramework.framework/Versions/A/Headers/aTestFramework.h
cp $(SRCDIR)/module.map $(shell pwd)/aTestFramework.framework/



clean::
rm -rf aTestFramework.framework aTestFramework aTestFramework.dSYM
Loading

0 comments on commit 9ea83ea

Please sign in to comment.