2 # Makefile for Apple Release Control (BSD projects)
4 # Wilfredo Sanchez | wsanchez@apple.com
5 # Copyright (c) 1997-1999 Apple Computer, Inc.
7 # @APPLE_LICENSE_HEADER_START@
9 # Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
10 # Reserved. This file contains Original Code and/or Modifications of
11 # Original Code as defined in and that are subject to the Apple Public
12 # Source License Version 1.1 (the "License"). You may not use this file
13 # except in compliance with the License. Please obtain a copy of the
14 # License at http://www.apple.com/publicsource and read it before using
17 # The Original Code and all software distributed under the License are
18 # distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
19 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
20 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
21 # FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
22 # License for the specific language governing rights and limitations
25 # @APPLE_LICENSE_HEADER_END@
28 ifndef CoreOSMakefiles
29 CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
32 include $(CoreOSMakefiles)/ReleaseControl/Common.make
40 Extra_CC_Flags += -no-cpp-precomp
42 Environment = ARCH_FLAGS="$(CC_Archs)" \
44 MAKEOBJDIR="$(OBJROOT)" \
47 ifndef BSD_Executable_Path
48 BSD_Executable_Path = $(USRBINDIR)
51 Extra_Environment += BINDIR="$(BSD_Executable_Path)"
53 Install_Environment = DESTDIR=$(DSTROOT) \
54 $(Extra_Install_Environment)
56 Install_Target = install
64 BSD_Install_Targets = $(BSD_Before_Install) BSD_install_dirs BSD_install BSD_clean_dirs $(BSD_After_Install) compress_man_pages
66 install:: $(BSD_Install_Targets)
69 $(_v) $(MKDIR) $(DSTROOT)
70 $(_v) mtree -f $(CoreOSMakefiles)/ReleaseControl/mtree/Darwin.root.dist -U -p $(DSTROOT)
71 $(_v) mtree -f $(CoreOSMakefiles)/ReleaseControl/mtree/Darwin.usr.dist -U -p $(DSTROOT)$(USRDIR)
72 $(_v) mtree -f $(CoreOSMakefiles)/ReleaseControl/mtree/Darwin.var.dist -U -p $(DSTROOT)$(VARDIR)
75 @echo "Installing $(Project)..."
76 $(_v) umask $(Install_Mask) ; $(Environment) $(BSDMAKE) $(Install_Environment) $(Install_Target)
79 -$(_v) $(FIND) -d $(DSTROOT) -type d -exec rmdir "{}" \; 2> /dev/null
81 BSD_Build_Targets = $(BSD_Before_Build) BSD_build $(BSD_After_Build)
83 build:: $(BSD_Build_Targets)
86 @echo "Building $(Project)..."
87 $(_v) $(MKDIR) $(OBJROOT)
88 $(_v) $(Environment) $(BSDMAKE)
91 @echo "Making dependancy file"
92 $(_v) $(Environment) $(BSDMAKE) depend