xref: /titanic_50/usr/src/cmd/pools/poolcfg/Makefile (revision fb3fb4f3d76d55b64440afd0af72775dfad3bd1d)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright (c) 2001 by Sun Microsystems, Inc.
24# All rights reserved.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/pools/poolbind/Makefile
29
30PROG =		poolcfg
31OBJS =		poolcfg_lex.o poolcfg_grammar.o
32SRCS =		$(OBJS:%.o=%.c) $(COMMON_SRCS)
33POFILES = 	$(OBJS:.o=.po)
34POFILE =	poolcfg.po
35
36include ../../Makefile.cmd
37include ../Makefile.pools
38
39LFLAGS =	-t
40YFLAGS =	-d
41CFLAGS +=	-I$(POOLSCOMMONDIR)
42LDLIBS +=	-lpool -ll
43XGETFLAGS =	-a
44CLOBBERFILES +=	poolcfg_lex.c poolcfg_grammar.c poolcfg_grammar.h
45
46.KEEP_STATE:
47
48all: $(PROG)
49
50$(PROG): $(OBJS) $(COMMON_OBJS)
51	$(LINK.c) -o $@ $(OBJS) $(COMMON_OBJS) $(LDLIBS)
52	$(POST_PROCESS)
53
54%.o : $(POOLSCOMMONDIR)/%.c
55	$(COMPILE.c) -o $@ $<
56	$(POST_PROCESS_O)
57
58install: all $(ROOTUSRSBINPROG)
59
60poolcfg_lex.c: poolcfg.l poolcfg_grammar.h
61	$(LEX) $(LFLAGS) poolcfg.l > $@
62
63poolcfg_grammar.h poolcfg_grammar.c: poolcfg.y
64	$(YACC) $(YFLAGS) poolcfg.y
65	@$(MV) y.tab.h poolcfg_grammar.h
66	@$(MV) y.tab.c poolcfg_grammar.c
67
68poolcfg_lex.o poolcfg_grammar.o := CCVERBOSE =
69
70clean:
71	$(RM) $(OBJS) $(COMMON_OBJS) $(POFILES)
72
73$(POFILE):	$(POFILES)
74	$(RM) $@; cat $(POFILES) > $@
75
76#
77# We don't do lint of lex- and yacc- generated source files
78#
79lint:
80
81include ../../Makefile.targ
82