VERSION := $(shell uname -r) KERNDIR = /usr/src/linux-headers-$(VERSION) INSTALLDIR = /lib/modules/$(VERSION)/kernel/drivers/usb/misc obj-m = ${fjveincam_xu22}.o driver: @if test -f $(KERNDIR)/Makefile; \ then \ make -C $(KERNDIR) M=$(BUILD_DIR) KBUILD_VERBOSE=$(VERBOSE) modules; \ else \ echo Path \"$(KERNDIR)\"" not found."; \ echo "You have to configure your Makefile." ; \ echo "And set your target kernel source path to KERNDIR." ; \ fi; install: install -d $(INSTALLDIR) install -m 644 -g root -o root ${TARGET}.ko $(INSTALLDIR) clean: $(RM) ${TARGET}.*o ${TARGET}.mod.c ${TARGET}.mod.o .${TARGET}.* *~ $(RM) Module.symvers modules.order $(RM) -r .tmp_versions # Build an application that will run once, notifying http://$server:$port/notify app: handjob.c gcc -i bin/handjob -Iinclude -Llib src/handjob.c -lm