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

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

12
LBINDIR		= $(DESTDIR)/usr/local/bin
13
SYSTEM	       := $(shell uname -s)
14

15
include $(OBJDIR)/Makeconf
16

17 18 19 20
SUBDIRS	= imagezip frisbee.redux syncd dijkstra genhostsfile
ifeq ($(SYSTEM),FreeBSD)
SUBDIRS += growdisk 
endif
21

22
all:	all-subdirs split-image.sh
23

24
include $(TESTBED_SRCDIR)/GNUmakerules
25

26
install: $(INSTALL_SBINDIR)/split-image.sh
27
	@$(MAKE) -C imagezip install
Leigh Stoller's avatar
Leigh Stoller committed
28
	@$(MAKE) -C frisbee.redux install
29 30 31

control-install: 
	@$(MAKE) -C imagezip install
32

33
client:
34
ifeq ($(SYSTEM),FreeBSD)
35 36 37 38 39 40 41
	$(MAKE) -C growdisk client
endif
	$(MAKE) -C syncd client
	$(MAKE) -C dijkstra client
	$(MAKE) -C genhostsfile client

client-install: client
42 43
	$(INSTALL) -m 755 -o root -g wheel -d $(LBINDIR)
	$(INSTALL_PROGRAM) $(SRCDIR)/install-tarfile $(LBINDIR)/install-tarfile
44
	$(INSTALL_PROGRAM) $(SRCDIR)/install-rpm $(LBINDIR)/install-rpm
45
ifeq ($(SYSTEM),FreeBSD)
46
	$(INSTALL_PROGRAM) $(SRCDIR)/create-image $(LBINDIR)/create-image
47
	$(MAKE) -C growdisk client-install
48
endif
49
	$(MAKE) -C syncd client-install
50
	$(MAKE) -C dijkstra client-install
51
	$(MAKE) -C genhostsfile client-install
52

53 54 55 56 57 58
mfs:
	$(MAKE) -C imagezip client

mfs-install: mfs
	$(INSTALL_PROGRAM) $(SRCDIR)/create-image $(LBINDIR)/create-image
	$(MAKE) -C imagezip client-install
59 60 61 62 63 64 65 66

frisbee-mfs:
	$(MAKE) -C frisbee.redux client
	$(MAKE) -C growdisk client

frisbee-mfs-install: frisbee-mfs
	CLIENT_BINDIR=/etc/testbed $(MAKE) -e -C frisbee.redux client-install
	CLIENT_BINDIR=/etc/testbed $(MAKE) -e -C growdisk client-install
67

68 69 70
remote-install: 
	$(INSTALL) -m 755 -o root -g wheel -d $(LBINDIR)
	$(INSTALL_PROGRAM) $(SRCDIR)/install-tarfile $(LBINDIR)/install-tarfile
71
	$(INSTALL_PROGRAM) $(SRCDIR)/install-rpm $(LBINDIR)/install-rpm
72

73
clean:		clean-subdirs
74 75 76 77 78
distclean:	subdir-distclean

subdir-distclean:
	@$(MAKE) -C imagezip distclean

79 80 81 82 83 84
# How to recursively descend into subdirectories to make general
# targets such as `all'.
%.MAKE:
	@$(MAKE) -C $(dir $@) $(basename $(notdir $@))
%-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ;

85 86
.PHONY:	$(SUBDIRS)