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 2009 Sun Microsystems, Inc. All rights reserved. 24*906afcb8SAndy Fiddaman# Use is subject to license terms. 25*906afcb8SAndy Fiddaman# 26*906afcb8SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 27*906afcb8SAndy Fiddaman 28*906afcb8SAndy FiddamanSHELL= /usr/bin/ksh93 29*906afcb8SAndy Fiddaman 30*906afcb8SAndy Fiddamaninclude ../../Makefile.cmd 31*906afcb8SAndy Fiddaman$(SPARC_BLD)include ../../Makefile.cmd.64 32*906afcb8SAndy Fiddaman 33*906afcb8SAndy Fiddaman.KEEP_STATE: 34*906afcb8SAndy Fiddaman 35*906afcb8SAndy Fiddaman# Set common AST build flags (e.g., needed to support the math stuff). 36*906afcb8SAndy Fiddamaninclude ../Makefile.ast 37*906afcb8SAndy Fiddaman 38*906afcb8SAndy FiddamanOBJECTS= shcomp.o 39*906afcb8SAndy Fiddaman 40*906afcb8SAndy FiddamanASTSRC= $(C_AST)/src/cmd/ksh93 41*906afcb8SAndy FiddamanLIBSHELLMACH= $(MACH) 42*906afcb8SAndy FiddamanLIBSHELLBASE= ../libshell 43*906afcb8SAndy FiddamanLIBSHELLSRC= $(ASTSRC)/sh 44*906afcb8SAndy Fiddaman 45*906afcb8SAndy FiddamanSRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c) 46*906afcb8SAndy Fiddaman 47*906afcb8SAndy FiddamanLDLIBS += -lshell -last 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 58*906afcb8SAndy FiddamanCFLAGS += $(ASTCFLAGS) 59*906afcb8SAndy FiddamanCFLAGS64 += $(ASTCFLAGS64) 60*906afcb8SAndy Fiddaman 61*906afcb8SAndy FiddamanCERRWARN += -_gcc=-Wno-parentheses 62*906afcb8SAndy Fiddaman 63*906afcb8SAndy FiddamanROOTCMDDIR=$(ROOT)/usr/bin 64*906afcb8SAndy Fiddaman 65*906afcb8SAndy FiddamanPROG= shcomp 66*906afcb8SAndy Fiddaman 67*906afcb8SAndy Fiddaman%.o: $(LIBSHELLSRC)/%.c 68*906afcb8SAndy Fiddaman $(COMPILE.c) -c -o $@ $< 69*906afcb8SAndy Fiddaman $(POST_PROCESS_O) 70*906afcb8SAndy Fiddaman 71*906afcb8SAndy Fiddamanall: $(PROG) 72*906afcb8SAndy Fiddaman 73*906afcb8SAndy Fiddaman# dummy file since AST/ksh/shcomp doesn't use *.po files 74*906afcb8SAndy Fiddaman# (and "shcomp" is just a frontend which calls directly into libshell, 75*906afcb8SAndy Fiddaman# i.e. there are no l10n strings here) 76*906afcb8SAndy Fiddaman$(PROG).po: 77*906afcb8SAndy Fiddaman $(RM) $(PROG).po ; \ 78*906afcb8SAndy Fiddaman $(TOUCH) $(PROG).po 79*906afcb8SAndy Fiddaman 80*906afcb8SAndy Fiddamaninstall: all $(ROOTCMD) 81*906afcb8SAndy Fiddamaninstall_h _feature: 82*906afcb8SAndy Fiddaman 83*906afcb8SAndy Fiddaman$(PROG): $(OBJECTS) 84*906afcb8SAndy Fiddaman $(RM) shcomp 85*906afcb8SAndy Fiddaman $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) 86*906afcb8SAndy Fiddaman $(POST_PROCESS) 87*906afcb8SAndy Fiddaman 88*906afcb8SAndy Fiddamanclean: 89*906afcb8SAndy Fiddaman $(RM) $(OBJECTS) 90*906afcb8SAndy Fiddaman 91*906afcb8SAndy Fiddamaninclude ../../Makefile.targ 92