author | Jon Tibble <meths@btinternet.com> |
Sat, 06 Oct 2012 16:01:36 +0100 | |
changeset 579 | 869467bff179 |
parent 44 | 1fb6ec813265 |
permissions | -rw-r--r-- |
0 | 1 |
# |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
5 |
# Common Development and Distribution License (the "License"). |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# |
|
8 |
# You can obtain a copy of the license at src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
|
21 |
# Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
|
22 |
# Use is subject to license terms. |
|
23 |
# |
|
24 |
#ident "@(#)Makefile 1.0 06/03/07 SMI" |
|
25 |
# |
|
26 |
||
27 |
# common makefile to handle the most common parts of code: i.e. |
|
28 |
# copying static files from the src dir to the proto dir. |
|
29 |
||
30 |
FILES.obj = $(FILES:%=$(TARGETDIR)/%) |
|
31 |
FILES_MACH.obj = $(FILES_MACH:%=$(TARGETDIR)/%) |
|
32 |
||
33 |
all:= TARGET= all |
|
34 |
install := TARGET= install |
|
35 |
clean := TARGET= clean |
|
36 |
clobber := TARGET= clobber |
|
37 |
||
38 |
$(TARGETDIRS): |
|
39 |
$(INSDIR) $@ |
|
40 |
||
41 |
# the previous "$(INS) $(@D) $(@F)" doesn't work, |
|
42 |
# it will copy the same file obj '$(@F)' into diff target '$(@D)' |
|
43 |
# ie: |
|
44 |
# copy methods_unicode.so.3 fileroot/usr/lib/locale/common |
|
45 |
# copy methods_unicode.so.3 fileroot/usr/lib/locale/common/amd64 |
|
46 |
# |
|
47 |
$(FILES.obj): $(FILES) $(TARGETDIRS) |
|
48 |
@files='$(FILES)'; \ |
|
49 |
for file in $$files; do \ |
|
50 |
dir=`dirname $$file`; \ |
|
51 |
$(INS) $(TARGETDIR)/$$dir/ $$file; \ |
|
52 |
done |
|
53 |
||
54 |
$(FILES_MACH.obj): $(FILES_MACH:%=%.$(MACH)) $(TARGETDIRS) |
|
55 |
@files='$(FILES_MACH)'; \ |
|
56 |
for file in $$files; do \ |
|
57 |
dir=`dirname $$file`; \ |
|
58 |
$(INS) $(TARGETDIR)/$$dir/ $$file.$(MACH); \ |
|
59 |
mv $(TARGETDIR)/$$dir/$$file.$(MACH) $(TARGETDIR)/$$dir/$$file; \ |
|
60 |
done |
|
61 |
||
62 |
$(SUBDIRS): FRC |
|
63 |
@cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET) |
|
64 |
||
65 |
$(FILES): |
|
66 |
||
67 |
objclean: |
|
44
1fb6ec813265
imported patch makefile_targ_fix.patch
Jan Lana <jan.lana@sun.com>
parents:
0
diff
changeset
|
68 |
$(RM) -r $(FILES.obj) $(FILES_MACH.obj) |
0 | 69 |
|
70 |
FRC: |
|
71 |