GNUmakefile.in 1009 Bytes
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

Leigh B. Stoller's avatar
Leigh B. Stoller committed
11
12
13
BINS		= suexec
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
23
24
25
CFLAGS	= -O -g \
	  -DLOG_EXEC='"$(prefix)/log/suexec.log"' \
	  -DDOC_ROOT='"$(prefix)/libexec/"' \
	  -DSAFE_PATH='"$(prefix)/libexec:/usr/local/bin:/usr/bin:/bin"'
26

27
28
29
30
suexec:	suexec.o
	$(CC) $(CFLAGS) -o suexec suexec.o

suexec.o: suexec.c suexec.h
Leigh B. Stoller's avatar
Leigh B. Stoller committed
31

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

post-install:
37
38
	chown root $(INSTALL_LIBEXECDIR)/suexec
	chmod u+s $(INSTALL_LIBEXECDIR)/suexec
Leigh B. Stoller's avatar
Leigh B. Stoller committed
39

40
41
42
43
44
#
# Control node installation (okay, plastic)
#
control-install:	$(addprefix $(INSTALL_BINDIR)/, plasticwrap)

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