GNUmakefile.in 1.57 KB
Newer Older
1
2
#
# EMULAB-COPYRIGHT
Timothy Stack's avatar
   
Timothy Stack committed
3
# Copyright (c) 2004, 2005 University of Utah and the Flux Group.
4
5
6
7
8
9
10
11
# All rights reserved.
#

SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
SUBDIR		= robots/vmcd

Timothy Stack's avatar
Timothy Stack committed
12
13
SYSTEM         := $(shell uname -s)

14
15
include $(OBJDIR)/Makeconf

Timothy Stack's avatar
   
Timothy Stack committed
16
PROGS = vmc-client vmcd
Timothy Stack's avatar
   
Timothy Stack committed
17

David Johnson's avatar
David Johnson committed
18
19
20
21
ifeq ($(HAVE_MEZZANINE),yes)
PROGS += file_dumper
endif

Timothy Stack's avatar
   
Timothy Stack committed
22
23
24
25
26
27
28
TESTS =

ifeq ($(HAVE_MEZZANINE),no)
TESTS += test_vmc-client.sh
endif

ifeq ($(EVENTSYS),1)
Timothy Stack's avatar
   
Timothy Stack committed
29
TESTS += test_vmcd.sh test_vmcd2.sh test_vmcd3.sh test_vmcd4.sh
Timothy Stack's avatar
   
Timothy Stack committed
30
endif
Timothy Stack's avatar
   
Timothy Stack committed
31
32

all: $(PROGS)
Timothy Stack's avatar
   
Timothy Stack committed
33
client client-install:
34
35
36

include $(TESTBED_SRCDIR)/GNUmakerules

Timothy Stack's avatar
   
Timothy Stack committed
37
CFLAGS	       += -O -g -Wall -I${OBJDIR} -I/usr/local/include
Timothy Stack's avatar
   
Timothy Stack committed
38
CFLAGS	       += -I${SRCDIR}/../mtp -I../mtp
Timothy Stack's avatar
   
Timothy Stack committed
39
40
CFLAGS	       += -I${SRCDIR}/../../lib/libtb

41
42
43
LDFLAGS		= -L../mtp -L${OBJDIR}/lib/libtb -L${OBJDIR}/event/lib 

LIBS	 += -lmtp -ltb -lm 
Timothy Stack's avatar
   
Timothy Stack committed
44
45
46
47

ifeq ($(HAVE_MEZZANINE),yes)
CFLAGS	 += -I${SRCDIR}/../mezzanine/libmezz
LDFLAGS	 += -L../mezzanine/libmezz
48
49
LIBS     += -lmezz
endif
Timothy Stack's avatar
   
Timothy Stack committed
50
51
52

test_vmc-client.sh: vmc-client

Timothy Stack's avatar
   
Timothy Stack committed
53
54
test_vmcd.sh: vmcd

Timothy Stack's avatar
   
Timothy Stack committed
55
56
57
vmc-client: vmc-client.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)

Timothy Stack's avatar
   
Timothy Stack committed
58
59
vmcd: vmcd.o visionTrack.o robotObject.o ../mtp/libmtp.a
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ vmcd.o visionTrack.o robotObject.o $(LIBS)
Timothy Stack's avatar
   
Timothy Stack committed
60

David Johnson's avatar
David Johnson committed
61
62
63
file_dumper: file_dumper.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)

Timothy Stack's avatar
   
Timothy Stack committed
64
65
66
67
install: all
ifeq ($(HAVE_MEZZANINE),yes)
	-mkdir -p $(INSTALL_SBINDIR)
	$(INSTALL_PROGRAM) vmc-client $(INSTALL_SBINDIR)/vmc-client
Timothy Stack's avatar
   
Timothy Stack committed
68
	$(INSTALL_PROGRAM) vmcd $(INSTALL_SBINDIR)/vmcd
Timothy Stack's avatar
   
Timothy Stack committed
69
70
71
72
else
	-mkdir -p $(INSTALL_DIR)/opsdir/sbin
	$(INSTALL_PROGRAM) vmcd $(INSTALL_DIR)/opsdir/sbin/vmcd
endif
Timothy Stack's avatar
Timothy Stack committed
73

74
75
clean:
	rm -f *.o