3 include $(XSEG_HOME)/base.mk
5 KDIR := /lib/modules/$(shell uname -r)/build
7 EXTRA_CFLAGS += -g -I$(BASE) -I$(BASE)/sys/kernel
8 LIBDIR=$(BASE)/lib/kernel
10 xseg-objs := xsegmod.o xq.k.o xpool.k.o xhash.k.o xheap.k.o xobj.k.o xseg.k.o
11 obj-m += xseg.o segdev.o
13 default: xq.k.c xpool.k.c xhash.k.c xheap.k.c xobj.k.c xseg.k.c
14 $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) V=$(V) modules
15 cp -vaf xseg.ko segdev.ko $(LIBDIR)
17 xq.k.c: $(BASE)/xtypes/xq.c $(BASE)/xtypes/xq.h
20 xpool.k.c: $(BASE)/xtypes/xpool.c $(BASE)/xtypes/xpool.h
23 xhash.k.c: $(BASE)/xtypes/xhash.c $(BASE)/xtypes/xhash.h
26 xheap.k.c: $(BASE)/xtypes/xheap.c $(BASE)/xtypes/xheap.h
29 xobj.k.c: $(BASE)/xtypes/xobj.c $(BASE)/xtypes/xobj.h
32 xseg.k.c: $(BASE)/xseg/xseg.c $(BASE)/xseg/xseg.h
36 rm -f xq.k.c xpool.k.c xhash.k.c xheap.k.c xobj.k.c xseg.k.c
37 make -C /lib/modules/$(shell uname -r)/build M=$(PWD) V=$(V) clean