Added modules build
authorNikita Kalyazin <n.kalyazin@samsung.com>
Tue, 6 Jul 2010 11:54:57 +0000 (15:54 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Tue, 6 Jul 2010 11:54:57 +0000 (15:54 +0400)
driver/Kbuild
driver/Makefile [new file with mode: 0644]
driver/Makefile.am [new file with mode: 0644]
driver/device_driver.h
driver/ec.h
driver/module.h
driver/probes_manager.h
driver/storage.h
kprobe/Kbuild
kprobe/Makefile
kprobe/Makefile.am [new file with mode: 0644]

index ef58237..84ae4b0 100644 (file)
@@ -1,21 +1,4 @@
-include $(project_pwd)/common.mk
+EXTRA_CFLAGS := -I$(src)/../../common -I$(src)/../../profile -DEC_ARCH_$(ARCH)
 
-program_name := $(driver_name)
-source_dirs := $(project_pwd)/$(src_path)/$(driver_path)
-include_dirs := $(project_pwd)/$(src_path)/$(common_path) \
-       $(project_pwd)/$(src_path)/$(probes_path)
-include_libs := 
-special_defines := EC_ARCH_$(target_cpu)
-ifeq ($(specific_target), chelsea)
-    special_defines += KERNEL_HAS_ISPAGEPRESENT
-endif
-special_compiling_flags := 
-special_linking_flags := 
-ifeq ($(memory_checker), yes)
-special_defines += MEMORY_CHECKER
-endif
-ifeq ($(thread_profiler), yes)
-special_defines += THREAD_PROFILER
-endif
-
-include $(project_pwd)/rules-m.mk
+obj-m := inperfa_driver.o
+inperfa_driver-y := device_driver.o ec.o legacy.o module.o probes.o probes_manager.o storage.o us_proc_inst.o
diff --git a/driver/Makefile b/driver/Makefile
new file mode 100644 (file)
index 0000000..f2dedce
--- /dev/null
@@ -0,0 +1,8 @@
+target_kernel_src="/home/kain/dev/inperfa/kernel/tegra/linux-2.6.29-tegra250-9.12.8"
+driver_module_dir=$(realpath $(top_srcdir)/src/modules/driver)
+
+all-local:
+       $(MAKE) $(AM_MAKEFLAGS) -C $(target_kernel_src) M=$(driver_module_dir) modules
+
+clean-local:
+       $(MAKE) $(AM_MAKEFLAGS) -C $(target_kernel_src) M=$(driver_module_dir) clean
diff --git a/driver/Makefile.am b/driver/Makefile.am
new file mode 100644 (file)
index 0000000..2b0b5ab
--- /dev/null
@@ -0,0 +1 @@
+include Makefile
index b966dd3..07cd467 100644 (file)
@@ -17,7 +17,6 @@
 #if !defined(device_driver_h)
 #define device_driver_h
 
-#include "event.h"             // event_id_t
 #include "ec_info.h"           // ec_info_t
 #include "ec_probe.h"          // probe_id_t
 
index 04f57ba..5ef3358 100644 (file)
@@ -19,7 +19,6 @@
 
 #include "ec_ioctl.h"
 #include "ec_info.h"
-#include "ec_module.h"
 #include "ec_probe.h"
 #include "picl.h"
 
index d4f9acb..c6d8415 100644 (file)
 
 #include "debug.h"
 #include "ec.h"
-#include "event.h"
 #include "legacy.h"
 #include "storage.h"
 #include "us_proc_inst.h"
 #include "device_driver.h"
 #include "probes_manager.h"
 #include "probes.h"
-#include "stdfunc.h"
 
 typedef unsigned long (*fp_kallsyms_lookup_name_t) (const char *name);
 extern int fp_kallsyms_lookup_name;
index 7438f80..734c94b 100644 (file)
@@ -17,9 +17,7 @@
 #if !defined(__PROBES_MANAGER_H__)
 #define __PROBES_MANAGER_H__
 
-#include "ec_module.h"
 #include "ec_probe.h"
-#include "ec_module.h"
 #include "probes.h"
 
 typedef struct
index 9dbf65f..8865e8d 100644 (file)
@@ -21,7 +21,6 @@
 #include "picl.h"
 #include "ec_ioctl.h"
 #include "ec_probe.h"
-#include "ec_module.h"
 #include "probes_manager.h"
 #include "probes.h"
 #include "event_tmpl.h"
index 8b87086..21d9cb5 100644 (file)
@@ -1,14 +1,2 @@
-include $(project_pwd)/common.mk
-
-program_name := $(kprobe_name)
-source_dirs := $(project_pwd)/$(src_path)/$(kprobe_path)
-include_dirs := 
-include_libs := 
-special_defines := CONFIG_KPROBES
-ifeq ($(specific_target), chelsea)
-    special_defines += KERNEL_HAS_ISPAGEPRESENT
-endif
-special_compiling_flags := 
-special_linking_flags := 
-
-include $(project_pwd)/rules-m.mk
+obj-m := inperfa_kprobes.o
+inperfa_kprobes-y := kprobes_arch.o kprobes.o
index 0da2ef7..2513d5b 100644 (file)
@@ -1,16 +1,9 @@
-include $(project_pwd)/common.mk
+target_kernel_src="/home/kain/dev/inperfa/kernel/tegra/linux-2.6.29-tegra250-9.12.8"
+kprobes_module_dir=$(realpath $(top_srcdir)/src/modules/kprobe)
 
-help:
-       @$(MAKE) ARCH=$(target_cpu) CROSS_COMPILE=$(target_compiler_prefix) -C $(target_kernel_src) \
-               M=$(project_pwd)/$(src_path)/$(kprobe_path) \
-               project_pwd=$(project_pwd) help
+all-local:
+       echo "kprobes_module_dir = $(kprobes_module_dir)"
+       $(MAKE) $(AM_MAKEFLAGS) -C $(target_kernel_src) M=$(kprobes_module_dir) modules
 
-build:
-       @$(MAKE) ARCH=$(target_cpu) CROSS_COMPILE=$(target_compiler_prefix) -C $(target_kernel_src) \
-               M=$(project_pwd)/$(src_path)/$(kprobe_path) \
-               project_pwd=$(project_pwd) modules
-
-clean:
-       @$(MAKE) ARCH=$(target_cpu) CROSS_COMPILE=$(target_compiler_prefix) -C $(target_kernel_src) \
-               M=$(project_pwd)/$(src_path)/$(kprobe_path) \
-               project_pwd=$(project_pwd) clean
+clean-local:
+       $(MAKE) $(AM_MAKEFLAGS) -C $(target_kernel_src) M=$(kprobes_module_dir) clean
diff --git a/kprobe/Makefile.am b/kprobe/Makefile.am
new file mode 100644 (file)
index 0000000..2b0b5ab
--- /dev/null
@@ -0,0 +1 @@
+include Makefile