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# 255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gatePROG= sac sacadm pmadm 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateMANIFEST = sac.xml 307c478bd9Sstevel@tonic-gate 31a192e900Samaguireinclude ../Makefile.cmd 32a192e900Samaguire 337c478bd9Sstevel@tonic-gateROOTMANIFESTDIR = $(ROOTSVCSYSTEM) 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gateSACOBJ= sac.o readtab.o global.o log.o misc.o 367c478bd9Sstevel@tonic-gateSACOBJS= $(SACOBJ) util1.o 377c478bd9Sstevel@tonic-gateSACADMOBJ= sacadm.o admutil.o 387c478bd9Sstevel@tonic-gateSACADMOBJS= $(SACADMOBJ) util2.o 397c478bd9Sstevel@tonic-gatePMADMOBJ= pmadm.o admutil.o 407c478bd9Sstevel@tonic-gatePMADMOBJS= $(PMADMOBJ) util2.o 417c478bd9Sstevel@tonic-gateSACSRC= $(SACOBJ:%.o=%.c) 427c478bd9Sstevel@tonic-gateSACSRCS= $(SACSRC) util.c 437c478bd9Sstevel@tonic-gateSACADMSRC= $(SACADMOBJ:%.o=%.c) 447c478bd9Sstevel@tonic-gateSACADMSRCS= $(SACADMSRC) util.c 457c478bd9Sstevel@tonic-gatePMADMSRC= $(PMADMOBJ:%.o=%.c) 467c478bd9Sstevel@tonic-gatePMADMSRCS= $(PMADMSRC) util.c 477c478bd9Sstevel@tonic-gateOBJS= $(SACOBJS) $(SACADMOBJS) $(PMADMOBJS) 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gateLIBSAFD = $(ROOTLIB)/saf 507c478bd9Sstevel@tonic-gateDIRS= $(LIBSAFD) 517c478bd9Sstevel@tonic-gateSACF= sac 527c478bd9Sstevel@tonic-gateADMF= sacadm pmadm 537c478bd9Sstevel@tonic-gateROOTSACF= $(SACF:%=$(LIBSAFD)/%) 547c478bd9Sstevel@tonic-gateROOTADMF= $(ADMF:%=$(ROOTUSRSBIN)/%) 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gateLDLIBS += -lnsl 57*85f4cb87SRichard LoweLDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%) 587c478bd9Sstevel@tonic-gate 597014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 607014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 617014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 627014882cSRichard LoweCERRWARN += -_gcc=-Wno-extra 637014882cSRichard Lowe 645661bb76SJohn Levon# too many untyped funcs 655661bb76SJohn LevonSMATCH=off 665661bb76SJohn Levon 677c478bd9Sstevel@tonic-gateutil1.o := CPPFLAGS += -DSAC 687c478bd9Sstevel@tonic-gateutil2.o := CPPFLAGS += -USAC 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gatesac := LDLIBS += -lpam 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/sacadm := FILEMODE = 04755 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate$(LIBSAFD)/% : % 757c478bd9Sstevel@tonic-gate $(INS.file) 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate.KEEP_STATE: 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS) 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gateall: $(PROG) 827c478bd9Sstevel@tonic-gate 8324da5b34Sriesac: $(SACOBJS) $(MAPFILE.NGB) 847c478bd9Sstevel@tonic-gate $(LINK.c) $(SACOBJS) -o $@ $(LDLIBS) 857c478bd9Sstevel@tonic-gate $(POST_PROCESS) 867c478bd9Sstevel@tonic-gate 8724da5b34Sriesacadm: $(SACADMOBJS) $(MAPFILE.NGB) 887c478bd9Sstevel@tonic-gate $(LINK.c) $(SACADMOBJS) -o $@ $(LDLIBS) 897c478bd9Sstevel@tonic-gate $(POST_PROCESS) 907c478bd9Sstevel@tonic-gate 9124da5b34Sriepmadm: $(PMADMOBJS) $(MAPFILE.NGB) 927c478bd9Sstevel@tonic-gate $(LINK.c) $(PMADMOBJS) -o $@ $(LDLIBS) 937c478bd9Sstevel@tonic-gate $(POST_PROCESS) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gateutil1.o: util.c 967c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ util.c 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gateutil2.o: util.c 997c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ util.c 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateinstall: all .WAIT $(ROOTSACF) $(ROOTADMF) $(ROOTMANIFEST) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate# Don't install dirs already installed by Targetdirs 1047c478bd9Sstevel@tonic-gate#$(DIRS): 1057c478bd9Sstevel@tonic-gate# $(INS.dir) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gatecheck: $(CHKMANIFEST) 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gateclean: 1107c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 113