add UNLEASHED_OBJ to unleashed.mk
[unleashed/tickless.git] / usr / src / cmd / ypcmd / ypupdated / Makefile
blobebe99d48ef154c777bab8482a8248e3ad96d3125
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
43 # include path to yptol.h (for name of N2L mapping file)
44 CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
46 INETYPPROG= $(NETYPPROG:%=$(NETYP)/%)
48 RPCYPUPDATEOBJ = rpc.ypupdated.o openchild.o
50 OBJS = $(RPCYPUPDATEOBJ)
52 SRCS = $(OBJS:%.o=%.c)
54 CERRWARN += -Wno-implicit-function-declaration
55 CERRWARN += -Wno-unused-variable
57 CLOBBERFILES += ypupdated_prot.h
59 #conditional assignments
60 $(INETSVC) := FILEMODE=555
62 #install rules
64 .KEEP_STATE:
66 all: $(PROG)
68 ypupdated_prot.h: ypupdate_prot.x
69 $(RM) ypupdated_prot.h; $(RPCGEN) -C -h ypupdate_prot.x -o ypupdated_prot.h
71 $(RPCYPUPDATEOBJ): ypupdated_prot.h
73 rpc.ypupdated: $(RPCYPUPDATEOBJ)
74 $(LINK.c) -o $@ $(RPCYPUPDATEOBJ) $(LDLIBS)
75 $(POST_PROCESS)
77 install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTMANIFEST)
79 $(ROOTDIRS):
80 $(INS.dir)
82 $(NETYP)/%: %
83 $(INS.file)
85 clean:
86 $(RM) $(OBJS)
88 check: $(CHKMANIFEST)
90 cstyle:
91 ${CSTYLE} ${SRCS}
93 # include library targets
94 include ../../Makefile.targ