commit
[crak.git] / src / Makefile
blob8cf25bc0d645b31b0ae48a4e3182691a4717b08d
1 CONFIG=config.h
3 obj-m := ckpt.o
4 ckpt-objs := main.o dump.o restore.o
7 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
8 PWD := $(shell pwd)
10 modules:
11 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
13 help:
14 @echo "make OPTIONS: modules help docs clean build"
16 config:
17 rm -f $(CONFIG)
18 echo "// generated by mk-config" >> $(CONFIG)
19 echo >> $(CONFIG)
20 ./mk-config do_linear_fault CKPT_DO_LINEAR_FAULT >> $(CONFIG)
21 ./mk-config do_swap_page CKPT_DO_SWAP_PAGE >> $(CONFIG)
22 ./mk-config tasklist_lock CKPT_TASKLIST_LOCK>> $(CONFIG)
23 ./mk-config open_namei CKPT_OPEN_NAMEI>> $(CONFIG)
24 ./mk-config handle_pte_fault CKPT_HANDLE_PTE_FAULT >> $(CONFIG)
25 ./mk-config bprm_mm_init CKPT_BPRM_MM_INIT >> $(CONFIG)
27 build:
28 make config
29 make modules
31 clean:
32 rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions \
33 Module.symvers modules.order html config.h
35 depend .depend dep:
36 $(CC) $(CFLAGS) -M *.c > .depend
38 ifeq (.depend,$(wildcard .depend))
39 include .depend
40 endif