src/Makefile.targ
author hnhn
Tue, 25 Jan 2011 15:54:29 +0100
changeset 519 cff3eb0cf6ff
parent 44 1fb6ec813265
permissions -rw-r--r--
6986019 Missing iconv 64bit modules

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").  
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident	"@(#)Makefile	1.0	06/03/07	SMI"
#

# common makefile to handle the most common parts of code: i.e.
# copying static files from the src dir to the proto dir.

FILES.obj = $(FILES:%=$(TARGETDIR)/%)
FILES_MACH.obj = $(FILES_MACH:%=$(TARGETDIR)/%)

all:=		TARGET= all
install :=	TARGET= install
clean :=	TARGET= clean
clobber :=	TARGET= clobber

$(TARGETDIRS):
	$(INSDIR) $@

# the previous "$(INS) $(@D) $(@F)" doesn't work,
# it will copy the same file obj '$(@F)' into diff target '$(@D)'
# ie: 
#  copy methods_unicode.so.3 fileroot/usr/lib/locale/common
#  copy methods_unicode.so.3 fileroot/usr/lib/locale/common/amd64
#
$(FILES.obj): $(FILES) $(TARGETDIRS)
	@files='$(FILES)'; \
	for file in $$files; do \
	  dir=`dirname $$file`; \
	  $(INS) $(TARGETDIR)/$$dir/ $$file; \
	done

$(FILES_MACH.obj): $(FILES_MACH:%=%.$(MACH)) $(TARGETDIRS)
	@files='$(FILES_MACH)'; \
	for file in $$files; do \
	  dir=`dirname $$file`; \
	  $(INS) $(TARGETDIR)/$$dir/ $$file.$(MACH); \
	  mv $(TARGETDIR)/$$dir/$$file.$(MACH) $(TARGETDIR)/$$dir/$$file; \
	done

$(SUBDIRS): FRC
	@cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)

$(FILES):

objclean:
	$(RM) -r  $(FILES.obj) $(FILES_MACH.obj)

FRC: