]> git.saurik.com Git - apple/libsystem.git/blobdiff - Makefile.postamble
Libsystem-71.1.1.tar.gz
[apple/libsystem.git] / Makefile.postamble
index 6b88b1a1606324c4edf596a928246bb9622a3bfe..cb51c875c0668b6fd3e28bb52f7a9d165b8b8970 100644 (file)
@@ -24,23 +24,49 @@ PRODUCTS += $(foreach TYPE, DEBUG PROFILE,                                                          \
             )
 
 SystemFramework = $(NSFRAMEWORKDIR)/System.framework
-VersionDir      = /Versions/$(VERSION_NAME)
+VersionDir      = Versions/$(VERSION_NAME)
 
 compat-next:
        $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)"
        $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)/Versions"
-       $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)/Versions/B"
-       for suffix in "" $(DEBUG_SUFFIX) $(PROFILE_SUFFIX); do                                                  \
-         $(LN) -fs                                                                                             \
-               $$(relpath                                                                                      \
-                   "$(DSTROOT)$(SystemFramework)$(VersionDir)"                                                 \
-                   "$(DSTROOT)$(INSTALLDIR)/$(LIBRARY_PREFIX)$(NAME).$(VERSION_NAME)$${suffix}$(LIBRARY_EXT)") \
-               "$(DSTROOT)$(SystemFramework)$(VersionDir)/System$${suffix}";                                   \
-         $(LN) -fs ".$(VersionDir)/System$${suffix}" "$(DSTROOT)$(SystemFramework)";                           \
+       $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)/$(VersionDir)"
+       $(LN) -fs "$(VERSION_NAME)" "$(DSTROOT)$(SystemFramework)/Versions/Current"
+       for suffix in "" $(DEBUG_SUFFIX) $(PROFILE_SUFFIX); do                                                          \
+               $(LN) -fs "Versions/Current/$(NAME)$${suffix}" "$(DSTROOT)$(SystemFramework)/$(NAME)$${suffix}" ;       \
+               $(LN) -fs "../../../../../..$(INSTALLDIR)/$(LIBRARY_PREFIX)$(NAME).$(VERSION_NAME)$${suffix}$(LIBRARY_EXT)" \
+                       "$(DSTROOT)$(SystemFramework)/$(VersionDir)/$(NAME)$${suffix}"                          ;       \
        done
-       $(LN) -fs ".$(VersionDir)/PrivateHeaders" "$(DSTROOT)$(SystemFramework)"
+       $(LN) -fs "Versions/Current/PrivateHeaders" "$(DSTROOT)$(SystemFramework)"
 
 compat-bsd:
        for lib in $(BSD_LIBS) ; do             \
          $(LN) -fs libSystem.dylib "$(DSTROOT)$(INSTALLDIR)/lib$${lib}.dylib"; \
        done
+
+copy_plist:
+       $(MKDIR) $(DSTROOT)$(SystemFramework)/$(VersionDir)/Resources
+       $(LN) -fs Versions/Current/Resources $(DSTROOT)$(SystemFramework)/Resources
+       $(RM) -f $(DSTROOT)$(SystemFramework)/$(VersionDir)/Resources/Info.plist
+       $(CP) $(SRCROOT)/Info.plist $(DSTROOT)$(SystemFramework)/$(VersionDir)/Resources
+       $(CHMOD) 444 $(DSTROOT)$(SystemFramework)/$(VersionDir)/Resources/Info.plist
+
+.PHONY: comm-page-symbols
+comm-page-symbols: spinlock_stub.o spinlocktry_stub.o spinunlock_stub.o CommPageSymbols.o
+
+.SUFFIXES: .st
+
+SLFS_F_PH = /System/Library/Frameworks/System.framework/PrivateHeaders
+
+$(OFILE_DIR)/%.ppc.o %.ppc.o: %.st
+       $(CC) -arch $(CURRENT_ARCH) -x assembler-with-cpp \
+           -I$(SLFS_F_PH)/$(CURRENT_ARCH) \
+           $(ALL_CFLAGS) -c -o $(OFILE_DIR)/commsym.$(CURRENT_ARCH).o $<
+       ld -arch $(CURRENT_ARCH) -r -seg1addr 0xffff8000 \
+           $(OFILE_DIR)/commsym.$(CURRENT_ARCH).o -o $(OFILE_DIR)/$(notdir $@)
+
+$(OFILE_DIR)/%.i386.o %.i386.o: %.st
+       $(CC) -arch $(CURRENT_ARCH) -x assembler-with-cpp \
+           -I$(SLFS_F_PH)/$(CURRENT_ARCH) \
+           $(ALL_CFLAGS) -c -o $(OFILE_DIR)/commsym.$(CURRENT_ARCH).o $<
+       ld -arch $(CURRENT_ARCH) -r -seg1addr 0xBFFF8000 \
+           $(OFILE_DIR)/commsym.$(CURRENT_ARCH).o -o $(OFILE_DIR)/$(notdir $@)