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