xref: /titanic_50/usr/src/cmd/shcomp/Makefile (revision b6805bf78d2bbbeeaea8909a05623587b42d58b3)
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#
267c2fbfb3SApril Chin
277c2fbfb3SApril ChinSHELL=/usr/bin/ksh93
287c2fbfb3SApril Chin
297c2fbfb3SApril Chininclude ../Makefile.cmd
3034f9b3eeSRoland Mainz$(SPARC_BLD)include ../Makefile.cmd.64
317c2fbfb3SApril Chin
327c2fbfb3SApril Chin.KEEP_STATE:
337c2fbfb3SApril Chin
347c2fbfb3SApril Chin# Set common AST build flags (e.g., needed to support the math stuff).
357c2fbfb3SApril Chininclude ../../Makefile.ast
367c2fbfb3SApril Chin
377c2fbfb3SApril ChinOBJECTS= \
387c2fbfb3SApril Chin        shcomp.o
397c2fbfb3SApril Chin
407c2fbfb3SApril ChinLIBSHELLMACH=$(MACH)
417c2fbfb3SApril ChinLIBSHELLBASE=../../lib/libshell
427c2fbfb3SApril ChinLIBSHELLSRC=$(LIBSHELLBASE)/common/sh
437c2fbfb3SApril Chin
447c2fbfb3SApril ChinSRCS=	$(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
457c2fbfb3SApril Chin
467c2fbfb3SApril ChinLDLIBS += -lshell -last
477c2fbfb3SApril Chin
487c2fbfb3SApril Chin# 1. Make sure that the -D/-U defines in CFLAGS below are in sync
497c2fbfb3SApril Chin# with usr/src/lib/libshell/Makefile.com
507c2fbfb3SApril Chin# 2. 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.
557c2fbfb3SApril ChinCPPFLAGS = \
567c2fbfb3SApril Chin	$(DTEXTDOM) $(DTS_ERRNO) \
577c2fbfb3SApril Chin	$(LIBSHELLCPPFLAGS)
587c2fbfb3SApril Chin
597c2fbfb3SApril ChinCFLAGS += \
607c2fbfb3SApril Chin	$(ASTCFLAGS)
617c2fbfb3SApril ChinCFLAGS64 += \
627c2fbfb3SApril Chin	$(ASTCFLAGS64)
637c2fbfb3SApril Chin
647014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
657014882cSRichard Lowe
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,
787c2fbfb3SApril Chin# e.g. there are no l10n strings here)
797c2fbfb3SApril Chin$(PROG).po:
807c2fbfb3SApril Chin	$(RM) $(PROG).po ; \
817c2fbfb3SApril Chin	$(TOUCH) $(PROG).po
827c2fbfb3SApril Chin
837c2fbfb3SApril Chin
847c2fbfb3SApril Chininstall: all $(ROOTCMD)
857c2fbfb3SApril Chin
867c2fbfb3SApril Chin$(PROG):	$(OBJECTS)
877c2fbfb3SApril Chin	$(RM) shcomp
887c2fbfb3SApril Chin	$(LINK.c) $(OBJECTS) -o $@ $(LDLIBS)
897c2fbfb3SApril Chin	$(POST_PROCESS)
907c2fbfb3SApril Chin
91*b6805bf7SGordon Rossclean:
92*b6805bf7SGordon Ross	$(RM) $(OBJECTS)
93*b6805bf7SGordon Ross
94*b6805bf7SGordon Rosslint:
957c2fbfb3SApril Chin
967c2fbfb3SApril Chininclude ../Makefile.targ
97