xref: /illumos-gate/usr/src/ucbcmd/Makefile.ucbcmd (revision b69c34dad3717624ff6b4f32b71014ee05b6a678)
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
47ROOT4LIB=	$(ROOT)/usr/4lib
48ROOTETC=	$(ROOT)/etc
49ROOTSHLIB=	$(ROOT)/usr/share/lib
50ROOTBIN32=	$(ROOTBIN)/$(MACH32)
51ROOTBIN64=	$(ROOTBIN)/$(MACH64)
52
53ROOTPROG=	$(PROG:%=$(ROOTBIN)/%)
54ROOTLIBPROG=	$(PROG:%=$(ROOTLIB)/%)
55ROOT4LIBPROG=	$(PROG:%=$(ROOT4LIB)/%)
56ROOTETCPROG=	$(PROG:%=$(ROOTETC)/%)
57ROOTPROG64=	$(PROG:%=$(ROOTBIN64)/%)
58ROOTPROG32=	$(PROG:%=$(ROOTBIN32)/%)
59
60ISAEXEC=	$(ROOT)/usr/lib/isaexec
61
62# don't lint any of ucbcmd
63SMATCH=off
64
65# storing LDLIBS in two macros allows reordering of options
66LDLIBS.cmd =    $(ENVLDLIBS1)  $(ENVLDLIBS2)  $(ENVLDLIBS3)
67LDLIBS =        $(LDLIBS.cmd)
68
69LDFLAGS.cmd = \
70	$(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \
71	$(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) \
72	$(BDIRECT)
73
74LDFLAGS =       $(LDFLAGS.cmd)
75
76$(ROOTBIN)/%: %
77	$(INS.file)
78
79$(ROOTLIB)/%: %
80	$(INS.file)
81
82$(ROOT4LIB)/%: %
83	$(INS.file)
84
85$(ROOTETC)/%: %
86	$(INS.file)
87
88$(ROOTBIN64)/%: %
89	$(INS.file)
90
91$(ROOTBIN32)/%: %
92	$(INS.file)
93
94# Define the majority text domain in this directory
95TEXT_DOMAIN= SUNW_OST_UCBCMD
96