GNUmakefile.in 2.79 KB
Newer Older
Leigh B. Stoller's avatar
Leigh B. Stoller committed
1
#
2
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# 
# {{{EMULAB-LICENSE
# 
# This file is part of the Emulab network testbed software.
# 
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
# 
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
# License for more details.
# 
# You should have received a copy of the GNU Affero General Public License
# along with this file.  If not, see <http://www.gnu.org/licenses/>.
# 
# }}}
Leigh B. Stoller's avatar
Leigh B. Stoller committed
22 23
#

Leigh B. Stoller's avatar
Leigh B. Stoller committed
24 25 26
#
# Insert Copyright Here.
#
27 28 29 30
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
SUBDIR		= tbsetup/ns2ir
31

32
include $(OBJDIR)/Makeconf
33

34
LIB_STUFF    = lanlink.tcl node.tcl sim.tcl tb_compat.tcl null.tcl \
35 36 37 38 39
		nsobject.tcl traffic.tcl vtype.tcl parse.tcl program.tcl \
		nsenode.tcl nstb_compat.tcl event.tcl firewall.tcl \
		elabinelab.ns elabinelab-withfsnode.ns elabinelab-opsvm.ns \
		fw.ns timeline.tcl sequence.tcl \
		topography.tcl console.tcl path.tcl \
Kirk Webb's avatar
Kirk Webb committed
40 41
		disk.tcl custom.tcl elabinelab-xen.ns \
		blockstore.tcl
42

43 44
BOSSLIBEXEC  = parse-ns
USERLIBEXEC  = parse.proxy
Leigh B. Stoller's avatar
Leigh B. Stoller committed
45

46 47 48 49 50
# These scripts installed setuid, with sudo. 
SETUID_BIN_SCRIPTS   = 
SETUID_SBIN_SCRIPTS  = 
SETUID_LIBX_SCRIPTS  = parse-ns

Leigh B. Stoller's avatar
Leigh B. Stoller committed
51
#
52 53
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
Leigh B. Stoller's avatar
Leigh B. Stoller committed
54
# 
55
all: $(LIB_STUFF) $(BOSSLIBEXEC) $(USERLIBEXEC)
Leigh B. Stoller's avatar
Leigh B. Stoller committed
56

57
include $(TESTBED_SRCDIR)/GNUmakerules
Leigh B. Stoller's avatar
Leigh B. Stoller committed
58

59 60 61 62 63 64 65 66 67 68 69
install:	control-install \
	$(addprefix $(INSTALL_LIBEXECDIR)/, $(BOSSLIBEXEC)) \
	$(addprefix $(INSTALL_DIR)/opsdir/lib/ns2ir/, $(LIB_STUFF)) \
	$(addprefix $(INSTALL_DIR)/opsdir/libexec/ns2ir/, $(USERLIBEXEC))

control-install: $(addprefix $(INSTALL_LIBDIR)/ns2ir/, $(LIB_STUFF)) \
	$(addprefix $(INSTALL_LIBEXECDIR)/ns2ir/, $(USERLIBEXEC))

post-install: 
	chmod 775 $(INSTALL_LIBEXECDIR)
	chown root $(INSTALL_LIBEXECDIR)/parse-ns
70
	chmod 775 $(INSTALL_LIBEXECDIR)/ns2ir
71
	chmod u+s $(INSTALL_LIBEXECDIR)/parse-ns
72 73 74
	chmod 775 $(INSTALL_LIBDIR)/ns2ir
	chmod 775 $(INSTALL_DIR)/opsdir/lib/ns2ir
	chmod 775 $(INSTALL_DIR)/opsdir/libexec/ns2ir
Leigh B. Stoller's avatar
Leigh B. Stoller committed
75

76 77 78 79 80 81
$(INSTALL_LIBDIR)/ns2ir/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_LIBDIR)/ns2ir
	$(INSTALL) $< $@

$(INSTALL_LIBEXECDIR)/ns2ir/%: %
Leigh B. Stoller's avatar
Leigh B. Stoller committed
82
	@echo "Installing $<"
83
	-mkdir -p $(INSTALL_LIBEXECDIR)/ns2ir
Leigh B. Stoller's avatar
Leigh B. Stoller committed
84 85
	$(INSTALL) $< $@

86 87 88 89 90 91 92 93 94 95
$(INSTALL_DIR)/opsdir/lib/ns2ir/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/lib/ns2ir
	$(INSTALL) $< $@

$(INSTALL_DIR)/opsdir/libexec/ns2ir/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/libexec/ns2ir
	$(INSTALL) $< $@

Leigh B. Stoller's avatar
Leigh B. Stoller committed
96
clean: