4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 include ..
/Makefile.cmd
37 CERRWARN
+= -_gcc
=-Wno-unused-label
38 CERRWARN
+= -_gcc
=-Wno-parentheses
39 CERRWARN
+= -_gcc
=-Wno-unused-variable
43 CPPFLAGS
= -I..
/head
$(CPPFLAGS.master
)
45 # lex and yacc generates lint-unclean C code.
47 -erroff
=E_FUNC_RET_MAYBE_IGNORED2 \
48 -erroff
=E_EQUALITY_NOT_ASSIGNMENT \
49 -erroff
=E_BLOCK_DECL_UNUSED
53 # genmsg has a name clash with main() and libl.so.1. However, genmsg must
54 # still export a number of "yy*" (libl) interfaces. Reduce all other symbols
56 MAPFILES
+= $(MAPFILE.LEX
) $(MAPFILE.NGB
)
57 MAPOPTS
= $(MAPFILES
:%=-M
%)
61 OBJS
= $(C_OBJS
) $(PSRC_Y
:%.y
=%.o
) $(LEXOBJS
)
62 PSRC_C
= $(PSRC_Y
:%.y
=%.c
)
63 SRCS
= $(C_OBJS
:%.o
=%.c
) $(PSRC_C
) $(LEXINTSRCS
)
69 install: all $(ROOTPROG
)
71 $(PROG
): $(OBJS
) $(MAPFILES
)
72 $(CC
) -o
$@
$(OBJS
) $(LDFLAGS
) $(LDLIBS
)
75 $(LEXINTSRCS
): $(LEXSRCS
)
76 $(LEX
) $(LEXARGS
) $(LEXSRCS
)
78 $(PSRC_C
) + y.tab.h
: $(PSRC_Y
)
79 $(YACC
) $(YFLAGS
) $(PSRC_Y
)
80 $(MV
) y.tab.c
$(PSRC_C
)
82 $(OBJS
): y.tab.h
lex.yy.c
88 $(COMPILE.
cpp) $(SRCS
) > $(POFILE
).i
89 $(XGETTEXT
) $(XGETFLAGS
) $(POFILE
).i
90 $(SED
) "/^domain/d" messages.po
> $@
91 $(RM
) $(POFILE
).i messages.po
93 lint
: $(LEXINTSRCS
) $(PSRC_C
)
94 $(LINT.c
) $(C_OBJS
:%.o
=%.c
) $(LDLIBS
)
95 $(LINT.c
) $(LEXINTSRCS
) $(PSRC_C
) $(LINTSUPPRESS
) $(LDLIBS
)
98 $(RM
) $(OBJS
) $(PSRC_C
) $(LEXINTSRCS
) y.tab.h
*.po
100 include ..
/Makefile.targ