DRVOBJ := linux.o ops.o console.o sysfs.o ident_tables.o LIBOBJ := vidforio.o init.o format.o video.o capture.o isr.o version.o ifneq ($(KERNELRELEASE),) EXTRA_CFLAGS += -I$(M)/../libvidforio -I$(M)/../../devel/include obj-m += vidfor.o vidfor-objs := $(DRVOBJ) $(patsubst %,../libvidforio/%,$(LIBOBJ)) else KERNELDIR ?= /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) version ident_tables.c: @echo ' /* MACHINE GENERATED -- DO NOT EDIT */' > tmp.c @echo 'const char vidfor_build_stamp[] =' >> tmp.c @echo '"'`git describe --tags --long --always --match sys-\*`'";' >> tmp.c @diff tmp.c ident_tables.c > /dev/null 2>&1 || (echo "updating ident_tables.c"; cp tmp.c ident_tables.c) @rm -f tmp.c modules: $(MAKE) -C ../libvidforio version $(MAKE) version $(MAKE) -C $(KERNELDIR) M=$(PWD) modules modules_install: $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install clean: $(MAKE) -C $(KERNELDIR) M=$(PWD) clean endif