xref: /illumos-gate/usr/src/ucbcmd/Makefile.ucbcmd (revision 02b17e23cf5bf66a5ea787e066ae3d1aa49bd856)
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
37FILEMODE=	0555
38LIBFILEMODE=	0444
39ROOTBIN=	$(ROOT)/usr/ucb
40ROOTLIB=	$(ROOT)/usr/ucblib
41ROOTETC=	$(ROOT)/etc
42ROOTSHLIB=	$(ROOT)/usr/share/lib
43ROOTBIN32=	$(ROOTBIN)/$(MACH32)
44ROOTBIN64=	$(ROOTBIN)/$(MACH64)
45
46ROOTPROG=	$(PROG:%=$(ROOTBIN)/%)
47ROOTLIBPROG=	$(PROG:%=$(ROOTLIB)/%)
48ROOTETCPROG=	$(PROG:%=$(ROOTETC)/%)
49ROOTPROG64=	$(PROG:%=$(ROOTBIN64)/%)
50ROOTPROG32=	$(PROG:%=$(ROOTBIN32)/%)
51
52ISAEXEC=	$(ROOT)/usr/lib/isaexec
53
54# don't lint any of ucbcmd
55SMATCH=off
56
57# storing LDLIBS in two macros allows reordering of options
58LDLIBS.cmd =    $(ENVLDLIBS1)  $(ENVLDLIBS2)  $(ENVLDLIBS3)
59LDLIBS =        $(LDLIBS.cmd)
60
61LDFLAGS.cmd = \
62	$(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \
63	$(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) \
64	$(BDIRECT)
65
66LDFLAGS =       $(LDFLAGS.cmd)
67
68$(ROOTBIN)/%: %
69	$(INS.file)
70
71$(ROOTLIB)/%: %
72	$(INS.file)
73
74$(ROOTETC)/%: %
75	$(INS.file)
76
77$(ROOTBIN64)/%: %
78	$(INS.file)
79
80$(ROOTBIN32)/%: %
81	$(INS.file)
82
83# Define the majority text domain in this directory
84TEXT_DOMAIN= SUNW_OST_UCBCMD
85