move 32-bit libs to lib/i386 subdirs & 64-bit libs to lib/
[unleashed.git] / usr / src / cmd / ypcmd / ypupdated / Makefile
blob6d63e875aabafec621187f70441ae5bdb3d8e186
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.
25 # Copyright (c) 2018, Joyent, Inc.
27 NETYPPROG = rpc.ypupdated
28 PROG = $(NETYPPROG)
30 MANIFEST = update.xml
32 include ../../Makefile.cmd
34 ROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
36 #installed directories
37 RPCSVC= $(ROOT)/usr/include/rpcsvc
38 NETSVC = $(ROOTLIB64)/netsvc
39 NETYP = $(NETSVC)/yp
40 ROOTDIRS = $(NETSVC) $(NETYP)
42 # include library definitions
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 += -Wno-implicit-function-declaration
56 CERRWARN += -Wno-unused-variable
58 # not linted
59 SMATCH=off
61 CLOBBERFILES += ypupdated_prot.h
63 #conditional assignments
64 $(INETSVC) := FILEMODE=555
66 #install rules
68 .KEEP_STATE:
70 all: $(PROG)
72 ypupdated_prot.h: ypupdate_prot.x
73 $(RM) ypupdated_prot.h; $(RPCGEN) -C -h ypupdate_prot.x -o ypupdated_prot.h
75 $(RPCYPUPDATEOBJ): ypupdated_prot.h
77 rpc.ypupdated: $(RPCYPUPDATEOBJ)
78 $(LINK.c) -o $@ $(RPCYPUPDATEOBJ) $(LDLIBS)
79 $(POST_PROCESS)
81 install: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTMANIFEST)
83 $(ROOTDIRS):
84 $(INS.dir)
86 $(NETYP)/%: %
87 $(INS.file)
89 clean:
90 $(RM) $(OBJS)
92 check: $(CHKMANIFEST)
94 cstyle:
95 ${CSTYLE} ${SRCS}
97 # include library targets
98 include ../../Makefile.targ