GNUmakefile.in 2.07 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
SUBDIRS	= imagezip frisbee.redux growdisk syncd dijkstra genhostsfile
18

19
all:	all-subdirs split-image.sh
20

21
include $(TESTBED_SRCDIR)/GNUmakerules
22

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

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

30
client:
31
ifeq ($(SYSTEM),FreeBSD)
32 33 34 35 36 37 38
	$(MAKE) -C growdisk client
endif
	$(MAKE) -C syncd client
	$(MAKE) -C dijkstra client
	$(MAKE) -C genhostsfile client

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

50 51 52 53 54 55
mfs:
	$(MAKE) -C imagezip client

mfs-install: mfs
	$(INSTALL_PROGRAM) $(SRCDIR)/create-image $(LBINDIR)/create-image
	$(MAKE) -C imagezip client-install
56 57 58 59 60 61 62 63

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
64

65 66 67
remote-install: 
	$(INSTALL) -m 755 -o root -g wheel -d $(LBINDIR)
	$(INSTALL_PROGRAM) $(SRCDIR)/install-tarfile $(LBINDIR)/install-tarfile
68
	$(INSTALL_PROGRAM) $(SRCDIR)/install-rpm $(LBINDIR)/install-rpm
69

70
clean:		clean-subdirs
71 72 73 74 75
distclean:	subdir-distclean

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

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

82 83
.PHONY:	$(SUBDIRS)