4 #TEST_CASES := $(wildcard test*.c)
6 #TEST_TARGETS := $(wildcard (test*).c)
8 all: devfile_hc.o test_preload devfile_host.ko libdevfile_hcall.a devfile_preload.so
10 libdevfile_hcall.a: devfile_hc.o
11 ar ruv libdevfile_hcall.a devfile_hc.o
13 devfile_hc.o: devfile_hc.c devfile_hc.h hcall.h
14 gcc $(EXTRA) -g -static -fPIC -S devfile_hc.c -o devfile_hc.s
15 gcc $(EXTRA) -g -static -fPIC -c devfile_hc.c -o devfile_hc.o
17 devfile_preload.so: devfile_preload.c libdevfile_hcall.a
18 gcc $(EXTRA) -Wall -O2 -fPIC -shared -I/usr/include devfile_preload.c -L. -ldevfile_hcall -ldl -lc -o devfile_preload.so
20 EXTRA_CFLAGS += -I$(PWD)/../../../palacios/include
22 obj-m += devfile_host.o
24 devfile_host.ko: devfile_host.c
25 make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
27 test_preload: test_preload.c
28 gcc $(EXTRA) -Wall -g test_preload.c -o test_preload
31 rm *.o *.so *.a *.ko test_preload *.out *.symvers *.mod.c *.s *.order
32 make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
35 rm test_ld_lib *.o *.mod.o *.out *.symvers *.mod.c *.s *.order