GNUmakefile.in 874 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

Leigh B. Stoller's avatar
Leigh B. Stoller committed
27
28
29
suexec:	suexec.c suexec.h
	$(CC) $(CFLAGS) -o suexec suexec.c

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

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

clean:
	rm -f *.o $(BINS) core