1 # This Makefile is a modified version that uses two recursive Make calls
2 # First the linux module is compiled via the target kernels build system
3 # Second, the module is encapsulated for the Palacios VMM
5 V3_MOD_NAME := lnx_test
7 LINUX_MOD_OBJ := test.o
9 # This is the target used by the Linux build process
10 ifneq ($(KERNELRELEASE),)
11 obj-m := $(LINUX_MOD_OBJ)
14 # These are configuration values to be set
16 KERNELDIR := /home/jarusl/linux-2.6.30.y
18 PALACIOSDIR := $(PWD)/../../..
19 CAPSULEDIR := $(PALACIOSDIR)/symmods/capsule
20 V3_MOD_TYPE := V3_LINUX_MOD
24 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
27 $(MAKE) -C $(CAPSULEDIR) MOD_NAME=$(V3_MOD_NAME) MOD_DIR=$(PWD) \
28 MOD_OBJ=$(V3_MOD_OBJ) MOD_TYPE=$(V3_MOD_TYPE) \
29 MOD_ARCH=$(V3_MOD_ARCH)
31 default: linux capsule
34 cp $(V3_MOD_NAME).vo $(PALACIOSDIR)/modules/