1 include $(CoreOSMakefiles)/ProjectBuilder/Makefile.Postamble.Common
4 # gcc-3.5 doesn't support -precomp-trustfile (3689986), which
5 # pb_makefiles/flags.make sets, so we overwrite PRECOMP_CFLAGS
8 ifeq "$(BUILD_TYPE)" "normal"
14 # pb_makefiles erroneously omits $(BUILD_TYPE_SUFFIX) from the install name
15 DYLIB_INSTALL_NAME = $(LIBRARY_PREFIX)$(NAME).$(VERSION_NAME)$(BUILD_TYPE_SUFFIX)$(LIBRARY_EXT)
17 # The nonversioned suffix link is required by cc -pg, which is a bug in the compiler.
18 # We can remove those when this is fixed.
20 override DEBUG_SUFFIX = _debug
21 PRODUCTS += $(foreach TYPE, DEBUG PROFILE, \
22 $(PRODUCT_DIR)/$(LIBRARY_PREFIX)$(NAME)$($(TYPE)_SUFFIX)$(LIBRARY_EXT) \
23 $(PRODUCT_DIR)/$(LIBRARY_PREFIX)$(NAME).$(VERSION_NAME)$($(TYPE)_SUFFIX)$(LIBRARY_EXT) \
26 SystemFramework = $(NSFRAMEWORKDIR)/System.framework
27 VersionDir = Versions/$(VERSION_NAME)
30 $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)"
31 $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)/Versions"
32 $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)/$(VersionDir)"
33 $(LN) -fs "$(VERSION_NAME)" "$(DSTROOT)$(SystemFramework)/Versions/Current"
34 set -x && for suffix in "" $(DEBUG_SUFFIX) $(PROFILE_SUFFIX); do \
35 $(LN) -fs "Versions/Current/$(NAME)$${suffix}" "$(DSTROOT)$(SystemFramework)/$(NAME)$${suffix}" && \
36 $(LN) -fs "../../../../../..$(INSTALLDIR)/$(LIBRARY_PREFIX)$(NAME).$(VERSION_NAME)$${suffix}$(LIBRARY_EXT)" \
37 "$(DSTROOT)$(SystemFramework)/$(VersionDir)/$(NAME)$${suffix}" || exit 1; \
39 $(LN) -fs "Versions/Current/PrivateHeaders" "$(DSTROOT)$(SystemFramework)"
42 set -x && for lib in $(BSD_LIBS) ; do \
43 $(LN) -fs libSystem.dylib "$(DSTROOT)$(INSTALLDIR)/lib$${lib}.dylib" || exit 1; \
47 $(MKDIR) $(DSTROOT)$(SystemFramework)/$(VersionDir)/Resources
48 $(LN) -fs Versions/Current/Resources $(DSTROOT)$(SystemFramework)/Resources
49 $(RM) -f $(DSTROOT)$(SystemFramework)/$(VersionDir)/Resources/Info.plist
50 $(CP) $(SRCROOT)/Info.plist $(DSTROOT)$(SystemFramework)/$(VersionDir)/Resources
51 $(CHMOD) 444 $(DSTROOT)$(SystemFramework)/$(VersionDir)/Resources/Info.plist
53 .PHONY: comm-page-symbols
54 comm-page-symbols: CommPageSymbols.o
58 ALL_ARCHS = i386 ppc ppc64 x86_64
59 SEG1ADDR_i386 = 0xffff0000
60 SEG1ADDR_ppc = 0xffff8000
61 SEG1ADDR_ppc64 = 0xffffffffffff8000
62 SEG1ADDR_x86_64 = 0x00007fffffe00000
63 SLFS_F_PH = /System/Library/Frameworks/System.framework/PrivateHeaders
65 $(foreach A,$(ALL_ARCHS),$(OFILE_DIR)/%.$(A).o %.$(A).o): %.st
66 $(CC) -arch $(CURRENT_ARCH) -x assembler-with-cpp \
67 -I$(SLFS_F_PH)/$(CURRENT_ARCH) \
68 $(ALL_CFLAGS) -c -o $(OFILE_DIR)/commsym.$(CURRENT_ARCH).o $<
69 strip -S $(OFILE_DIR)/commsym.$(CURRENT_ARCH).o
70 ld -arch $(CURRENT_ARCH) -r -seg1addr $(SEG1ADDR_$(CURRENT_ARCH)) \
71 $(OFILE_DIR)/commsym.$(CURRENT_ARCH).o -o $(OFILE_DIR)/$(notdir $@)