xref: /titanic_50/usr/src/tools/ndrgen/Makefile (revision c6ebeca9d3d849a7a366f3b23b64d492910498d1)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26PROG=	ndrgen ndrgen1
27
28MAN1FILES=	ndrgen.1
29
30OBJS=	ndr_main.o ndr_lex.o ndr_anal.o \
31	ndr_gen.o ndr_parse.o ndr_print.o
32SRCS=	$(OBJS:%.o=%.c)
33
34include ../Makefile.tools
35
36CFLAGS += $(CCVERBOSE)
37
38CLEANFILES += $(OBJS) y.tab.c y.tab.h
39
40$(ROOTONBLDMAN1FILES) := FILEMODE=      644
41
42.KEEP_STATE:
43
44.PARALLEL: $(OBJS)
45
46all:	$(PROG) $(MAN1FILES)
47
48install: all .WAIT $(ROOTONBLDMACHPROG) $(ROOTONBLDMAN1FILES)
49
50lint:	lint_SRCS
51
52clean:
53	$(RM) $(CLEANFILES)
54
55$(OBJS): y.tab.h
56
57y.tab.c y.tab.h: ndr_parse.y
58	$(YACC.y) -d ndr_parse.y
59
60ndr_parse.o : y.tab.c
61	$(COMPILE.c) -o $@ y.tab.c
62	$(POST_PROCESS_O)
63
64ndrgen1: $(OBJS)
65	$(LINK.c) -o $@ $(OBJS)
66	$(POST_PROCESS)
67
68include ../Makefile.targ
69