]>
Commit | Line | Data |
---|---|---|
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 | ||
28 | ifndef CoreOSMakefiles | |
29 | CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS | |
30 | endif | |
31 | ||
32 | include $(CoreOSMakefiles)/ReleaseControl/Common.make | |
33 | ||
34 | ## | |
35 | # My variables | |
36 | ## | |
37 | ||
f96dd566 | 38 | CC_Debug += -Wall |
fdbff003 | 39 | |
e050961f | 40 | Extra_CC_Flags += -no-cpp-precomp |
fdbff003 A |
41 | |
42 | Environment = ARCH_FLAGS="$(CC_Archs)" \ | |
43 | COPTS="$(CFLAGS)" \ | |
44 | MAKEOBJDIR="$(OBJROOT)" \ | |
45 | $(Extra_Environment) | |
46 | ||
47 | ifndef BSD_Executable_Path | |
48 | BSD_Executable_Path = $(USRBINDIR) | |
49 | endif | |
50 | ||
51 | Extra_Environment += BINDIR="$(BSD_Executable_Path)" | |
52 | ||
53 | Install_Environment = DESTDIR=$(DSTROOT) \ | |
54 | $(Extra_Install_Environment) | |
55 | ||
56 | Install_Target = install | |
57 | ||
58 | ## | |
59 | # Targets | |
60 | ## | |
61 | ||
62 | .PHONY: bsd_install | |
63 | ||
a44896e3 | 64 | BSD_Install_Targets = $(BSD_Before_Install) BSD_install_dirs BSD_install BSD_clean_dirs $(BSD_After_Install) compress_man_pages |
fdbff003 A |
65 | |
66 | install:: $(BSD_Install_Targets) | |
67 | ||
68 | BSD_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 | ||
74 | BSD_install:: build | |
75 | @echo "Installing $(Project)..." | |
76 | $(_v) umask $(Install_Mask) ; $(Environment) $(BSDMAKE) $(Install_Environment) $(Install_Target) | |
77 | ||
78 | BSD_clean_dirs:: | |
a44896e3 | 79 | -$(_v) $(FIND) -d $(DSTROOT) -type d -exec rmdir "{}" \; 2> /dev/null |
fdbff003 A |
80 | |
81 | BSD_Build_Targets = $(BSD_Before_Build) BSD_build $(BSD_After_Build) | |
82 | ||
83 | build:: $(BSD_Build_Targets) | |
84 | ||
85 | BSD_build:: | |
86 | @echo "Building $(Project)..." | |
87 | $(_v) $(MKDIR) $(OBJROOT) | |
88 | $(_v) $(Environment) $(BSDMAKE) | |
89 | ||
90 | depend:: | |
91 | @echo "Making dependancy file" | |
92 | $(_v) $(Environment) $(BSDMAKE) depend |