xref: /titanic_51/usr/src/lib/libwanbootutil/Makefile (revision efd4c9b63ad77503c101fc6c2ed8ba96c9d52964)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28include ../Makefile.lib
29
30SUBDIRS	=	$(MACH)
31
32# Library header.
33HDRS =		wanbootutil.h
34HDRDIR =	common
35
36# Headers who get installed into $(ROOT)/usr/include/wanboot
37LOCHDRS =	key_util.h \
38		key_xdr.h \
39		wbio.h
40LOCSRCS =	$(LOCHDRS:%=$(HDRDIR)/%)
41
42# Must define targets for thise headers being installed into
43# a non-default location.
44WBKUHDRDIR =	$(ROOT)/usr/include/wanboot
45WBKUHDRS =	$(LOCHDRS:%=$(WBKUHDRDIR)/%)
46
47# Must override CHECKHDRS so that it does not check the
48# RPC generated header.
49CHECKHDRS =	$(HDRDIR)/key_util.check
50
51# Must rpcgen XDR source.
52RPCFILES =	common/key_xdr.c common/key_xdr.h
53
54POFILE =	libwanbootutil.po
55MSGFILES =	common/key_util.c
56XGETFLAGS =	-a -x libwanbootutil.xcl
57
58all := 		TARGET = all
59clean :=	TARGET = clean
60clobber :=	TARGET = clobber
61install	:=	TARGET = install
62lint :=		TARGET = lint
63
64.KEEP_STATE:
65.PARALLEL:      $(ROOTHDRS)
66
67all clean clobber install: $(RPCFILES) $(SUBDIRS)
68
69lint:		$(SUBDIRS)
70
71install_h:	$(ROOTHDRDIR) $(WBKUHDRDIR) .WAIT $(ROOTHDRS) $(WBKUHDRS)
72
73check:		$(CHECKHDRS)
74
75$(POFILE):	pofile_MSGFILES
76
77_msg:		$(MSGDOMAINPOFILE)
78
79$(SUBDIRS): FRC
80	@cd $@; pwd; $(MAKE) $(TARGET)
81
82FRC:
83
84# No rules for this in Makefile.lib.
85$(WBKUHDRDIR)/%: $(HDRDIR)/%
86	$(INS.file)
87$(WBKUHDRDIR):
88	$(INS.dir)
89
90# No rules for this in Makefile.lib.
91common/key_xdr.c:	common/key_xdr.x
92		cd common; $(RPCGEN) -cC -o key_xdr.c key_xdr.x; cd ..
93
94common/key_xdr.h:	common/key_xdr.x
95		cd common; $(RPCGEN) -h -o key_xdr.h key_xdr.x; cd ..
96
97include $(SRC)/Makefile.msg.targ
98include $(SRC)/lib/Makefile.targ
99
100