xref: /illumos-gate/usr/src/tools/ndrgen/Makefile (revision 33efde4275d24731ef87927237b0ffb0630b6b2d)
1d0e51869Samw#
2d0e51869Samw# CDDL HEADER START
3d0e51869Samw#
4d0e51869Samw# The contents of this file are subject to the terms of the
5d0e51869Samw# Common Development and Distribution License (the "License").
6d0e51869Samw# You may not use this file except in compliance with the License.
7d0e51869Samw#
8d0e51869Samw# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9d0e51869Samw# or http://www.opensolaris.org/os/licensing.
10d0e51869Samw# See the License for the specific language governing permissions
11d0e51869Samw# and limitations under the License.
12d0e51869Samw#
13d0e51869Samw# When distributing Covered Code, include this CDDL HEADER in each
14d0e51869Samw# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15d0e51869Samw# If applicable, add the following below this CDDL HEADER, with the
16d0e51869Samw# fields enclosed by brackets "[]" replaced with your own identifying
17d0e51869Samw# information: Portions Copyright [yyyy] [name of copyright owner]
18d0e51869Samw#
19d0e51869Samw# CDDL HEADER END
20d0e51869Samw#
21d0e51869Samw#
2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23d0e51869Samw# Use is subject to license terms.
24d0e51869Samw#
25d0e51869Samw
26d0e51869SamwPROG=	ndrgen ndrgen1
27d0e51869Samw
286cad8c54SRyan ZezeskiMAN1ONBLDFILES=	ndrgen.1onbld
29d0e51869Samw
30d0e51869SamwOBJS=	ndr_main.o ndr_lex.o ndr_anal.o \
31d0e51869Samw	ndr_gen.o ndr_parse.o ndr_print.o
32d0e51869Samw
33d0e51869Samwinclude ../Makefile.tools
34d0e51869Samw
35d0e51869SamwCFLAGS += $(CCVERBOSE)
36d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT)
37*33efde42SToomas Soome
38*33efde42SToomas Soome# because of labels from yacc
39*33efde42SToomas Soomendr_parse.o := CERRWARN += -_gcc=-Wno-unused-label
40d0e51869Samw
41c6ebeca9SAlan WrightCLEANFILES += $(OBJS) y.tab.c y.tab.h
42d0e51869Samw
436cad8c54SRyan Zezeski$(ROOTONBLDMAN1ONBLDFILES) := FILEMODE=      644
44d0e51869Samw
45d0e51869Samw.KEEP_STATE:
46d0e51869Samw
47d0e51869Samw.PARALLEL: $(OBJS)
48d0e51869Samw
496cad8c54SRyan Zezeskiall:	$(PROG) $(MAN1ONBLDFILES)
50d0e51869Samw
516cad8c54SRyan Zezeskiinstall: all .WAIT $(ROOTONBLDMACHPROG) $(ROOTONBLDMAN1ONBLDFILES)
52d0e51869Samw
53d0e51869Samwclean:
54d0e51869Samw	$(RM) $(CLEANFILES)
55d0e51869Samw
56d0e51869Samw$(OBJS): y.tab.h
57d0e51869Samw
58c6ebeca9SAlan Wrighty.tab.c y.tab.h: ndr_parse.y
59d0e51869Samw	$(YACC.y) -d ndr_parse.y
60d0e51869Samw
61c6ebeca9SAlan Wrightndr_parse.o : y.tab.c
62c6ebeca9SAlan Wright	$(COMPILE.c) -o $@ y.tab.c
63c6ebeca9SAlan Wright	$(POST_PROCESS_O)
64c6ebeca9SAlan Wright
65d0e51869Samwndrgen1: $(OBJS)
66d0e51869Samw	$(LINK.c) -o $@ $(OBJS)
67d0e51869Samw	$(POST_PROCESS)
68d0e51869Samw
69d0e51869Samwinclude ../Makefile.targ
70