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