Require a Makefile for kernel module programs
I have created 3 modules yesterday where main.c modules uses function exported by exporting_module1.c
Also exporting_module1.c uses function exported by exporting_module2.c?
I am not getting how to write a Makefile for that can anybody help me?
what error i get when write a makefile is that
error: syntax error before "this_object_must_be_defined_as_export_objs_in_the_Makefile"
warning: data definition has no type or storage class
these are the errors that occur because of adding statement EXPORT_SYMBOL(exporting_fun1);
What i try to write a Makefile is
KERNELDIR = /usr/src/linux-2.4.22-1.2115.nptl
CFLAGS = -I$(KERNELDIR)/include -Wall
all: all.o
export-objs =: exporting_module1.o exporting_module2.o
all.o: using_module.o exporting_module1.o exporting_module2.o exporting_module1.h exporting_module2.h
$(LD) -r $^ -o $@
clean:
rm -f *.o *~ core
This makefile is not working???
|