-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (44 loc) · 1.6 KB
/
Makefile
File metadata and controls
65 lines (44 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
CC:=gcc
HVM_ROS_DIR=.
AEROKERNEL="\"nautilus.bin.TEST\""
BASE=/v-test/nautilus/hrt_redirect/libelf-0.8.9/build
LIBPATH=$(BASE)/lib
LDFLAGS:= -static -L$(LIBPATH) -L$(HVM_ROS_DIR) -pthread -Wl,--wrap,main -Wl,-rpath,$(LIBPATH)
LIBS:=-lelf -lrt -lv3_hvm_ros_user
INC:=-I$(BASE)/include
PDIR:=/home/pdinda/palacios-hvm/guest/linux/hvm-ros
DEBUG:=0
include wrap.mk
CFLAGS:= $(INC) -DAEROKERNEL_PATH=$(AEROKERNEL) -I$(HVM_ROS_DIR)
ifeq ($(DEBUG),1)
CFLAGS += -DDEBUG_ENABLE=1
endif
all: test_redirect test_threads
hrtrt.o: hrtrt.c
$(CC) $(CFLAGS) -o $@ -c $<
aerokernel.o: aerokernel.S
$(CC) $(CFLAGS) -o $@ -c $<
wrap.o: wrap.c
$(CC) $(CFLAGS) -o $@ -c $<
pthread.o: pthread.c
$(CC) $(CFLAGS) -o $@ -c $<
hashtable.o: hashtable.c
$(CC) $(CFLAGS) -o $@ -c $<
wrap_funcs.c:
./gen_wrappers.pl test.yaml
wrap_funcs.o: wrap_funcs.c
$(CC) $(CFLAGS) -o $@ -c $<
test_redirect.o: test_redirect.c
$(CC) $(CFLAGS) -o $@ -c $<
test_threads.o: test_threads.c
$(CC) $(CFLAGS) -o $@ -c $<
libv3_hvm_ros_user.a: $(PDIR)/v3_hvm_ros_user.c $(PDIR)/v3_hvm_ros_user_low_level.S $(PDIR)/v3_hvm_ros_user.h
make -C $(PDIR) clean
make -C $(PDIR) DEBUG=$(DEBUG)
cp $(PDIR)/$@ .
test_redirect: test_redirect.o hrtrt.o aerokernel.o wrap.o wrap_funcs.o pthread.o hashtable.o libv3_hvm_ros_user.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
test_threads: test_threads.o hrtrt.o aerokernel.o wrap.o wrap_funcs.o pthread.o hashtable.o libv3_hvm_ros_user.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
clean:
rm -f hrtrt.o aerokernel.o pthread.o wrap.o wrap_funcs.o hashtable.o $(TARGET).o $(TARGET) wrap_funcs.c libv3_hvm_ros_user.a