# Makefile for jbd
TARGET = jbd
OBJECT = transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o
ifneq ($(KERNELRELEASE),)
#kbuild syntax.
obj-m += $(TARGET).o
$(TARGET)-objs := $(OBJECT)
else
PWD := $(shell pwd)
KERNEL_DIR := /lib/modules/`uname -r`/build
all : modules
modules:
$(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules
install:
install ./$(TARGET).ko /usr/local/lib
/sbin/insmod ./$(TARGET).ko
uninstall:
rm -f /usr/local/lib/$(TARGET).ko
/sbin/rmmod $(TARGET).ko
insmod:
/sbin/insmod ./$(TARGET).ko
rmmod:
/sbin/rmmod $(TARGET).ko
clean:
rm -rf .*.cmd *.o *.mod.c *.ko .tmp_versions Module.markers modules.order Module.symvers
endif