Makefile revision df4628cb18cef0a7960608d573d5a9b6cc9e29d5
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# The contents of this file are subject to the terms of the
0f2dc02ed2763dadc70bec1db8dd407e16db8e49ek# Common Development and Distribution License (the "License").
0f2dc02ed2763dadc70bec1db8dd407e16db8e49ek# You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens# or http://www.opensolaris.org/os/licensing.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens# and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens# fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens# information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# CDDL HEADER END
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
d39ee142a97a7c58f60f7b52c62409f2ff64b234Mark Shellenbaum# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
4445fffbbb1ea25fd0e9ea68b9380dd7a6709025Matthew Ahrens# Use is subject to license terms.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# ident "%Z%%M% %I% %E% SMI"
fa9e4066f08beec538e775443c5be79dd423fcabahrens#
fa9e4066f08beec538e775443c5be79dd423fcabahrens# cmd/genmsg/Makefile
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../Makefile.cmd
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensPROG= genmsg
fa9e4066f08beec538e775443c5be79dd423fcabahrensPSRC_Y= genmsg.y
fa9e4066f08beec538e775443c5be79dd423fcabahrensC_OBJS= main.o util.o
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensLEXARGS=
fa9e4066f08beec538e775443c5be79dd423fcabahrensLEXSRCS= genmsg.l
fa9e4066f08beec538e775443c5be79dd423fcabahrensLEXINTSRCS= lex.yy.c
fa9e4066f08beec538e775443c5be79dd423fcabahrensLEXOBJS= lex.yy.o
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensLDLIBS += -ll
fa9e4066f08beec538e775443c5be79dd423fcabahrensYFLAGS = -d
fa9e4066f08beec538e775443c5be79dd423fcabahrensCPPFLAGS = -I../head $(CPPFLAGS.master)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens# lex and yacc generates lint-unclean C code.
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINTSUPPRESS= \
fa9e4066f08beec538e775443c5be79dd423fcabahrens -erroff=E_FUNC_RET_MAYBE_IGNORED2 \
fa9e4066f08beec538e775443c5be79dd423fcabahrens -erroff=E_EQUALITY_NOT_ASSIGNMENT \
fa9e4066f08beec538e775443c5be79dd423fcabahrens -erroff=E_BLOCK_DECL_UNUSED
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINTFLAGS += -um
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens# genmsg has a name clash with main() and libl.so.1. However, genmsg must
fa9e4066f08beec538e775443c5be79dd423fcabahrens# still export a number of "yy*" (libl) interfaces. Reduce all other symbols
f18faf3f3e5def85fdfff681617d227703ace2adek# to local scope.
f18faf3f3e5def85fdfff681617d227703ace2adekMAPFILES += $(MAPFILE.LEX) $(MAPFILE.NGB)
f18faf3f3e5def85fdfff681617d227703ace2adekMAPOPTS = $(MAPFILES:%=-M%)
f18faf3f3e5def85fdfff681617d227703ace2adek
f18faf3f3e5def85fdfff681617d227703ace2adekLDFLAGS += $(MAPOPTS)
f18faf3f3e5def85fdfff681617d227703ace2adek
f18faf3f3e5def85fdfff681617d227703ace2adekOBJS = $(C_OBJS) $(PSRC_Y:%.y=%.o) $(LEXOBJS)
f18faf3f3e5def85fdfff681617d227703ace2adekPSRC_C = $(PSRC_Y:%.y=%.c)
f18faf3f3e5def85fdfff681617d227703ace2adekSRCS = $(C_OBJS:%.o=%.c) $(PSRC_C) $(LEXINTSRCS)
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck.KEEP_STATE:
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensall: $(PROG)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinstall: all $(ROOTPROG)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(PROG): $(OBJS) $(MAPFILES)
aa59c4cb15a6ac5d4e585dadf7a055b580abf579rsb $(CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(POST_PROCESS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens$(LEXINTSRCS): $(LEXSRCS)
ecd6cf800b63704be73fb264c3f5b6e0dafc068dmarks $(LEX) $(LEXARGS) $(LEXSRCS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
ab04eb8ef60d9dc9614d6cccffc474f24ca1d162timh$(PSRC_C) + y.tab.h: $(PSRC_Y)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(YACC) $(YFLAGS) $(PSRC_Y)
6d1e0b89f3e34478a022854df6b0cfab82ccce66marks $(MV) y.tab.c $(PSRC_C)
6d1e0b89f3e34478a022854df6b0cfab82ccce66marks
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck$(OBJS): y.tab.h lex.yy.c
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bckcatalog: $(POFILE)
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck$(POFILE): $(SRCS)
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck $(RM) $@
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck $(COMPILE.cpp) $(SRCS) > $(POFILE).i
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck $(XGETTEXT) $(XGETFLAGS) $(POFILE).i
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck $(SED) "/^domain/d" messages.po > $@
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck $(RM) $(POFILE).i messages.po
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bck
8bf40bf00a7564d0ccb4a33906734188cb2d1e9bcklint: $(LEXINTSRCS) $(PSRC_C)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(LINT.c) $(C_OBJS:%.o=%.c) $(LDLIBS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(LINT.c) $(LEXINTSRCS) $(PSRC_C) $(LINTSUPPRESS) $(LDLIBS)
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensclean:
fa9e4066f08beec538e775443c5be79dd423fcabahrens $(RM) $(OBJS) $(PSRC_C) $(LEXINTSRCS) y.tab.h *.po
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrensinclude ../Makefile.targ
fa9e4066f08beec538e775443c5be79dd423fcabahrens