summaryrefslogtreecommitdiff
path: root/arch/um/sys-ppc/Makefile
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /arch/um/sys-ppc/Makefile
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'arch/um/sys-ppc/Makefile')
-rw-r--r--arch/um/sys-ppc/Makefile65
1 files changed, 65 insertions, 0 deletions
diff --git a/arch/um/sys-ppc/Makefile b/arch/um/sys-ppc/Makefile
new file mode 100644
index 00000000..20d363bd
--- /dev/null
+++ b/arch/um/sys-ppc/Makefile
@@ -0,0 +1,65 @@
+OBJ = built-in.o
+
+.S.o:
+ $(CC) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
+
+OBJS = ptrace.o sigcontext.o checksum.o miscthings.o misc.o \
+ ptrace_user.o sysrq.o
+
+asflags-y := -DCONFIG_PPC32 -I. -I$(srctree)/arch/ppc/kernel
+
+all: $(OBJ)
+
+$(OBJ): $(OBJS)
+ rm -f $@
+ $(LD) $(LINKFLAGS) --start-group $^ --end-group -o $@
+
+ptrace_user.o: ptrace_user.c
+ $(CC) -D__KERNEL__ $(USER_CFLAGS) $(ccflags-y) -c -o $@ $<
+
+sigcontext.o: sigcontext.c
+ $(CC) $(USER_CFLAGS) $(ccflags-y) -c -o $@ $<
+
+checksum.S:
+ rm -f $@
+ ln -s $(srctree)/arch/ppc/lib/$@ $@
+
+mk_defs.c:
+ rm -f $@
+ ln -s $(srctree)/arch/ppc/kernel/$@ $@
+
+ppc_defs.head:
+ rm -f $@
+ ln -s $(srctree)/arch/ppc/kernel/$@ $@
+
+ppc_defs.h: mk_defs.c ppc_defs.head \
+ $(srctree)/include/asm-ppc/mmu.h \
+ $(srctree)/include/asm-ppc/processor.h \
+ $(srctree)/include/asm-ppc/pgtable.h \
+ $(srctree)/include/asm-ppc/ptrace.h
+# $(CC) $(CFLAGS) -S mk_defs.c
+ cp ppc_defs.head ppc_defs.h
+# for bk, this way we can write to the file even if it's not checked out
+ echo '#define THREAD 608' >> ppc_defs.h
+ echo '#define PT_REGS 8' >> ppc_defs.h
+ echo '#define CLONE_VM 256' >> ppc_defs.h
+# chmod u+w ppc_defs.h
+# grep '^#define' mk_defs.s >> ppc_defs.h
+# rm mk_defs.s
+
+# the asm link is horrible, and breaks the other targets. This is also
+# not going to work with parallel makes.
+
+checksum.o: checksum.S
+ rm -f asm
+ ln -s $(srctree)/include/asm-ppc asm
+ $(CC) $(asflags-y) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
+ rm -f asm
+
+misc.o: misc.S ppc_defs.h
+ rm -f asm
+ ln -s $(srctree)/include/asm-ppc asm
+ $(CC) $(asflags-y) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
+ rm -f asm
+
+clean-files := $(OBJS) ppc_defs.h checksum.S mk_defs.c