Makefile revision 7852:1548713d535c
1179335Syongari#
2179335Syongari# CDDL HEADER START
3179335Syongari#
4179335Syongari# The contents of this file are subject to the terms of the
5179335Syongari# Common Development and Distribution License (the "License").
6179335Syongari# You may not use this file except in compliance with the License.
7179335Syongari#
8179335Syongari# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9179335Syongari# or http://www.opensolaris.org/os/licensing.
10179335Syongari# See the License for the specific language governing permissions
11179335Syongari# and limitations under the License.
12179335Syongari#
13179335Syongari# When distributing Covered Code, include this CDDL HEADER in each
14179335Syongari# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15179335Syongari# If applicable, add the following below this CDDL HEADER, with the
16179335Syongari# fields enclosed by brackets "[]" replaced with your own identifying
17179335Syongari# information: Portions Copyright [yyyy] [name of copyright owner]
18179335Syongari#
19179335Syongari# CDDL HEADER END
20179335Syongari#
21179335Syongari
22179335Syongari#
23179335Syongari# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24179335Syongari# Use is subject to license terms.
25179335Syongari#
26179335Syongari
27179335SyongariPROG =	sbdadm
28179335Syongari
29179335Syongariinclude ../Makefile.cmd
30179335Syongari
31179335SyongariCOMMONBASE = ../../common
32179335SyongariUTSBASE = ../../uts
33179335Syongari
34179335SyongariLOCAL_OBJS = sbdadm.o
35179335SyongariCOMMON_OBJS = cmdparse.o
36179335SyongariLOCAL_SRCS =	$(LOCAL_OBJS:%.o=%.c)
37179335SyongariCOMMON_SRCS =	$(COMMON_OBJS:%.o=$(COMMONBASE)/cmdparse/%.c)
38179335SyongariOBJS =	$(LOCAL_OBJS) $(COMMON_OBJS)
39179335SyongariSRCS = $(LOCAL_SRCS) $(COMMON_SRCS)
40179335SyongariPOFILE = sbdadm_all.po
41179335SyongariPOFILES = $(LOCAL_OBJS:%.o=%.po)
42179335Syongari 
43179335SyongariCPPFLAGS += -I. -I$(COMMONBASE)/cmdparse
44179335SyongariLDLIBS += -lstmf -lnvpair
45179335SyongariLINTFLAGS += -xerroff=E_BAD_PTR_CAST_ALIGN
46179335Syongari
47179335Syongari.KEEP_STATE:
48179335Syongari
49179335Syongariall: $(PROG)
50179335Syongari
51179335Syongari$(PROG): $(OBJS)
52179335Syongari	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
53215298Smarius	$(POST_PROCESS)
54215298Smarius
55179335Syongariinstall: all $(ROOTUSRSBINPROG)
56179335Syongari
57215298Smariuscheck:	$(SRCS) $(CHKMANIFEST)
58179335Syongari	$(CSTYLE) -pPc $(SRCS:%=%)
59179335Syongari
60179335Syongari$(POFILE): $(POFILES)
61179335Syongari	$(RM) $@
62179335Syongari	$(CAT) $(POFILES) > $@
63179335Syongari
64179335Syongaricmdparse.o: $(COMMONBASE)/cmdparse/cmdparse.c
65227908Smarius	    $(COMPILE.c) -o $@ $(COMMONBASE)/cmdparse/cmdparse.c
66179335Syongari	    $(POST_PROCESS_O)
67179335Syongari
68179335Syongariclean:
69179335Syongari	$(RM) $(OBJS) $(POFILES) $(POFILE)
70179335Syongari
71179335Syongarilint:	lint_SRCS
72221407Smarius
73179335Syongariinclude ../Makefile.targ
74179335Syongari