GNUmakefile.in 1.07 KB
Newer Older
1
2
3
#
# Insert Copyright Here.
#
4
5
6
7
8
9
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= security

include $(OBJDIR)/Makeconf
10

11
BINS		= suexec lastlogin
Leigh B. Stoller's avatar
Leigh B. Stoller committed
12
13
SCRIPTS		= paperbag plasticwrap

14
15
16
17
18
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
all:	$(BINS) $(SCRIPTS)
Leigh B. Stoller's avatar
Leigh B. Stoller committed
19

20
include $(TESTBED_SRCDIR)/GNUmakerules
21

22
CFLAGS	= -O -g
23

24
25
26
27
28
29
suexec:		suexec.c suexec.h
	$(CC) $(CFLAGS) \
		-DLOG_EXEC='"$(prefix)/log/suexec.log"' \
		-DDOC_ROOT='"$(prefix)/libexec/"' \
		-DSAFE_PATH='"$(prefix)/libexec:/usr/local/bin:/usr/bin:/bin"'\
		-o suexec $<
30

31
32
33
34
lastlogin:	lastlogin.c
	$(CC) $(CFLAGS) \
		-DUSERSVAR='"$(prefix)/usersvar"' \
		-o lastlogin $<
Leigh B. Stoller's avatar
Leigh B. Stoller committed
35

36
install: $(addprefix $(INSTALL_LIBEXECDIR)/, $(BINS)) \
37
	$(addprefix $(INSTALL_SBINDIR)/, paperbag)
Leigh B. Stoller's avatar
Leigh B. Stoller committed
38
39
40
	@echo "Don't forget to do a post-install as root"

post-install:
41
42
	chown root $(INSTALL_LIBEXECDIR)/suexec
	chmod u+s $(INSTALL_LIBEXECDIR)/suexec
Leigh B. Stoller's avatar
Leigh B. Stoller committed
43

44
45
46
47
48
#
# Control node installation (okay, plastic)
#
control-install:	$(addprefix $(INSTALL_BINDIR)/, plasticwrap)

Leigh B. Stoller's avatar
Leigh B. Stoller committed
49
50
clean:
	rm -f *.o $(BINS) core