xref: /titanic_41/usr/src/cmd/dfs.cmds/sharemgr/Makefile.com (revision 2a9459bdd821c1cf59590a7a9069ac9c591e8a6b)
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# ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27
28include ../../../Makefile.cmd
29
30COMMON = ..
31
32PROG=		sharemgr
33
34SHAREMGR_MOD	= sharemgr
35
36COMMONSRC	= sharemgr_main.c commands.c shareutil.c
37
38SHAREMGR_SRC	= $(COMMONSRC:%=$(COMMON)/%)
39
40SHAREMGR_OBJ	= $(COMMONSRC:%.c=%.o)
41
42ROOTLINKS = $(ROOTUSRSBIN)/share $(ROOTUSRSBIN)/unshare
43
44MYCPPFLAGS = -I../../../../lib/libfsmgt/common -I/usr/include/libxml2 \
45		-I../..
46CPPFLAGS += $(MYCPPFLAGS)
47LDLIBS += -lshare -lscf -lsecdb -lumem
48all install := LDLIBS += -lxml2
49LINTFLAGS	+= -u
50LINTFLAGS64	+= -u
51
52SRCS = $(SHAREMGR_SRC)
53OBJS = $(SHAREMGR_OBJ)
54MODS = $(SHAREMGR_MOD)
55
56CLOBBERFILES = $(MODS)
57
58POFILES = $(SHAREMGR_SRC:.c=.po)
59POFILE  = sharemgr.po
60
61all :=		TARGET= all
62install :=	TARGET= install
63clean :=	TARGET= clean
64clobber :=	TARGET= clobber
65lint :=		TARGET= lint
66_msg:=		TARGET= catalog
67
68.KEEP_STATE:
69
70all: $(MODS)
71
72catalog: $(POFILE)
73
74$(PROG): $(OBJS)
75	$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
76	$(POST_PROCESS)
77
78install: all
79
80$(ROOTLINKS): $(ROOTUSRSBINPROG)
81	$(RM) $@
82	$(LN) $(ROOTUSRSBINPROG) $@
83
84lint:	$(SHAREMGR_MOD).ln $(SHAREMGR_SRC:.c=.ln)
85
86clean:
87	$(RM) $(OBJS)
88
89check:		$(CHKMANIFEST)
90
91%.ln: FRC
92	$(LINT.c) $(SHAREMGR_SRC) $(LDLIBS)
93
94include ../../../Makefile.targ
95
96$(POFILE):      $(POFILES)
97	$(RM) $@; cat $(POFILES) > $@
98
99%.o: $(COMMON)/%.c
100	$(COMPILE.c) -o $@ $<
101
102FRC:
103