GNUmakefile.in 1.38 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
12
SCRIPTS		= plasticwrap
13
SBINS		= paperbag genlastlog lastlog_daemon
Leigh B. Stoller's avatar
Leigh B. Stoller committed
14

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

21
include $(TESTBED_SRCDIR)/GNUmakerules
22

23
CFLAGS	+= -O2 -g
24

25
26
27
28
29
30
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 $<
31

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

37
38
39
40
41
42
43
44
genlastlog:	genlastlog.c
	$(CC) $(CFLAGS) -I/usr/local/include \
		-DTBDBNAME='"$(TBDBNAME)"' \
		-DUSERSVAR='"$(prefix)/usersvar"' \
		-DOURDOMAIN='"$(OURDOMAIN)"' \
                -DUSERNODE='"$(USERNODE)"' \
		-o genlastlog $< -L/usr/local/lib/mysql -lmysqlclient

45
install: $(addprefix $(INSTALL_LIBEXECDIR)/, $(BINS)) \
46
	$(addprefix $(INSTALL_SBINDIR)/, $(SBINS))
Leigh B. Stoller's avatar
Leigh B. Stoller committed
47
48
49
	@echo "Don't forget to do a post-install as root"

post-install:
50
51
	chown root $(INSTALL_LIBEXECDIR)/suexec
	chmod u+s $(INSTALL_LIBEXECDIR)/suexec
Leigh B. Stoller's avatar
Leigh B. Stoller committed
52

53
54
55
56
57
#
# Control node installation (okay, plastic)
#
control-install:	$(addprefix $(INSTALL_BINDIR)/, plasticwrap)

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