xref: /titanic_52/usr/src/cmd/dfs.cmds/sharemgr/Makefile.com (revision a12e05a04a5d5850f645c79e7e2c74f8d6b7c5ec)
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 -lscf -lsecdb -lumem
52all install := LDLIBS += -lxml2
53LINTFLAGS	+= -u
54
55SRCS = $(SHAREMGR_SRC)
56OBJS = $(SHAREMGR_OBJ)
57MODS = $(SHAREMGR_MOD)
58
59CLOBBERFILES = $(MODS)
60
61POFILES = $(SHAREMGR_SRC:.c=.po)
62POFILE  = sharemgr.po
63
64all :=		TARGET= all
65install :=	TARGET= install
66clean :=	TARGET= clean
67clobber :=	TARGET= clobber
68lint :=		TARGET= lint
69_msg:=		TARGET= catalog
70
71.KEEP_STATE:
72
73all: $(MODS)
74
75catalog: $(POFILE)
76
77$(PROG): $(OBJS)
78	$(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
79	$(POST_PROCESS)
80
81install: all $(ROOTUSRSBINPROG) $(ROOTLINKS)
82
83$(ROOTLINKS): $(ROOTUSRSBINPROG)
84	$(RM) $@
85	$(LN) $(ROOTUSRSBINPROG) $@
86
87lint:	$(SHAREMGR_MOD).ln $(SHAREMGR_SRC:.c=.ln)
88
89clean:
90	$(RM) $(OBJS)
91
92check:		$(CHKMANIFEST)
93
94%.ln: FRC
95	$(LINT.c) $(SHAREMGR_SRC) $(LDLIBS)
96
97include ../../../Makefile.targ
98
99$(POFILE):      $(POFILES)
100	$(RM) $@; cat $(POFILES) > $@
101
102%.o: $(COMMON)/%.c
103	$(COMPILE.c) -o $@ $<
104
105FRC:
106