Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
afshinkdoost committed Jan 26, 2016
1 parent b7f43f0 commit 3c8ebc7
Show file tree
Hide file tree
Showing 2 changed files with 413 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ifneq (${KERNELRELEASE},)

obj-m = gpio_test.o
else

KERNELDIR ?= /lib/modules/$(shell uname -r)/build
MODULE_DIR ?= $(shell pwd)
ARCH ?= $(shell uname -i)
CROSS_COMPILE ?=
INSTALL_MOD_PATH ?= /

all: modules

modules:
${MAKE} ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} -C ${KERNELDIR} SUBDIRS=${MODULE_DIR} modules

modules_install:
${MAKE} ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} INSTALL_MOD_PATH=${INSTALL_MOD_PATH} -C ${KERNELDIR} SUBDIRS=${MODULE_DIR} modules_install

clean:
rm -f *.o *.ko *.mod.c .*.o .*.ko .*.mod.c .*.cmd *~
rm -f Module.symvers Module.markers modules.order
rm -rf .tmp_versions
endif
Loading

0 comments on commit 3c8ebc7

Please sign in to comment.