17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5a6600459Sstevel# Common Development and Distribution License (the "License"). 6a6600459Sstevel# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate# Suffixes for files that flag a particular check 277c478bd9Sstevel@tonic-gateSUFFIX_LINT = .lint 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateall := TARGET = all 307c478bd9Sstevel@tonic-gateinstall := TARGET = install 317c478bd9Sstevel@tonic-gateclean := TARGET = clean 327c478bd9Sstevel@tonic-gateclobber := TARGET = clobber 337c478bd9Sstevel@tonic-gatecatalog := TARGET = catalog 347c478bd9Sstevel@tonic-gatecheck := TARGET = check 357c478bd9Sstevel@tonic-gatecstyle := TARGET = cstyle 367c478bd9Sstevel@tonic-gatehdrchk := TARGET = hdrchk 377c478bd9Sstevel@tonic-gatelint := TARGET = lint 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate.KEEP_STATE: 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gateall: ${SUBDIRS} ${OBJS} .WAIT ${PROG} 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate# Create the binary 447c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) $(SUBOBJS) 457c478bd9Sstevel@tonic-gate $(LINK.c) $(OBJS) $(SUBOBJS) -o $@ $(LDLIBS) 467c478bd9Sstevel@tonic-gate $(POST_PROCESS) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate# Make objects in subdirectories 497c478bd9Sstevel@tonic-gate$(SUBOBJS) $(POFILES): 507c478bd9Sstevel@tonic-gate @cd $(@D); ${MAKE} $(@F) 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gateROOTXML= $(ROOTSHLIB)/xml 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate# Rule/definitions for DTDs 557c478bd9Sstevel@tonic-gateROOTXMLDTD= $(ROOTXML)/dtd 567c478bd9Sstevel@tonic-gateROOTXMLDTDFILES= $(DTDFILES:%=$(ROOTXMLDTD)/%) 577c478bd9Sstevel@tonic-gate$(ROOTXMLDTDFILES) := FILEMODE = 0444 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate$(ROOTXMLDTD)/%: % 607c478bd9Sstevel@tonic-gate $(INS.file) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate# Rule/definitions for XSL style sheets 637c478bd9Sstevel@tonic-gateROOTXMLSTYLE= $(ROOTXML)/style 647c478bd9Sstevel@tonic-gateROOTXMLSTYLEFILES= $(STYLEFILES:%=$(ROOTXMLSTYLE)/%) 657c478bd9Sstevel@tonic-gate$(ROOTXMLSTYLEFILES) := FILEMODE = 0444 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate$(ROOTXMLSTYLE)/%: % 687c478bd9Sstevel@tonic-gate $(INS.file) 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate# Install recursively 717c478bd9Sstevel@tonic-gateinstall: all .WAIT \ 727c478bd9Sstevel@tonic-gate ${SUBDIRS} \ 737c478bd9Sstevel@tonic-gate $(ROOTUSRSBINPROG) \ 747c478bd9Sstevel@tonic-gate $(ROOTETCDEFAULTFILES) \ 757c478bd9Sstevel@tonic-gate $(ROOTXMLDTDFILES) \ 767c478bd9Sstevel@tonic-gate $(ROOTXMLSTYLEFILES) 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate# Pattern-matching rule for lint 797c478bd9Sstevel@tonic-gate%$(SUFFIX_LINT): % 807c478bd9Sstevel@tonic-gate ${LINT.c} -I. ${INCLUDES} -y -c $< && touch $@ 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate# Run lint on all source files 837c478bd9Sstevel@tonic-gatelint: ${SUBDIRS} $(SRCS:%=%$(SUFFIX_LINT)) 847c478bd9Sstevel@tonic-gate 85a6600459SstevelCSTYLE_FLAGS= -Pp 86a6600459SstevelHDRCHK_FLAGS= -a 877c478bd9Sstevel@tonic-gate 88a6600459Sstevelcstyle: ${SUBDIRS} 897c478bd9Sstevel@tonic-gate 90a6600459Sstevelhdrchk: ${SUBDIRS} 917c478bd9Sstevel@tonic-gate 92a6600459Sstevelcheck: cstyle hdrchk 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gateclobber: ${SUBDIRS} 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gateclean: ${SUBDIRS} 97*b6805bf7SGordon Ross $(RM) *.o *.ln *.i *.lint $(CLEANFILES) 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gatecatalog: $(POFILE) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate${SUBDIRS}: FRC 1027c478bd9Sstevel@tonic-gate @cd $@; pwd; ${MAKE} ${TARGET} 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gateFRC: 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate# Included for message catalog handling 1077c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.msg.targ 1087c478bd9Sstevel@tonic-gateinclude $(METASSIST_TOPLEVEL)/../../Makefile.targ 109