17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5a192e900Samaguire# Common Development and Distribution License (the "License"). 6a192e900Samaguire# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gatePROG= sac sacadm pmadm 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateMANIFEST = sac.xml 297c478bd9Sstevel@tonic-gate 30a192e900Samaguireinclude ../Makefile.cmd 31a192e900Samaguire 327c478bd9Sstevel@tonic-gateROOTMANIFESTDIR = $(ROOTSVCSYSTEM) 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gateSACOBJ= sac.o readtab.o global.o log.o misc.o 357c478bd9Sstevel@tonic-gateSACOBJS= $(SACOBJ) util1.o 367c478bd9Sstevel@tonic-gateSACADMOBJ= sacadm.o admutil.o 377c478bd9Sstevel@tonic-gateSACADMOBJS= $(SACADMOBJ) util2.o 387c478bd9Sstevel@tonic-gatePMADMOBJ= pmadm.o admutil.o 397c478bd9Sstevel@tonic-gatePMADMOBJS= $(PMADMOBJ) util2.o 407c478bd9Sstevel@tonic-gateSACSRC= $(SACOBJ:%.o=%.c) 417c478bd9Sstevel@tonic-gateSACSRCS= $(SACSRC) util.c 427c478bd9Sstevel@tonic-gateSACADMSRC= $(SACADMOBJ:%.o=%.c) 437c478bd9Sstevel@tonic-gateSACADMSRCS= $(SACADMSRC) util.c 447c478bd9Sstevel@tonic-gatePMADMSRC= $(PMADMOBJ:%.o=%.c) 457c478bd9Sstevel@tonic-gatePMADMSRCS= $(PMADMSRC) util.c 467c478bd9Sstevel@tonic-gateOBJS= $(SACOBJS) $(SACADMOBJS) $(PMADMOBJS) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gateLIBSAFD = $(ROOTLIB)/saf 497c478bd9Sstevel@tonic-gateDIRS= $(LIBSAFD) 507c478bd9Sstevel@tonic-gateSACF= sac 517c478bd9Sstevel@tonic-gateADMF= sacadm pmadm 527c478bd9Sstevel@tonic-gateROOTSACF= $(SACF:%=$(LIBSAFD)/%) 537c478bd9Sstevel@tonic-gateROOTADMF= $(ADMF:%=$(ROOTUSRSBIN)/%) 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gateLDLIBS += -lnsl 5624da5b34SrieLDFLAGS += $(MAPFILE.NGB:%=-M%) 577c478bd9Sstevel@tonic-gateLINTFLAGS += -b -x 587c478bd9Sstevel@tonic-gate 59*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 60*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 61*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 62*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-extra 63*7014882cSRichard Lowe 647c478bd9Sstevel@tonic-gateutil1.o := CPPFLAGS += -DSAC 657c478bd9Sstevel@tonic-gateutil2.o := CPPFLAGS += -USAC 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gatesac := LDLIBS += -lpam 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/sacadm := FILEMODE = 04755 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate$(LIBSAFD)/% : % 727c478bd9Sstevel@tonic-gate $(INS.file) 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate.KEEP_STATE: 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS) 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gateall: $(PROG) 797c478bd9Sstevel@tonic-gate 8024da5b34Sriesac: $(SACOBJS) $(MAPFILE.NGB) 817c478bd9Sstevel@tonic-gate $(LINK.c) $(SACOBJS) -o $@ $(LDLIBS) 827c478bd9Sstevel@tonic-gate $(POST_PROCESS) 837c478bd9Sstevel@tonic-gate 8424da5b34Sriesacadm: $(SACADMOBJS) $(MAPFILE.NGB) 857c478bd9Sstevel@tonic-gate $(LINK.c) $(SACADMOBJS) -o $@ $(LDLIBS) 867c478bd9Sstevel@tonic-gate $(POST_PROCESS) 877c478bd9Sstevel@tonic-gate 8824da5b34Sriepmadm: $(PMADMOBJS) $(MAPFILE.NGB) 897c478bd9Sstevel@tonic-gate $(LINK.c) $(PMADMOBJS) -o $@ $(LDLIBS) 907c478bd9Sstevel@tonic-gate $(POST_PROCESS) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gateutil1.o: util.c 937c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ util.c 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gateutil2.o: util.c 967c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ util.c 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gateinstall: all .WAIT $(ROOTSACF) $(ROOTADMF) $(ROOTMANIFEST) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate# Don't install dirs already installed by Targetdirs 1017c478bd9Sstevel@tonic-gate#$(DIRS): 1027c478bd9Sstevel@tonic-gate# $(INS.dir) 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gatecheck: $(CHKMANIFEST) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gateclean: 1077c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gatelint: 1107c478bd9Sstevel@tonic-gate $(LINT.c) $(SACSRCS) 1117c478bd9Sstevel@tonic-gate $(LINT.c) $(SACADMSRCS) 1127c478bd9Sstevel@tonic-gate $(LINT.c) $(PMADMSRCS) 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 115