8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / cmd / ypcmd / ypupdated / Makefile
blobea5a7483ad75be45147e5eeeedf4860571d719cd
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 NETYPPROG = rpc.ypupdated
27 PROG = $(NETYPPROG)
29 MANIFEST = update.xml
31 include ../../Makefile.cmd
33 ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
35 #installed directories
36 RPCSVC= $(ROOT)/usr/include/rpcsvc
37 NETSVC = $(ROOTLIB)/netsvc
38 NETYP = $(NETSVC)/yp
39 ROOTDIRS = $(NETSVC) $(NETYP)
41 # include library definitions
42 LDLIBS += -lnsl
44 # include path to yptol.h (for name of N2L mapping file)
45 CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
47 INETYPPROG= $(NETYPPROG:%=$(NETYP)/%)
49 RPCYPUPDATEOBJ = rpc.ypupdated.o openchild.o
51 OBJS = $(RPCYPUPDATEOBJ)
53 SRCS = $(OBJS:%.o=%.c)
55 CERRWARN += -_gcc=-Wno-implicit-function-declaration
56 CERRWARN += -_gcc=-Wno-unused-variable
58 CLOBBERFILES += ypupdated_prot.h
60 #conditional assignments
61 $(INETSVC) := FILEMODE=555
63 #install rules
65 .KEEP_STATE:
67 all: $(PROG)
69 ypupdated_prot.h: ypupdate_prot.x
70 $(RM) ypupdated_prot.h; $(RPCGEN) -C -h ypupdate_prot.x -o ypupdated_prot.h
72 $(RPCYPUPDATEOBJ): ypupdated_prot.h
74 rpc.ypupdated: $(RPCYPUPDATEOBJ)
75 $(LINK.c) -o $@ $(RPCYPUPDATEOBJ) $(LDLIBS)
76 $(POST_PROCESS)
78 install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTMANIFEST)
80 $(ROOTDIRS):
81 $(INS.dir)
83 $(NETYP)/%: %
84 $(INS.file)
86 clean:
87 $(RM) $(OBJS)
89 lint:
90 ${LINT.c} ${SRCS}
92 check: $(CHKMANIFEST)
94 cstyle:
95 ${CSTYLE} ${SRCS}
97 # include library targets
98 include ../../Makefile.targ