xref: /titanic_51/usr/src/cmd/ast/libshell/Makefile.com (revision b4dd7d09880f14016feece03929a224eca1cf39a)
1*b4dd7d09SAndy Fiddaman#
2*b4dd7d09SAndy Fiddaman# CDDL HEADER START
3*b4dd7d09SAndy Fiddaman#
4*b4dd7d09SAndy Fiddaman# The contents of this file are subject to the terms of the
5*b4dd7d09SAndy Fiddaman# Common Development and Distribution License (the "License").
6*b4dd7d09SAndy Fiddaman# You may not use this file except in compliance with the License.
7*b4dd7d09SAndy Fiddaman#
8*b4dd7d09SAndy Fiddaman# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*b4dd7d09SAndy Fiddaman# or http://www.opensolaris.org/os/licensing.
10*b4dd7d09SAndy Fiddaman# See the License for the specific language governing permissions
11*b4dd7d09SAndy Fiddaman# and limitations under the License.
12*b4dd7d09SAndy Fiddaman#
13*b4dd7d09SAndy Fiddaman# When distributing Covered Code, include this CDDL HEADER in each
14*b4dd7d09SAndy Fiddaman# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*b4dd7d09SAndy Fiddaman# If applicable, add the following below this CDDL HEADER, with the
16*b4dd7d09SAndy Fiddaman# fields enclosed by brackets "[]" replaced with your own identifying
17*b4dd7d09SAndy Fiddaman# information: Portions Copyright [yyyy] [name of copyright owner]
18*b4dd7d09SAndy Fiddaman#
19*b4dd7d09SAndy Fiddaman# CDDL HEADER END
20*b4dd7d09SAndy Fiddaman#
21*b4dd7d09SAndy Fiddaman
22*b4dd7d09SAndy Fiddaman#
23*b4dd7d09SAndy Fiddaman# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24*b4dd7d09SAndy Fiddaman# Copyright (c) 2019, Joyent, Inc.
25*b4dd7d09SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
26*b4dd7d09SAndy Fiddaman#
27*b4dd7d09SAndy Fiddaman
28*b4dd7d09SAndy FiddamanSHELL= /usr/bin/ksh93
29*b4dd7d09SAndy Fiddaman
30*b4dd7d09SAndy FiddamanLIBRARY= libshell.a
31*b4dd7d09SAndy FiddamanVERS= .1
32*b4dd7d09SAndy Fiddaman
33*b4dd7d09SAndy Fiddamaninclude ../Makefile.defs
34*b4dd7d09SAndy Fiddaman
35*b4dd7d09SAndy FiddamanOBJECTS += $(LIBOBJS)
36*b4dd7d09SAndy Fiddaman
37*b4dd7d09SAndy Fiddamaninclude $(SRC)/lib/Makefile.lib
38*b4dd7d09SAndy Fiddamaninclude ../../Makefile.ast
39*b4dd7d09SAndy Fiddaman
40*b4dd7d09SAndy FiddamanMAPFILES= ../mapfile-vers
41*b4dd7d09SAndy Fiddaman
42*b4dd7d09SAndy Fiddaman# Specify the MACH we currently use to build and test ksh
43*b4dd7d09SAndy FiddamanLIBSHELLMACH= $(TARGETMACH)
44*b4dd7d09SAndy FiddamanLIBSHELLBASE=..
45*b4dd7d09SAndy Fiddaman
46*b4dd7d09SAndy FiddamanLIBS= $(DYNLIB)
47*b4dd7d09SAndy FiddamanLDLIBS += -lcmd -ldll -last -lsocket -lsecdb -lm -lc
48*b4dd7d09SAndy Fiddaman
49*b4dd7d09SAndy Fiddaman# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
50*b4dd7d09SAndy Fiddaman# case - it MUST come as the last element but future changes in -D options
51*b4dd7d09SAndy Fiddaman# may then cause silent breakage in the AST sources because the last -D
52*b4dd7d09SAndy Fiddaman# option specified overrides previous -D options so we prefer the current
53*b4dd7d09SAndy Fiddaman# way to explicitly list each single flag.
54*b4dd7d09SAndy FiddamanCPPFLAGS= \
55*b4dd7d09SAndy Fiddaman	$(DTEXTDOM) $(DTS_ERRNO) \
56*b4dd7d09SAndy Fiddaman	$(LIBSHELLCPPFLAGS) \
57*b4dd7d09SAndy Fiddaman	-Iast -I.
58*b4dd7d09SAndy Fiddaman
59*b4dd7d09SAndy FiddamanCFLAGS += $(ASTCFLAGS)
60*b4dd7d09SAndy FiddamanCFLAGS64 += $(ASTCFLAGS64)
61*b4dd7d09SAndy Fiddaman
62*b4dd7d09SAndy FiddamanCERRWARN += -_gcc=-Wno-parentheses
63*b4dd7d09SAndy FiddamanCERRWARN += -_gcc=-Wno-unused-value
64*b4dd7d09SAndy FiddamanCERRWARN += -_gcc=-Wno-unused-variable
65*b4dd7d09SAndy FiddamanCERRWARN += -_gcc=-Wno-unused-function
66*b4dd7d09SAndy FiddamanCERRWARN += $(CNOWARN_UNINIT)
67*b4dd7d09SAndy FiddamanCERRWARN += -_gcc=-Wno-clobbered
68*b4dd7d09SAndy FiddamanCERRWARN += -_gcc=-Wno-char-subscripts
69*b4dd7d09SAndy Fiddaman
70*b4dd7d09SAndy Fiddaman# smatch gets out of memory on common/sh/macro.c
71*b4dd7d09SAndy FiddamanSMATCH= off
72*b4dd7d09SAndy Fiddaman
73*b4dd7d09SAndy Fiddamanall: install_h mkpicdirs .WAIT $(LIBS)
74*b4dd7d09SAndy Fiddaman
75*b4dd7d09SAndy Fiddamanmkpicdirs:
76*b4dd7d09SAndy Fiddaman	mkdir -p $(LOBJDIRS:%=pics/%)
77*b4dd7d09SAndy Fiddaman
78*b4dd7d09SAndy Fiddamaninclude $(SRC)/lib/Makefile.targ
79*b4dd7d09SAndy Fiddaman
80*b4dd7d09SAndy Fiddamanpics/%.o: $(ASTSRC)/%.c
81*b4dd7d09SAndy Fiddaman	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
82*b4dd7d09SAndy Fiddaman	$(POST_PROCESS_O)
83*b4dd7d09SAndy Fiddaman
84*b4dd7d09SAndy Fiddaman######################################################################
85*b4dd7d09SAndy Fiddaman# Header file generation
86*b4dd7d09SAndy Fiddaman
87*b4dd7d09SAndy Fiddaman$(HEADERSRC:%=ast/%): FRC
88*b4dd7d09SAndy Fiddaman	$(MKDIR) -p $(@D)
89*b4dd7d09SAndy Fiddaman	$(CP) $(ASTSRC)/include/$(@F) $@
90*b4dd7d09SAndy Fiddaman
91*b4dd7d09SAndy FiddamanCLOBBERFILES += ast/*
92*b4dd7d09SAndy Fiddaman
93*b4dd7d09SAndy Fiddamaninstall_h: $(HEADERSRC:%=ast/%)
94*b4dd7d09SAndy Fiddaman
95*b4dd7d09SAndy Fiddaman_feature: FRC
96*b4dd7d09SAndy Fiddaman	$(MAKE) -f Makefile.iffe generate
97*b4dd7d09SAndy Fiddaman
98*b4dd7d09SAndy Fiddamaninclude ../../Makefile.astmsg
99*b4dd7d09SAndy Fiddaman
100*b4dd7d09SAndy FiddamanFRC:
101