X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=hello%2FMakefile;h=17ba7182c7ff6b4d2df2ee9dad3d5a61d7cd4f6a;hb=HEAD;hp=5947db3cd47cefebcfd3d7dba4e5a8ea8b0e6e12;hpb=9e37f9f283bb4c910f09b812b858bce3b4de3562;p=my-code%2Fkernel.git diff --git a/hello/Makefile b/hello/Makefile index 5947db3..17ba718 100644 --- a/hello/Makefile +++ b/hello/Makefile @@ -1,26 +1 @@ -# Makefile of hello.o - my first kernel module. - -INCLUDEDIR = /usr/include -CC = gcc -CFLAGS = -D__KERNEL__ -DMODULE -O -Wall # -I$(INCLUDEDIR) - -# findout kernel version. -VER = $(shell awk -F\" '/REL/ {print $$2}' $(INCLUDEDIR)/linux/version.h) - -OBJS = hello.o - -all: $(OBJS) - -#hello.o: hello.o -# $(LD) -r $^ -o $@ - -install: - install -d /lib/modules/$(VER)/misc - install -c hello.o /lib/modules/$(VER)/misc - -clean: - rm -f *.o *~ core - -uninstall: - rm -f /lib/modules/$(VER)/misc/hello.o - +obj-m += hello.o