[IMPROVE] Implement new build system
authorAlexander Aksenov <a.aksenov@samsung.com>
Sun, 14 Jul 2013 15:13:15 +0000 (19:13 +0400)
committerAlexander Aksenov <a.aksenov@samsung.com>
Sun, 14 Jul 2013 15:13:15 +0000 (19:13 +0400)
12 files changed:
buffer/Makefile [new file with mode: 0644]
driver_new/Makefile [new file with mode: 0644]
kprobe/Makefile [new file with mode: 0644]
ks_features/Makefile [new file with mode: 0644]
ksyms/Makefile [new file with mode: 0644]
parser/Makefile [new file with mode: 0644]
sampler/Makefile [new file with mode: 0644]
uprobe/Makefile [new file with mode: 0644]
us_manager/Makefile [new file with mode: 0644]
writer/Makefile [new file with mode: 0644]
writer/kernel_operations.c
writer/kernel_operations.h

diff --git a/buffer/Makefile b/buffer/Makefile
new file mode 100644 (file)
index 0000000..785478e
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := swap_buffer.o swap_buffer_module.o buffer_queue.o
+MODULE_NAME=buffer
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/driver_new/Makefile b/driver_new/Makefile
new file mode 100644 (file)
index 0000000..5e96545
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := swap_driver.o swap_driver.mod.c swap_driver.mod.o swap_driver_module.o device_driver.o driver_to_buffer.o
+MODULE_NAME=driver_new
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/kprobe/Makefile b/kprobe/Makefile
new file mode 100644 (file)
index 0000000..bd91ac1
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := dbi_kprobes_deps.o dbi_insn_slots.o arch/asm/dbi_kprobes.o dbi_kprobes.o arch/asm/trampoline_arm.o
+MODULE_NAME=kprobe
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/ks_features/Makefile b/ks_features/Makefile
new file mode 100644 (file)
index 0000000..b846f3b
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := swap_ks_features.o ks_features.o
+MODULE_NAME=ks_features
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/ksyms/Makefile b/ksyms/Makefile
new file mode 100644 (file)
index 0000000..15331ad
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := ksyms.o swap_ksyms.o
+MODULE_NAME=ksyms
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/parser/Makefile b/parser/Makefile
new file mode 100644 (file)
index 0000000..83e8188
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := swap_msg_parser.o msg_parser.o msg_buf.o msg_cmd.o features.o us_inst.o swap_message_parser.o
+MODULE_NAME=parser
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/sampler/Makefile b/sampler/Makefile
new file mode 100644 (file)
index 0000000..45b5541
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := swap_sampler.o swap_sampler_module.o
+MODULE_NAME=sampler
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/uprobe/Makefile b/uprobe/Makefile
new file mode 100644 (file)
index 0000000..142d6c2
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := swap_uprobe.o swap_uprobes.o arch/asm/swap_uprobes.o arch/asm/trampoline_thumb.o
+MODULE_NAME=uprobe
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/us_manager/Makefile b/us_manager/Makefile
new file mode 100644 (file)
index 0000000..8069739
--- /dev/null
@@ -0,0 +1,11 @@
+KERNEL_OBJECTS := swap_us_manager.o us_manager.o us_slot_manager.o helper.o \
+                  sspt/ip.o sspt/sspt_page.o sspt/sspt_file.o sspt/sspt_proc.o \
+                  pf/proc_filters.o pf/pf_group.o \
+                  img/img_proc.o img/img_file.o img/img_ip.o
+MODULE_NAME=us_manager
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
diff --git a/writer/Makefile b/writer/Makefile
new file mode 100644 (file)
index 0000000..3c86a95
--- /dev/null
@@ -0,0 +1,8 @@
+KERNEL_OBJECTS := swap_writer.o swap_writer_module.o
+MODULE_NAME=writer
+
+all:
+       make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNEL) SUBDIRS=$(TOP)/$(MODULE_NAME) extra_cflags=-I$(TOP) modules
+
+clean:
+       @for f in $(KERNEL_OBJECTS) ; do rm $(TOP)/$(MODULE_NAME)/$$f ; done
index f62d991..572e2cc 100644 (file)
@@ -31,7 +31,7 @@ int get_args(unsigned long args[], int cnt, struct pt_regs *regs)
 
        arg_in_regs = cnt < 3 ? cnt : 3;
 
-#if define(CONFIG_ARM)
+#if defined(CONFIG_ARM)
 
        /* All args, except first 4, are passed on the stack */
        stack_args = 4;
@@ -49,7 +49,7 @@ int get_args(unsigned long args[], int cnt, struct pt_regs *regs)
        }
 
 
-#elif define(CONFIG_X86_32)
+#elif defined(CONFIG_X86_32)
 
        if (user_mode(regs)) {
                /* If we're in user mode on x86 arch, get arguments from stack */
index 00a0863..a593c39 100644 (file)
@@ -45,7 +45,7 @@
 
 /* ARCH-DEPENDED OPERATIONS */
 
-#if define(CONFIG_ARM)
+#if defined(CONFIG_ARM)
 
 #define get_regs_ip(regs)           regs->ARM_pc
 #define get_regs_ret_func(regs)     regs->ARM_lr
@@ -56,7 +56,7 @@
 #define get_regs_r2(regs)           regs->ARM_r2
 #define get_regs_r3(regs)           regs->ARM_r3
 
-#elif define(CONFIG_X86_32)
+#elif defined(CONFIG_X86_32)
 
 #define get_regs_ip(regs)           regs->ip
 #define get_regs_ret_func(regs)     regs->bp + 8