17c2fbfb3SApril Chin# 27c2fbfb3SApril Chin# CDDL HEADER START 37c2fbfb3SApril Chin# 47c2fbfb3SApril Chin# The contents of this file are subject to the terms of the 57c2fbfb3SApril Chin# Common Development and Distribution License (the "License"). 67c2fbfb3SApril Chin# You may not use this file except in compliance with the License. 77c2fbfb3SApril Chin# 87c2fbfb3SApril Chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c2fbfb3SApril Chin# or http://www.opensolaris.org/os/licensing. 107c2fbfb3SApril Chin# See the License for the specific language governing permissions 117c2fbfb3SApril Chin# and limitations under the License. 127c2fbfb3SApril Chin# 137c2fbfb3SApril Chin# When distributing Covered Code, include this CDDL HEADER in each 147c2fbfb3SApril Chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c2fbfb3SApril Chin# If applicable, add the following below this CDDL HEADER, with the 167c2fbfb3SApril Chin# fields enclosed by brackets "[]" replaced with your own identifying 177c2fbfb3SApril Chin# information: Portions Copyright [yyyy] [name of copyright owner] 187c2fbfb3SApril Chin# 197c2fbfb3SApril Chin# CDDL HEADER END 207c2fbfb3SApril Chin# 217c2fbfb3SApril Chin 227c2fbfb3SApril Chin# 2324fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 247c2fbfb3SApril Chin# Use is subject to license terms. 257c2fbfb3SApril Chin# 265661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 27*b30d1939SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 287c2fbfb3SApril Chin 29*b30d1939SAndy FiddamanSHELL= /usr/bin/ksh93 307c2fbfb3SApril Chin 31*b30d1939SAndy Fiddamaninclude ../../Makefile.cmd 32*b30d1939SAndy Fiddaman$(SPARC_BLD)include ../../Makefile.cmd.64 337c2fbfb3SApril Chin 347c2fbfb3SApril Chin.KEEP_STATE: 357c2fbfb3SApril Chin 367c2fbfb3SApril Chin# Set common AST build flags (e.g., needed to support the math stuff). 37*b30d1939SAndy Fiddamaninclude ../Makefile.ast 387c2fbfb3SApril Chin 39*b30d1939SAndy FiddamanOBJECTS= shcomp.o 407c2fbfb3SApril Chin 41*b30d1939SAndy FiddamanASTSRC= $(C_AST)/src/cmd/ksh93 42*b30d1939SAndy FiddamanLIBSHELLMACH= $(MACH) 43*b30d1939SAndy FiddamanLIBSHELLBASE= ../libshell 44*b30d1939SAndy FiddamanLIBSHELLSRC= $(ASTSRC)/sh 457c2fbfb3SApril Chin 467c2fbfb3SApril ChinSRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c) 477c2fbfb3SApril Chin 487c2fbfb3SApril ChinLDLIBS += -lshell -last 497c2fbfb3SApril Chin 50*b30d1939SAndy Fiddaman# We use "=" here since using $(CPPFLAGS.master) is very tricky in our 517c2fbfb3SApril Chin# case - it MUST come as the last element but future changes in -D options 527c2fbfb3SApril Chin# may then cause silent breakage in the AST sources because the last -D 537c2fbfb3SApril Chin# option specified overrides previous -D options so we prefer the current 547c2fbfb3SApril Chin# way to explicitly list each single flag. 55*b30d1939SAndy FiddamanCPPFLAGS= \ 567c2fbfb3SApril Chin $(DTEXTDOM) $(DTS_ERRNO) \ 577c2fbfb3SApril Chin $(LIBSHELLCPPFLAGS) 587c2fbfb3SApril Chin 59*b30d1939SAndy FiddamanCFLAGS += $(ASTCFLAGS) 60*b30d1939SAndy FiddamanCFLAGS64 += $(ASTCFLAGS64) 617c2fbfb3SApril Chin 627014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 637014882cSRichard Lowe 645661bb76SJohn LevonSMOFF += all_func_returns 655661bb76SJohn Levon 667c2fbfb3SApril ChinROOTCMDDIR=$(ROOT)/usr/bin 677c2fbfb3SApril Chin 687c2fbfb3SApril ChinPROG= shcomp 697c2fbfb3SApril Chin 707c2fbfb3SApril Chin%.o: $(LIBSHELLSRC)/%.c 717c2fbfb3SApril Chin $(COMPILE.c) -c -o $@ $< 727c2fbfb3SApril Chin $(POST_PROCESS_O) 737c2fbfb3SApril Chin 747c2fbfb3SApril Chinall: $(PROG) 757c2fbfb3SApril Chin 767c2fbfb3SApril Chin# dummy file since AST/ksh/shcomp doesn't use *.po files 777c2fbfb3SApril Chin# (and "shcomp" is just a frontend which calls directly into libshell, 78*b30d1939SAndy Fiddaman# i.e. there are no l10n strings here) 797c2fbfb3SApril Chin$(PROG).po: 807c2fbfb3SApril Chin $(RM) $(PROG).po ; \ 817c2fbfb3SApril Chin $(TOUCH) $(PROG).po 827c2fbfb3SApril Chin 837c2fbfb3SApril Chininstall: all $(ROOTCMD) 84*b30d1939SAndy Fiddamaninstall_h _feature: 857c2fbfb3SApril Chin 867c2fbfb3SApril Chin$(PROG): $(OBJECTS) 877c2fbfb3SApril Chin $(RM) shcomp 887c2fbfb3SApril Chin $(LINK.c) $(OBJECTS) -o $@ $(LDLIBS) 897c2fbfb3SApril Chin $(POST_PROCESS) 907c2fbfb3SApril Chin 91b6805bf7SGordon Rossclean: 92b6805bf7SGordon Ross $(RM) $(OBJECTS) 93b6805bf7SGordon Ross 94*b30d1939SAndy Fiddamaninclude ../../Makefile.targ 95