xref: /titanic_51/usr/src/cmd/ast/msgcc/Makefile (revision b4dd7d09880f14016feece03929a224eca1cf39a)
1da2e3ebdSchin#
2da2e3ebdSchin# CDDL HEADER START
3da2e3ebdSchin#
4da2e3ebdSchin# The contents of this file are subject to the terms of the
5da2e3ebdSchin# Common Development and Distribution License (the "License").
6da2e3ebdSchin# You may not use this file except in compliance with the License.
7da2e3ebdSchin#
8da2e3ebdSchin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da2e3ebdSchin# or http://www.opensolaris.org/os/licensing.
10da2e3ebdSchin# See the License for the specific language governing permissions
11da2e3ebdSchin# and limitations under the License.
12da2e3ebdSchin#
13da2e3ebdSchin# When distributing Covered Code, include this CDDL HEADER in each
14da2e3ebdSchin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da2e3ebdSchin# If applicable, add the following below this CDDL HEADER, with the
16da2e3ebdSchin# fields enclosed by brackets "[]" replaced with your own identifying
17da2e3ebdSchin# information: Portions Copyright [yyyy] [name of copyright owner]
18da2e3ebdSchin#
19da2e3ebdSchin# CDDL HEADER END
20da2e3ebdSchin#
21da2e3ebdSchin#
2234f9b3eeSRoland Mainz# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23da2e3ebdSchin# Use is subject to license terms.
24da2e3ebdSchin#
25*b4dd7d09SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
26da2e3ebdSchin
277c2fbfb3SApril ChinSHELL= /usr/bin/ksh93
28da2e3ebdSchin
29da2e3ebdSchininclude ../../Makefile.cmd
30da2e3ebdSchin
31da2e3ebdSchin.KEEP_STATE:
32da2e3ebdSchin
33da2e3ebdSchin# Set common AST build flags (e.g., needed to support the math stuff).
34*b4dd7d09SAndy Fiddamaninclude ../Makefile.ast
35*b4dd7d09SAndy Fiddaman
36*b4dd7d09SAndy FiddamanASTSRC= $(C_AST)/src/cmd/msgcc
37da2e3ebdSchin
38da2e3ebdSchin# build rules
39da2e3ebdSchinCPPFLAGS= \
40da2e3ebdSchin        $(DTEXTDOM) $(DTS_ERRNO) \
41da2e3ebdSchin        -I$(ROOT)/usr/include/ast \
4234f9b3eeSRoland Mainz	-I$(ROOT)/usr/include \
43da2e3ebdSchin	-D_PACKAGE_ast \
44da2e3ebdSchin	'-DUSAGE_LICENSE=\
45da2e3ebdSchin	    "[-author?Glenn Fowler <gsf@research.att.com>]"\
46*b4dd7d09SAndy Fiddaman	    "[-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property]"\
47*b4dd7d09SAndy Fiddaman	    "[-license?http://www.eclipse.org/org/documents/epl-v10.html]" \
48da2e3ebdSchin	    "[--catalog?msgcc]"'
49da2e3ebdSchin
50*b4dd7d09SAndy FiddamanCFLAGS += $(ASTCFLAGS)
51da2e3ebdSchin
527014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
537014882cSRichard LoweCERRWARN += -_gcc=-Wno-empty-body
547014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized
557014882cSRichard Lowe
56da2e3ebdSchinLDLIBS += -last
57da2e3ebdSchinmsgcpp   := LDLIBS += -lpp
58da2e3ebdSchin
59*b4dd7d09SAndy FiddamanCPROG= msgcvt msggen msgget msgcpp
60*b4dd7d09SAndy FiddamanPROG= msgcc $(CPROG)
61*b4dd7d09SAndy Fiddaman
62*b4dd7d09SAndy Fiddamanall: $(PROG)
63*b4dd7d09SAndy Fiddaman
647c2fbfb3SApril Chin# This target should use "shcomp" in the future
65*b4dd7d09SAndy Fiddamanmsgcc:	$(ASTSRC)/msgcc.sh
66da2e3ebdSchin	rm -f msgcc ; \
677c2fbfb3SApril Chin	{ \
68da2e3ebdSchin		print "#!/usr/bin/ksh93" ; \
69da2e3ebdSchin		print "export PATH=/usr/ast/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:\$${PATH}" ; \
70da2e3ebdSchin		print "builtin date" ; \
71*b4dd7d09SAndy Fiddaman		cat "$(ASTSRC)/msgcc.sh" ; \
727c2fbfb3SApril Chin	} >msgcc ; \
73da2e3ebdSchin	chmod a+rx msgcc
74da2e3ebdSchin
75da2e3ebdSchinROOTCMDDIR=$(ROOT)/usr/ast/bin
76da2e3ebdSchin
77da2e3ebdSchininstall: all $(ROOTCMD)
78*b4dd7d09SAndy Fiddamancheck clean install_h _feature:
79da2e3ebdSchin
80da2e3ebdSchininclude ../../Makefile.targ
81*b4dd7d09SAndy FiddamanPOFILE= msgcpp.po
82*b4dd7d09SAndy Fiddaman
83*b4dd7d09SAndy Fiddaman# Create dummy file since AST/ksh/msgcc doesn't use *.po files
84*b4dd7d09SAndy Fiddamanmsgcpp.po:
85*b4dd7d09SAndy Fiddaman	$(RM) $@
86*b4dd7d09SAndy Fiddaman	$(TOUCH) $(@)
87*b4dd7d09SAndy Fiddaman
88*b4dd7d09SAndy Fiddaman$(CPROG):
89*b4dd7d09SAndy Fiddaman	$(LINK.c) -o $@ $(ASTSRC)/$@.c $(LDLIBS)
90*b4dd7d09SAndy Fiddaman	$(POST_PROCESS)
91*b4dd7d09SAndy Fiddaman
92*b4dd7d09SAndy FiddamanFRC:
93*b4dd7d09SAndy Fiddaman.PARALLEL: $(PROG)
94