]> git.saurik.com Git - apple/coreosmakefiles.git/blame - ReleaseControl/BSD.make
CoreOSMakefiles-40.tar.gz
[apple/coreosmakefiles.git] / ReleaseControl / BSD.make
CommitLineData
fdbff003
A
1##
2# Makefile for Apple Release Control (BSD projects)
3#
4# Wilfredo Sanchez | wsanchez@apple.com
5# Copyright (c) 1997-1999 Apple Computer, Inc.
6#
7# @APPLE_LICENSE_HEADER_START@
8#
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
15# this file.
16#
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
23# under the License.
24#
25# @APPLE_LICENSE_HEADER_END@
26##
27
28ifndef CoreOSMakefiles
29CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS
30endif
31
32include $(CoreOSMakefiles)/ReleaseControl/Common.make
33
34##
35# My variables
36##
37
f96dd566 38CC_Debug += -Wall
fdbff003 39
e050961f 40Extra_CC_Flags += -no-cpp-precomp
fdbff003
A
41
42Environment = ARCH_FLAGS="$(CC_Archs)" \
43 COPTS="$(CFLAGS)" \
44 MAKEOBJDIR="$(OBJROOT)" \
45 $(Extra_Environment)
46
47ifndef BSD_Executable_Path
48BSD_Executable_Path = $(USRBINDIR)
49endif
50
51Extra_Environment += BINDIR="$(BSD_Executable_Path)"
52
53Install_Environment = DESTDIR=$(DSTROOT) \
54 $(Extra_Install_Environment)
55
56Install_Target = install
57
58##
59# Targets
60##
61
62.PHONY: bsd_install
63
a44896e3 64BSD_Install_Targets = $(BSD_Before_Install) BSD_install_dirs BSD_install BSD_clean_dirs $(BSD_After_Install) compress_man_pages
fdbff003
A
65
66install:: $(BSD_Install_Targets)
67
68BSD_install_dirs::
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)
73
74BSD_install:: build
75 @echo "Installing $(Project)..."
76 $(_v) umask $(Install_Mask) ; $(Environment) $(BSDMAKE) $(Install_Environment) $(Install_Target)
77
78BSD_clean_dirs::
a44896e3 79 -$(_v) $(FIND) -d $(DSTROOT) -type d -exec rmdir "{}" \; 2> /dev/null
fdbff003
A
80
81BSD_Build_Targets = $(BSD_Before_Build) BSD_build $(BSD_After_Build)
82
83build:: $(BSD_Build_Targets)
84
85BSD_build::
86 @echo "Building $(Project)..."
87 $(_v) $(MKDIR) $(OBJROOT)
88 $(_v) $(Environment) $(BSDMAKE)
89
90depend::
91 @echo "Making dependancy file"
92 $(_v) $(Environment) $(BSDMAKE) depend