xref: /titanic_52/usr/src/cmd/pools/poolcfg/Makefile (revision df4628cb18cef0a7960608d573d5a9b6cc9e29d5)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
524da5b34Srie# Common Development and Distribution License (the "License").
624da5b34Srie# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
2224da5b34Srie# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2324da5b34Srie# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate# cmd/pools/poolbind/Makefile
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gatePROG =		poolcfg
307c478bd9Sstevel@tonic-gateOBJS =		poolcfg_lex.o poolcfg_grammar.o
317c478bd9Sstevel@tonic-gateSRCS =		$(OBJS:%.o=%.c) $(COMMON_SRCS)
327c478bd9Sstevel@tonic-gatePOFILES = 	$(OBJS:.o=.po)
337c478bd9Sstevel@tonic-gatePOFILE =	poolcfg.po
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
367c478bd9Sstevel@tonic-gateinclude ../Makefile.pools
377c478bd9Sstevel@tonic-gate
38*df4628cbSrie# poolcf has a name clash with main() and libl.so.1.  However, poolcfg must
39*df4628cbSrie# still export a number of "yy*" (libl) interfaces.  Reduce all other symbols
40*df4628cbSrie# to local scope.
41*df4628cbSrieMAPFILES +=	$(MAPFILE.LEX) $(MAPFILE.NGB)
42*df4628cbSrieMAPOPTS =	$(MAPFILES:%=-M%)
43*df4628cbSrie
447c478bd9Sstevel@tonic-gateLFLAGS =	-t
457c478bd9Sstevel@tonic-gateYFLAGS =	-d
467c478bd9Sstevel@tonic-gateCFLAGS +=	-I$(POOLSCOMMONDIR)
47*df4628cbSrieLDFLAGS +=	$(MAPOPTS)
487c478bd9Sstevel@tonic-gateLDLIBS +=	-lpool -ll
497c478bd9Sstevel@tonic-gateXGETFLAGS =	-a
507c478bd9Sstevel@tonic-gateCLOBBERFILES +=	poolcfg_lex.c poolcfg_grammar.c poolcfg_grammar.h
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gate.KEEP_STATE:
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gateall: $(PROG)
557c478bd9Sstevel@tonic-gate
56*df4628cbSrie$(PROG): $(OBJS) $(COMMON_OBJS) $(MAPFILES)
577c478bd9Sstevel@tonic-gate	$(LINK.c) -o $@ $(OBJS) $(COMMON_OBJS) $(LDLIBS)
587c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gate%.o : $(POOLSCOMMONDIR)/%.c
617c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
627c478bd9Sstevel@tonic-gate	$(POST_PROCESS_O)
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gateinstall: all $(ROOTUSRSBINPROG)
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gatepoolcfg_lex.c: poolcfg.l poolcfg_grammar.h
677c478bd9Sstevel@tonic-gate	$(LEX) $(LFLAGS) poolcfg.l > $@
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gatepoolcfg_grammar.h poolcfg_grammar.c: poolcfg.y
707c478bd9Sstevel@tonic-gate	$(YACC) $(YFLAGS) poolcfg.y
717c478bd9Sstevel@tonic-gate	@$(MV) y.tab.h poolcfg_grammar.h
727c478bd9Sstevel@tonic-gate	@$(MV) y.tab.c poolcfg_grammar.c
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gatepoolcfg_lex.o poolcfg_grammar.o := CCVERBOSE =
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gateclean:
777c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) $(COMMON_OBJS) $(POFILES)
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate$(POFILE):	$(POFILES)
807c478bd9Sstevel@tonic-gate	$(RM) $@; cat $(POFILES) > $@
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gate#
837c478bd9Sstevel@tonic-gate# We don't do lint of lex- and yacc- generated source files
847c478bd9Sstevel@tonic-gate#
857c478bd9Sstevel@tonic-gatelint:
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
88