Makefile revision 24da5b34f49324ed742a340010ed5bd3d4e06625
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews#
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews# CDDL HEADER START
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# or http://www.opensolaris.org/os/licensing.
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# See the License for the specific language governing permissions
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# and limitations under the License.
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews#
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews#
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# CDDL HEADER END
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews#
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews#
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews# Use is subject to license terms.
95317501208f3bf5b159e6a40801b7069f68c486Mark Andrews#
73cac2175470e9068829589476dda8bd6d88036fMark Andrews# ident "%Z%%M% %I% %E% SMI"
73cac2175470e9068829589476dda8bd6d88036fMark Andrews#
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
d9b4174233b951f25cd53a2787b9f14314258c2fMark AndrewsNETYPPROG = rpc.yppasswdd # pwconv passmgmt
d9b4174233b951f25cd53a2787b9f14314258c2fMark AndrewsDEFAULTFILES = yppasswdd.dfl
d9b4174233b951f25cd53a2787b9f14314258c2fMark AndrewsPROG = $(NETYPPROG)
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark AndrewsMANIFEST = passwd.xml
b08e3be5dbfba22719ae9c428bd6853ac6f09798Mark Andrews
b08e3be5dbfba22719ae9c428bd6853ac6f09798Mark Andrewsinclude ../../Makefile.cmd
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
01163d188b89911c3a23fe1125a4cab6764a408cMark AndrewsROOTMANIFESTDIR = $(ROOTSVCNETWORKNIS)
01163d188b89911c3a23fe1125a4cab6764a408cMark Andrews
01163d188b89911c3a23fe1125a4cab6764a408cMark Andrews#installed directories
01163d188b89911c3a23fe1125a4cab6764a408cMark AndrewsRPCSVC= $(ROOT)/usr/include/rpcsvc
b08e3be5dbfba22719ae9c428bd6853ac6f09798Mark AndrewsNETSVC = $(ROOTLIB)/netsvc
648ba62b1f156cbca14d54d06c535385f1193d13Mark AndrewsNETYP = $(NETSVC)/yp
d9b4174233b951f25cd53a2787b9f14314258c2fMark AndrewsROOTDIRS = $(NETSVC) $(NETYP)
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews# include library definitions
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews#LDLIBS += -lrpcsvc -lnsl -lcrypt -lintl -lgen
d9b4174233b951f25cd53a2787b9f14314258c2fMark AndrewsLDLIBS += -lnsl -lnisdb -lc
11b07ea523314b123b4e503ce3813443a018c8d3Mark AndrewsMAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
11b07ea523314b123b4e503ce3813443a018c8d3Mark AndrewsLDFLAGS += $(MAPFILES:%=-M%)
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrews
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews# Pick up includes from library
35665db4e49e3e4c0e3776e635449f931f3732cfMark AndrewsCPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
c6313caa6cd9d011ac075048d2b62fd3410162dfMark Andrews
d6dc0d4f584352d2e4305435599ae8c93776d9b4Mark Andrews# This file is now in the $(SRC)/head/rpcsvc directory.
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews#HDRFILE= yppasswd.h
bdfd62f497fe0d5281c25b61271595a4c821a040Mark Andrews#IHDRFILE= $(HDRFILE:%=$(RPCSVC)/%)
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
b08e3be5dbfba22719ae9c428bd6853ac6f09798Mark AndrewsINETYPPROG= $(NETYPPROG:%=$(NETYP)/%)
bdfd62f497fe0d5281c25b61271595a4c821a040Mark Andrews
bdfd62f497fe0d5281c25b61271595a4c821a040Mark AndrewsCOMMONOBJ = yppasswdxdr.o yplckpwdf.o
b08e3be5dbfba22719ae9c428bd6853ac6f09798Mark AndrewsRPCYPPASSWDDOBJ = yppasswdd.o changepasswd.o
b08e3be5dbfba22719ae9c428bd6853ac6f09798Mark Andrews#YPPWCONVOBJ = pwconv.o
b08e3be5dbfba22719ae9c428bd6853ac6f09798Mark Andrews#YPPASSMGMTOBJ = passmgmt.o
bdfd62f497fe0d5281c25b61271595a4c821a040Mark Andrews
bdfd62f497fe0d5281c25b61271595a4c821a040Mark Andrews#
bdfd62f497fe0d5281c25b61271595a4c821a040Mark Andrews# Objects shared between all the major components
bdfd62f497fe0d5281c25b61271595a4c821a040Mark Andrews#
bdfd62f497fe0d5281c25b61271595a4c821a040Mark AndrewsSHAREDOBJ= ../shared/utils.o ../shared/lockmap.o ../shared/ancil.o
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
d6dc0d4f584352d2e4305435599ae8c93776d9b4Mark AndrewsOBJS = $(RPCYPPASSWDDOBJ) \
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews $(COMMONOBJ)
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews # $(YPPWCONVOBJ) $(YPPASSMGMTOBJ)
64cde9d94a2f6c7050f00d9651df6b05e63d09f2Mark Andrews
d9b4174233b951f25cd53a2787b9f14314258c2fMark AndrewsSRCS = $(OBJS:%.o=%.c)
cbb94d52f98b48e8c3a8866dbf8c67860764f349Mark Andrews
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews#conditional assignments
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews$(INETSVC) := GROUP=bin
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews$(INETSVC) := FILEMODE=555
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews$(ETCDFLTFILE) := GROUP=sys
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews$(ETCDFLTFILE) := FILEMODE=0444
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews#install rules
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrews
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrews.KEEP_STATE:
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrews
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrewsall: $(PROG)
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrews
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrewsrpc.yppasswdd: $(RPCYPPASSWDDOBJ) $(COMMONOBJ) $(MAPFILES)
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrews $(LINK.cc) -o $@ $(RPCYPPASSWDDOBJ) \
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews $(SHAREDOBJ) $(COMMONOBJ) $(LDLIBS)
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews $(POST_PROCESS)
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrewsinstall: all $(ROOTDIRS) $(IBINPROG) $(INETYPPROG) $(ROOTETCDEFAULTFILES) \
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews $(ROOTMANIFEST)
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews$(ROOTDIRS):
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews $(INS.dir)
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews$(NETYP)/%: %
11b07ea523314b123b4e503ce3813443a018c8d3Mark Andrews $(INS.file)
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrewsclean:
514f6f14245f42c96f3d5e90462ce2ebe0597d2eMark Andrews $(RM) $(OBJS)
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrewslint: lint_SRCS
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
d6dc0d4f584352d2e4305435599ae8c93776d9b4Mark Andrewscheck: $(CHKMANIFEST)
d6dc0d4f584352d2e4305435599ae8c93776d9b4Mark Andrews
d6dc0d4f584352d2e4305435599ae8c93776d9b4Mark Andrewscstyle:
b08e3be5dbfba22719ae9c428bd6853ac6f09798Mark Andrews ${CSTYLE} ${SRCS}
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews# include library targets
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrewsinclude ../../Makefile.targ
d9b4174233b951f25cd53a2787b9f14314258c2fMark Andrews