xref: /illumos-gate/usr/src/ucbcmd/Makefile.ucbcmd (revision a92282e44f968185a6bba094d1e5fece2da819cf)
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#
23# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# Copyright (c) 2018, Joyent, Inc.
27#
28# ucbcmd/Makefile.ucbcmd
29#
30# Definitions common to ucb command source.
31#
32# include global definitions; SRC should be defined in the shell.
33# SRC is needed until RFE 1026993 is implemented.
34
35include $(SRC)/Makefile.master
36
37LN=		ln
38SH=		sh
39CHMOD=		chmod
40MKDIR=		mkdir
41TOUCH=		touch
42
43FILEMODE=	0555
44LIBFILEMODE=	0444
45ROOTBIN=	$(ROOT)/usr/ucb
46ROOTLIB=	$(ROOT)/usr/ucblib
47ROOTETC=	$(ROOT)/etc
48ROOTSHLIB=	$(ROOT)/usr/share/lib
49ROOTBIN32=	$(ROOTBIN)/$(MACH32)
50ROOTBIN64=	$(ROOTBIN)/$(MACH64)
51
52ROOTPROG=	$(PROG:%=$(ROOTBIN)/%)
53ROOTLIBPROG=	$(PROG:%=$(ROOTLIB)/%)
54ROOTETCPROG=	$(PROG:%=$(ROOTETC)/%)
55ROOTPROG64=	$(PROG:%=$(ROOTBIN64)/%)
56ROOTPROG32=	$(PROG:%=$(ROOTBIN32)/%)
57
58ISAEXEC=	$(ROOT)/usr/lib/isaexec
59
60# don't lint any of ucbcmd
61SMATCH=off
62
63# storing LDLIBS in two macros allows reordering of options
64LDLIBS.cmd =    $(ENVLDLIBS1)  $(ENVLDLIBS2)  $(ENVLDLIBS3)
65LDLIBS =        $(LDLIBS.cmd)
66
67LDFLAGS.cmd = \
68	$(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \
69	$(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) \
70	$(BDIRECT)
71
72LDFLAGS =       $(LDFLAGS.cmd)
73
74$(ROOTBIN)/%: %
75	$(INS.file)
76
77$(ROOTLIB)/%: %
78	$(INS.file)
79
80$(ROOTETC)/%: %
81	$(INS.file)
82
83$(ROOTBIN64)/%: %
84	$(INS.file)
85
86$(ROOTBIN32)/%: %
87	$(INS.file)
88
89# Define the majority text domain in this directory
90TEXT_DOMAIN= SUNW_OST_UCBCMD
91