Forum Discussion
Altera_Forum
Honored Contributor
20 years agoifneq ($(KERNELRELEASE),)# kbuild part of makefile
obj-m := mymodule.o
else# Normal Makefile
ARCH := nios2nommu
CROSS_COMPILE := nios2-elf-
KERNELDIR := $(KERNEL_PLUGIN)/linux-2.6.x
BUILDDIR := /cygdrive/d/MyKernel
all::
$(MAKE) -C $(KERNELDIR) M=`pwd` O=$(BUILDDIR) -O $@
endif Give the above a try. I added a couple of variables (ARCH and CROSS_COMPILE)... and I've made sure that all you're variables are referenced using the standard $() syntax for Makefiles. Don't forget to add a "TAB" to the $(MAKE) line.