xref: /illumos-gate/usr/src/cmd/lp/cmd/lpsched/Makefile (revision 80ab886d233f514d54c2a6bdeb9fdfd951bd6881)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20
21
22#
23#
24# ident	"%Z%%M%	%I%	%E% SMI"
25#
26# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
27# Use is subject to license terms.
28#
29# cmd/lp/cmd/lpsched/lpsched/Makefile
30#
31
32PROG=		lpsched
33
34include		../../Makefile.lp
35
36MANIFEST=	server.xml
37
38ROOTMANIFESTDIR=	$(ROOTSVCAPPLICATIONPRINT)
39ROOTMETHOD=		$(ROOTLIBSVCMETHOD)/print-svc
40$(ROOTMANIFEST)		:= FILEMODE= 444
41
42PURIFYOPTS      = -logfile=/tmp/errs.%p
43PURIFY          = purify $(PURIFYOPTS)
44
45
46# Doing -DDEBUG allows some nice log files to be generated
47# with the -d option.
48
49CPPFLAGS =	-I. -I$(LPINC) $(CPPFLAGS.master)
50
51HDRS=				\
52		nodes.h		\
53		dispatch.h	\
54		validate.h	\
55		lpsched.h
56
57SRCS=				\
58		alerts.c	\
59		cancel.c	\
60		daisyforms.c	\
61		disena.c	\
62		disp1.c		\
63		disp2.c		\
64		disp3.c		\
65		disp4.c		\
66		disp5.c		\
67		disptab.c	\
68		dowait.c	\
69		exec.c		\
70		faults.c	\
71		files.c		\
72		flt.c		\
73		fncs.c		\
74		getkey.c	\
75		init.c		\
76		log.c		\
77		lpfsck.c	\
78		lpsched.c	\
79		msgs.c		\
80		notify.c	\
81		pickfilter.c	\
82		ports.c		\
83		requeue.c	\
84		rstatus.c	\
85		schedule.c	\
86		status.c	\
87		terminate.c	\
88		validate.c
89
90OBJS=		$(SRCS:.c=.o)
91
92
93LPLIBS =			\
94		$(LIBMSG)	\
95		$(LIBFRM)	\
96		$(LIBREQ)	\
97		$(LIBPRT)	\
98		$(LIBCLS)	\
99		$(LIBACC)	\
100		$(LIBFLT)	\
101		$(LIBUSR)	\
102		$(LIBOAM)	\
103		$(LIBLP)	\
104		$(LIBSEC)
105
106SYSLIBS=	-lcurses -lgen -lcurses -lnsl -z lazyload \
107		-ltsol -lsecdb -lcmd -lbsm -z nolazyload
108
109LDLIBS +=	$(LPLIBS) $(SYSLIBS)
110
111LPSCHED_VERSION_STRING  = ($(ECHO) build info: \\\c; date +%D:%H:%M:%S)
112
113POFILE=		lp_cmd_lpsched.po
114
115.KEEP_STATE:
116
117all:		$(PROG)
118
119$(PROG):	$(OBJS) $(LPLIBS) lpschedvers.o
120		$(LINK.c) $(OBJS) lpschedvers.o -o $@ $(LDLIBS)
121		$(POST_PROCESS)
122
123lpschedvers.c:	FRC
124	@-$(ECHO) "rebuilding lpschedvers.c"
125	@-( \
126	$(ECHO) "/*" ; \
127	$(ECHO) " * This file is derived from cmd/lpsched/lpsched/Makefile" ; \
128	$(ECHO) " */\n" ; \
129	$(ECHO) "#pragma\tident\t\"@(#)lpschedvers.c\tDERIVED\t96/2/1 SMI\"\n" ; \
130	$(ECHO) "char *lpsched_buildinfo = \"`$(LPSCHED_VERSION_STRING)`\\\\n\";" ; \
131	$(ECHO) "" ) > ./lpschedvers.c
132
133$(PROG).pure:	$(OBJS) $(LPLIBS)
134		$(PURIFY) $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
135		$(POST_PROCESS)
136
137install:	all $(ROOTLIBLPLOCLPROG) $(ROOTMANIFEST) $(ROOTMETHOD)
138
139
140check:	$(CHKMANIFEST)
141
142
143clean:
144		$(RM) $(OBJS)
145		$(RM) lpschedvers.c lpschedvers.o
146
147clobber:	clean
148		-$(RM) $(PROG) $(CLOBBERFILES)
149
150strip:
151		$(STRIP) $(PROG)
152
153lint:
154		$(LINT.c) $(SRCS) $(LDLIBS)
155
156include		../Makefile.msg
157
158FRC:
159