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
524fe0b3bSjmcp# Common Development and Distribution License (the "License").
624fe0b3bSjmcp# 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#
2124fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2224fe0b3bSjmcp# Use is subject to license terms.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate# cmd/backup/Makefile.backup
257c478bd9Sstevel@tonic-gate#
265661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.cmd
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gate# -c: continuation line indentation (broken for multi-line continuations)
317c478bd9Sstevel@tonic-gate# -h: heuristic checks (sometimes wrong)
327c478bd9Sstevel@tonic-gate# -p: extra-picky
337c478bd9Sstevel@tonic-gate# -v: verbose
347c478bd9Sstevel@tonic-gate# -C: ignore header block comments
357c478bd9Sstevel@tonic-gate# -P: check for non-POSIX types
367c478bd9Sstevel@tonic-gate#CSTYLEFLAGS=	-c -h -p -v -P
377c478bd9Sstevel@tonic-gateCSTYLEFLAGS=	-h -p -P
387c478bd9Sstevel@tonic-gate
397014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-implicit-function-declaration
407014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
41d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
427014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-clobbered
437014882cSRichard Lowe
445661bb76SJohn Levon# not linted
455661bb76SJohn LevonSMATCH=off
465661bb76SJohn Levon
477c478bd9Sstevel@tonic-gateUFSROOTETC=		$(ROOT)/etc
487c478bd9Sstevel@tonic-gateUFSROOTUSR=		$(ROOT)/usr
497c478bd9Sstevel@tonic-gateUFSROOTUSRLIB=		$(UFSROOTUSR)/lib
507c478bd9Sstevel@tonic-gateUFSROOTUSRLIBFS=	$(UFSROOTUSRLIB)/fs
517c478bd9Sstevel@tonic-gateUFSROOTUSRLIBFSTYPE=	$(UFSROOTUSRLIBFS)/$(FSTYPE)
527c478bd9Sstevel@tonic-gateUFSROOTUSRSBIN=		$(UFSROOTUSR)/sbin
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gateUFSROOTPKGUSRLIBFSTYPE=	$(PROG:%=$(UFSROOTUSRLIBFSTYPE)/%)
557c478bd9Sstevel@tonic-gateUFSROOTPKGETC=		$(PROT:%=$(UFSROOTETC)/%)
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gate$(UFSROOTETC)/%: $(UFSROOTETC) %
587c478bd9Sstevel@tonic-gate	$(INS.file)
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gate$(UFSROOTUSRLIBFSTYPE)/%: $(UFSROOTUSRLIBFSTYPE) %
617c478bd9Sstevel@tonic-gate	$(INS.file)
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gate# set up TARGET macro for all Makefile here
647c478bd9Sstevel@tonic-gateall:=		TARGET= all
657c478bd9Sstevel@tonic-gateinstall:=	TARGET= install
667c478bd9Sstevel@tonic-gateclean:=		TARGET= clean
677c478bd9Sstevel@tonic-gateclobber:=	TARGET= clobber
687c478bd9Sstevel@tonic-gatedebug:=		TARGET= debug
697c478bd9Sstevel@tonic-gatecheck:=		TARGET= check
707c478bd9Sstevel@tonic-gate_msg:=		TARGET= _msg
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gate# default dump library is the -O one
737c478bd9Sstevel@tonic-gateDUMPLIB=	libdump.a
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate# define the DO_SUBDIR macro, so that it can be changed here for all Makefiles
76*d17be682SRichard LoweDO_SUBDIR=	cd $@; pwd; $(MAKE) $(TARGET)
77*d17be682SRichard LoweDO_LIBDIR=	@cd $(@D); pwd; $(MAKE) $(TARGET)
78