1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# ident "%Z%%M% %I% %E% SMI" 24# 25# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 26# Use is subject to license terms. 27# 28# cmd/lp/cmd/Makefile 29# 30 31include ../Makefile.lp 32 33OWNER = root 34 35SUBDIRS = lpc lptest lpadmin lpsched lpstat adaptor scripts 36 37LOCALPROG1 = lp lpsystem lpmove lpshut 38LOCALPROG2 = accept 39LOCALPROG = $(LOCALPROG1) $(LOCALPROG2) 40LOCALLINKS = disable enable reject 41 42SBINPROG = lpfilter lpforms lpusers 43 44LIBLINKS = $(SBINPROG) 45 46PROG = $(LOCALPROG) $(SBINPROG) 47 48COMMONOBJ= comb.o 49OTHEROBJS= cancel.o lp.o $(SBINPROG:=.o) 50 51OBJS= $(COMMONOBJ) $(OTHEROBJS) 52 53SRCS= $(OBJS:.o=.c) 54 55POFILE= lp_cmd.po 56POFILES= $(SRCS:%.c=%.po) lpsystem.po lpmove.po lpschedlpshut.po 57 58ROOTLIBLPLOCLPROG= $(LOCALPROG:%=$(ROOTLIBLPLOCL)/%) 59ROOTSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%) 60ROOTSYMLINKS= $(LIBLINKS:%=$(ROOTLIB)/%) 61ROOTSYMLINKS2= $(LOCALLINKS:%=$(ROOTLIBLPLOCL)/%) 62 63 64CPPFLAGS = -I$(LPINC) $(CPPFLAGS.master) 65 66# conditional assignments 67# 68accept:= LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) 69cancel:= LDLIBS += $(LIBREQ) $(LIBMSG) $(LIBOAM) $(LIBLP) 70lp:= LDLIBS += $(LIBPRT) $(LIBREQ) $(LIBMSG) $(LIBOAM) $(LIBLP) 71lpfilter:= LDLIBS += $(LIBFLT) $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) \ 72 -lgen 73lpforms:= LDLIBS += $(LIBFRM) $(LIBMSG) $(LIBREQ) $(LIBOAM) \ 74 $(LIBACC) $(LIBLP) 75lpmove:= LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) 76lpshut:= LDLIBS += $(LIBMSG) $(LIBOAM) $(LIBLP) 77lpsystem:= LDLIBS += $(LIBSYS) $(LIBMSG) $(LIBOAM) $(LIBLP) -lnsl 78lpusers:= LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBUSR) $(LIBLP) 79 80.KEEP_STATE: 81 82all: $(PROG) $(SUBDIRS) 83 84accept: $(COMMONOBJ) 85 $(LINK.c) -o $@ $(COMMONOBJ) $(LDFLAGS) $(LDLIBS) 86 $(POST_PROCESS) 87 88 89install: $(PROG) $(ROOTLIBLPLOCLPROG) $(ROOTSBINPROG) \ 90 $(ROOTSYMLINKS) $(ROOTSYMLINKS2) $(SUBDIRS) 91 92catalog: $(SUBDIRS) $(POFILE) 93 $(CP) $(POFILE) .. 94 95clean: $(SUBDIRS) 96 $(RM) $(OBJS) 97 98clobber: $(SUBDIRS) local_clobber 99 100local_clobber: 101 $(RM) $(OBJS) $(PROG) lpmove.o lpsystem.o $(CLOBBERFILES) 102 103strip: $(SUBDIRS) 104 $(STRIP) $(PROG) 105 106lint: 107 $(LINT.c) $(SRCS) $(LDLIBS) 108 109$(LOCALPROG1) $(SBINPROG): $$@.o 110 $(LINK.c) -o $@ $@.o $(LDFLAGS) $(LDLIBS) 111 $(POST_PROCESS) 112 113$(ROOTSYMLINKS): 114 $(RM) $@; $(SYMLINK) ../sbin/$(@F) $@ 115 116$(ROOTSYMLINKS2): 117 $(RM) $@; $(SYMLINK) ./accept $@ 118 119$(SUBDIRS): FRC 120 @cd $@; pwd; $(MAKE) $(TARGET) 121 122include ../Makefile.lp.msg 123 124FRC: 125