GNUmakefile.in 1.35 KB
Newer Older
1
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2
3
4
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
5
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
6

7
8
9
10
11
12
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= security

include $(OBJDIR)/Makeconf
13

14
BINS		= suexec
15
SCRIPTS		= plasticwrap
16
SBINS		= paperbag genlastlog lastlog_daemon
Leigh B. Stoller's avatar
Leigh B. Stoller committed
17

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

24
include $(TESTBED_SRCDIR)/GNUmakerules
25

26
CFLAGS	+= -O2 -g
27

28
29
30
31
32
33
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 $<
34

35
36
37
38
39
40
41
42
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

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

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

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

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