Skip to content

Instantly share code, notes, and snippets.

Created December 31, 2010 13:12
Show Gist options
  • Save anonymous/760992 to your computer and use it in GitHub Desktop.
Save anonymous/760992 to your computer and use it in GitHub Desktop.
C++でLinuxカーネルモジュール、Makefile
KERNEL_DIR = /root/linux
VERBOSE = 0
ARCH = x86
EXTRA_CFLAGS := -isystem $(KERNEL_DIR)/include -isystem $(KERNEL_DIR)/arch/$(ARCH)/include
obj-m := hellocxx.o
CFLAGS_hellocxx.o := -x c++ -std=gnu++0x -fno-operator-names -fno-rtti -fpermissive -fno-exceptions
all:
make -C $(KERNEL_DIR) M=$(PWD) V=$(VERBOSE) modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment