]> git.saurik.com Git - apple/libsystem.git/blame - Makefile.postamble
Libsystem-60.tar.gz
[apple/libsystem.git] / Makefile.postamble
CommitLineData
435227b9
A
1include $(CoreOSMakefiles)/ProjectBuilder/Makefile.Postamble.Common
2
3ifeq "$(BUILD_TYPE)" "normal"
4LIBS += -lcc_noc++
5else
6LIBS =
7endif
8
9LIBS := $(foreach LIB, \
10 $(filter $(BSD_LIBS), $(subst -l,,$(LIBS))), \
11 $(NEXT_ROOT)/usr/local/lib/system/lib$(LIB).a) \
12 $(filter-out $(addprefix -l, $(BSD_LIBS)), $(LIBS))
13
14# pb_makefiles erroneously omits $(BUILD_TYPE_SUFFIX) from the install name
15DYLIB_INSTALL_NAME = $(LIBRARY_PREFIX)$(NAME).$(VERSION_NAME)$(BUILD_TYPE_SUFFIX)$(LIBRARY_EXT)
16
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.
19
20override DEBUG_SUFFIX = _debug
21PRODUCTS += $(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) \
24 )
25
26SystemFramework = $(NSFRAMEWORKDIR)/System.framework
4a9703e6 27VersionDir = Versions/$(VERSION_NAME)
435227b9
A
28
29compat-next:
30 $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)"
31 $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)/Versions"
4a9703e6
A
32 $(INSTALL_DIRECTORY) "$(DSTROOT)$(SystemFramework)/$(VersionDir)"
33 $(LN) -fs "$(VERSION_NAME)" "$(DSTROOT)$(SystemFramework)/Versions/Current"
34 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}" ; \
435227b9 38 done
4a9703e6 39 $(LN) -fs "Versions/Current/PrivateHeaders" "$(DSTROOT)$(SystemFramework)"
435227b9
A
40
41compat-bsd:
42 for lib in $(BSD_LIBS) ; do \
43 $(LN) -fs libSystem.dylib "$(DSTROOT)$(INSTALLDIR)/lib$${lib}.dylib"; \
44 done
4a9703e6
A
45
46copy_plist:
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