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 5*45916cd2Sjpk# Common Development and Distribution License (the "License"). 6*45916cd2Sjpk# 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 20*45916cd2Sjpk 21*45916cd2Sjpk 227c478bd9Sstevel@tonic-gate# 237c478bd9Sstevel@tonic-gate# 247c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 257c478bd9Sstevel@tonic-gate# 26*45916cd2Sjpk# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 277c478bd9Sstevel@tonic-gate# Use is subject to license terms. 287c478bd9Sstevel@tonic-gate# 297c478bd9Sstevel@tonic-gate# cmd/lp/cmd/Makefile 307c478bd9Sstevel@tonic-gate# 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gateinclude ../Makefile.lp 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gateOWNER = root 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gateSUBDIRS = lpc lptest lpadmin lpsched lpstat adaptor scripts 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gateLOCALPROG1 = lp lpsystem lpmove lpshut 397c478bd9Sstevel@tonic-gateLOCALPROG2 = accept 407c478bd9Sstevel@tonic-gateLOCALPROG = $(LOCALPROG1) $(LOCALPROG2) 417c478bd9Sstevel@tonic-gateLOCALLINKS = disable enable reject 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gateSBINPROG = lpfilter lpforms lpusers 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gateLIBLINKS = $(SBINPROG) 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gatePROG = $(LOCALPROG) $(SBINPROG) 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gateCOMMONOBJ= comb.o 507c478bd9Sstevel@tonic-gateOTHEROBJS= cancel.o lp.o $(SBINPROG:=.o) 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gateOBJS= $(COMMONOBJ) $(OTHEROBJS) 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gateSRCS= $(OBJS:.o=.c) 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gatePOFILE= lp_cmd.po 577c478bd9Sstevel@tonic-gatePOFILES= $(SRCS:%.c=%.po) lpsystem.po lpmove.po lpschedlpshut.po 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gateROOTLIBLPLOCLPROG= $(LOCALPROG:%=$(ROOTLIBLPLOCL)/%) 607c478bd9Sstevel@tonic-gateROOTSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%) 617c478bd9Sstevel@tonic-gateROOTSYMLINKS= $(LIBLINKS:%=$(ROOTLIB)/%) 627c478bd9Sstevel@tonic-gateROOTSYMLINKS2= $(LOCALLINKS:%=$(ROOTLIBLPLOCL)/%) 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gateCPPFLAGS = -I$(LPINC) $(CPPFLAGS.master) 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate# conditional assignments 687c478bd9Sstevel@tonic-gate# 697c478bd9Sstevel@tonic-gateaccept:= LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) 707c478bd9Sstevel@tonic-gatecancel:= LDLIBS += $(LIBREQ) $(LIBMSG) $(LIBOAM) $(LIBLP) 717c478bd9Sstevel@tonic-gatelp:= LDLIBS += $(LIBPRT) $(LIBREQ) $(LIBMSG) $(LIBOAM) $(LIBLP) 727c478bd9Sstevel@tonic-gatelpfilter:= LDLIBS += $(LIBFLT) $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) \ 73*45916cd2Sjpk -lgen -z lazyload -lsecdb -z nolazyload 747c478bd9Sstevel@tonic-gatelpforms:= LDLIBS += $(LIBFRM) $(LIBMSG) $(LIBREQ) $(LIBOAM) \ 75*45916cd2Sjpk $(LIBACC) $(LIBLP) \ 76*45916cd2Sjpk -z lazyload -lsecdb -z nolazyload 777c478bd9Sstevel@tonic-gatelpmove:= LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) 787c478bd9Sstevel@tonic-gatelpshut:= LDLIBS += $(LIBMSG) $(LIBOAM) $(LIBLP) 79*45916cd2Sjpklpsystem:= LDLIBS += $(LIBSYS) $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) \ 80*45916cd2Sjpk -lnsl -z lazyload -lsecdb -z nolazyload 817c478bd9Sstevel@tonic-gatelpusers:= LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBUSR) $(LIBLP) 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate.KEEP_STATE: 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateall: $(PROG) $(SUBDIRS) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gateaccept: $(COMMONOBJ) 887c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(COMMONOBJ) $(LDFLAGS) $(LDLIBS) 897c478bd9Sstevel@tonic-gate $(POST_PROCESS) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gateinstall: $(PROG) $(ROOTLIBLPLOCLPROG) $(ROOTSBINPROG) \ 937c478bd9Sstevel@tonic-gate $(ROOTSYMLINKS) $(ROOTSYMLINKS2) $(SUBDIRS) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gatecatalog: $(SUBDIRS) $(POFILE) 967c478bd9Sstevel@tonic-gate $(CP) $(POFILE) .. 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gateclean: $(SUBDIRS) 997c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateclobber: $(SUBDIRS) local_clobber 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gatelocal_clobber: 1047c478bd9Sstevel@tonic-gate $(RM) $(OBJS) $(PROG) lpmove.o lpsystem.o $(CLOBBERFILES) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gatestrip: $(SUBDIRS) 1077c478bd9Sstevel@tonic-gate $(STRIP) $(PROG) 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gatelint: 1107c478bd9Sstevel@tonic-gate $(LINT.c) $(SRCS) $(LDLIBS) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate$(LOCALPROG1) $(SBINPROG): $$@.o 1137c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $@.o $(LDFLAGS) $(LDLIBS) 1147c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate$(ROOTSYMLINKS): 1177c478bd9Sstevel@tonic-gate $(RM) $@; $(SYMLINK) ../sbin/$(@F) $@ 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate$(ROOTSYMLINKS2): 1207c478bd9Sstevel@tonic-gate $(RM) $@; $(SYMLINK) ./accept $@ 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC 1237c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gateinclude ../Makefile.lp.msg 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gateFRC: 128