xref: /illumos-gate/usr/src/cmd/pfexec/Makefile (revision f17620a4f72a29025a22655ba8735ccd20ae174f)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23# Copyright 2023 OmniOS Community Edition (OmniOSce) Association.
24#
25
26PROG= pfexec
27SRCS= $(PROG:%=%.c)
28
29PFEXEC= pfexec
30PFSH= pfsh
31
32BINSHELLS = bash csh ksh ksh93 rksh rksh93 sh tcsh zsh
33
34include ../Makefile.cmd
35include ../Makefile.ctf
36
37CTF_MODE =	link
38FILEMODE =	0555
39
40ROOTBINPFEXEC = $(PFEXEC:%=$(ROOTBIN)/%)
41
42ROOTXPG4BINPFSH = $(PFSH:%=$(ROOTXPG4BIN)/%)
43ROOTSBINPFSH = $(PFSH:%=$(ROOTSBIN)/%)
44ROOTHASBINPFSH = $(PFSH:%=$(ROOTHASBIN)/%)
45
46ROOTBINSHELLS = $(BINSHELLS:%=$(ROOTBIN)/pf%)
47
48HARDLINKS = $(ROOTHASBINPFSH) $(ROOTBINSHELLS)
49SYMLINKS = $(ROOTXPG4BINPFSH) $(ROOTSBINPFSH)
50
51.KEEP_STATE:
52
53all: $(PROG)
54
55$(HARDLINKS) := INSLINKTARGET = $(ROOTBINPFEXEC)
56$(ROOTXPG4BINPFSH) := INSLINKTARGET = ../../bin/$(PFEXEC)
57$(ROOTSBINPFSH) := INSLINKTARGET = ../usr/bin/$(PFEXEC)
58
59$(HARDLINKS): $(ROOTBINPFEXEC)
60	$(INS.link)
61
62$(SYMLINKS): $(ROOTBINPFEXEC)
63	$(INS.symlink)
64
65install: all $(ROOTBINPFEXEC) $(HARDLINKS) $(SYMLINKS)
66
67clean:
68
69include ../Makefile.targ
70