Module *.o and others stored in another directory
I have an external module directory (3rd party module driver).
I build it easy enough but the *.mod.c, modules.order, *.ko and the like are all stored in tree.
I tried the O= parameter but that didn't work.
I tried all sorts of other things that didn't work.
Here is the makefile that I have in the source directory.
EXTRA_CFLAGS += -Wall
EXTRA_LDFLAGS := -s
obj-m := $(OUTPUT_DIR)/test.o
$(OUTPUT_DIR)/test-objs := $(OUTPUT_DIR)/test.o
.PHONY: all
all: ${LINUX_OUTPUT_DIR}
@$(MAKE) -C $(LINUX_OUTPUT_DIR) ARCH=$(ARCH) M=${CURDIR} O=$(OUTPUT_DIR) CROSS_COMPILE=$(CROSS_COMPILE) modules
And the object files are stashed in the CURDIR NOT in the OUTPUT_DIR.
What am I missing??
|