1# Copyright (c) 1998-1999 peter memishian (meem), meem@gnu.org
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2, or (at your option)
6# any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11# General Public License for more details.
12#
13# SCCS "@(#)Makefile.am	1.5	01/01/01 meem"
14
15# Process this file with automake to produce Makefile.in
16
17localedir	= $(datadir)/locale
18LDFLAGS		= -L../lib
19LDADD		= @INTLLIBS@ ../lib/librlpr.a
20INCLUDES	= -I$(top_srcdir)/intl -I$(top_srcdir)/lib \
21		  -DLOCALEDIR=\"$(localedir)\"
22bin_PROGRAMS	= rlpr rlpq rlprm rlprd
23rlpr_SOURCES	= rlpr.c component.c msg.c rlprrc.c util.c client.c
24rlpq_SOURCES	= rlpq.c component.c msg.c rlprrc.c util.c client.c
25rlprm_SOURCES	= rlprm.c component.c msg.c rlprrc.c util.c client.c
26rlprd_SOURCES	= rlprd.c component.c msg.c util.c
27
28EXTRA_DIST	= check-server.sh
29
30noinst_HEADERS	= client.h component.h intl.h msg.h rfc1179.h rlpq.h rlpr.h \
31		  rlprd.h rlprm.h rlprrc.h util.h
32
33#
34# Special directive for making links.  This is kind of a hack;
35# it appears that Automake doesn't mind if we add stuff that we
36# want to end up in the real Makefile in here as long as we
37# avoid its variable names.
38#
39link_programs	= rlpr rlpq rlprm
40
41install-setuid:	install
42	@echo "setting rlpr, rlpq, rlprm and rlprd to be setuid root..."
43	@chown root $(bindir)/rlpr
44	@chmod 4755 $(bindir)/rlpr
45	@chown root $(bindir)/rlpq
46	@chmod 4755 $(bindir)/rlpq
47	@chown root $(bindir)/rlprm
48	@chmod 4755 $(bindir)/rlprm
49	@chown root $(bindir)/rlprd
50	@chmod 4755 $(bindir)/rlprd
51
52install-proxy: install
53	@echo "setting rlprd to be setuid root..."
54	@chown root $(bindir)/rlprd
55	@chmod 4755 $(bindir)/rlprd
56
57bsdlinks:	$(link_programs)
58	@echo "installing bsd symlinks..."
59	-mv /usr/bin/lpr /usr/bin/lpr.bsd
60	ln -s $(bindir)/rlpr /usr/bin/lpr
61	-mv /usr/bin/lpq /usr/bin/lpq.bsd
62	ln -s $(bindir)/rlpq /usr/bin/lpq
63	-mv /usr/bin/lprm /usr/bin/lprm.bsd
64	ln -s $(bindir)/rlprm /usr/bin/lprm
65
66
67