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