xref: /illumos-gate/usr/src/cmd/pfexec/Makefile (revision dd4c2a64)
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
506e1a714Sraf# Common Development and Distribution License (the "License").
606e1a714Sraf# 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#
22134a1f4eSCasper H.S. Dik# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23*dd4c2a64SAndy Fiddaman# Copyright 2023 OmniOS Community Edition (OmniOSce) Association.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gatePROG= pfexec
277c478bd9Sstevel@tonic-gateSRCS= $(PROG:%=%.c)
28*dd4c2a64SAndy Fiddaman
297c478bd9Sstevel@tonic-gatePFEXEC= pfexec
30*dd4c2a64SAndy FiddamanPFSH= pfsh
317c478bd9Sstevel@tonic-gate
32134a1f4eSCasper H.S. DikBINSHELLS = bash csh ksh ksh93 rksh rksh93 sh tcsh zsh
33134a1f4eSCasper H.S. Dik
347c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
35*dd4c2a64SAndy Fiddamaninclude ../Makefile.ctf
367c478bd9Sstevel@tonic-gate
37*dd4c2a64SAndy FiddamanCTF_MODE =	link
38134a1f4eSCasper H.S. DikFILEMODE =	0555
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gateROOTBINPFEXEC = $(PFEXEC:%=$(ROOTBIN)/%)
417c478bd9Sstevel@tonic-gate
42*dd4c2a64SAndy FiddamanROOTXPG4BINPFSH = $(PFSH:%=$(ROOTXPG4BIN)/%)
43*dd4c2a64SAndy FiddamanROOTSBINPFSH = $(PFSH:%=$(ROOTSBIN)/%)
44*dd4c2a64SAndy FiddamanROOTHASBINPFSH = $(PFSH:%=$(ROOTHASBIN)/%)
45*dd4c2a64SAndy Fiddaman
46*dd4c2a64SAndy FiddamanROOTBINSHELLS = $(BINSHELLS:%=$(ROOTBIN)/pf%)
47*dd4c2a64SAndy Fiddaman
48*dd4c2a64SAndy FiddamanHARDLINKS = $(ROOTHASBINPFSH) $(ROOTBINSHELLS)
49*dd4c2a64SAndy FiddamanSYMLINKS = $(ROOTXPG4BINPFSH) $(ROOTSBINPFSH)
50*dd4c2a64SAndy Fiddaman
517c478bd9Sstevel@tonic-gate.KEEP_STATE:
527c478bd9Sstevel@tonic-gate
53*dd4c2a64SAndy Fiddamanall: $(PROG)
547c478bd9Sstevel@tonic-gate
55*dd4c2a64SAndy Fiddaman$(HARDLINKS) := INSLINKTARGET = $(ROOTBINPFEXEC)
56*dd4c2a64SAndy Fiddaman$(ROOTXPG4BINPFSH) := INSLINKTARGET = ../../bin/$(PFEXEC)
57*dd4c2a64SAndy Fiddaman$(ROOTSBINPFSH) := INSLINKTARGET = ../usr/bin/$(PFEXEC)
587c478bd9Sstevel@tonic-gate
59*dd4c2a64SAndy Fiddaman$(HARDLINKS): $(ROOTBINPFEXEC)
60*dd4c2a64SAndy Fiddaman	$(INS.link)
61*dd4c2a64SAndy Fiddaman
62*dd4c2a64SAndy Fiddaman$(SYMLINKS): $(ROOTBINPFEXEC)
63*dd4c2a64SAndy Fiddaman	$(INS.symlink)
647c478bd9Sstevel@tonic-gate
65*dd4c2a64SAndy Fiddamaninstall: all $(ROOTBINPFEXEC) $(HARDLINKS) $(SYMLINKS)
66*dd4c2a64SAndy Fiddaman
67*dd4c2a64SAndy Fiddamanclean:
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
70