1EXE := deep-bundle 2all: clean $(EXE) 3 4include Makefile.rules 5 6$(EXE): 7 $(CC) $(CFLAGS) -install_name $(shell pwd)/MyFramework.framework/Versions/A/MyFramework -dynamiclib -o MyFramework $(SRCDIR)/myframework.c 8 mkdir -p MyFramework.framework/Versions/A/Headers 9 mkdir -p MyFramework.framework/Versions/A/Resources 10 cp MyFramework MyFramework.framework/Versions/A 11 cp $(SRCDIR)/MyFramework.h MyFramework.framework/Versions/A/Headers 12 cp $(SRCDIR)/Info.plist MyFramework.framework/Versions/A/Resources 13 ( cd MyFramework.framework/Versions ; ln -s A Current ) 14 ( cd MyFramework.framework/ ; ln -s Versions/Current/Headers . ) 15 ( cd MyFramework.framework/ ; ln -s Versions/Current/MyFramework . ) 16 ( cd MyFramework.framework/ ; ln -s Versions/Current/Resources . ) 17 mv MyFramework.dSYM MyFramework.framework.dSYM 18 mkdir hide.app 19 rm -f MyFramework 20 tar cf - MyFramework.framework MyFramework.framework.dSYM | ( cd hide.app;tar xBpf -) 21 $(CC) $(CFLAGS) -o deep-bundle $(SRCDIR)/main.c -F. -framework MyFramework 22 23clean:: 24 rm -rf a.out a.out.dSYM deep-bundle deep-bundle.dSYM MyFramework.framework MyFramework.framework.dSYM MyFramework MyFramework.dSYM hide.app 25