2005-04-16 22:20:36 +00:00
|
|
|
OBJ = built-in.o
|
|
|
|
|
|
|
|
.S.o:
|
2007-10-15 19:59:31 +00:00
|
|
|
$(CC) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2008-03-08 02:55:58 +00:00
|
|
|
OBJS = ptrace.o sigcontext.o checksum.o miscthings.o misc.o \
|
2005-04-16 22:20:36 +00:00
|
|
|
ptrace_user.o sysrq.o
|
|
|
|
|
2008-02-05 06:31:23 +00:00
|
|
|
EXTRA_AFLAGS := -DCONFIG_PPC32 -I. -I$(srctree)/arch/ppc/kernel
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
all: $(OBJ)
|
|
|
|
|
|
|
|
$(OBJ): $(OBJS)
|
|
|
|
rm -f $@
|
|
|
|
$(LD) $(LINKFLAGS) --start-group $^ --end-group -o $@
|
|
|
|
|
|
|
|
ptrace_user.o: ptrace_user.c
|
|
|
|
$(CC) -D__KERNEL__ $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
sigcontext.o: sigcontext.c
|
|
|
|
$(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
checksum.S:
|
|
|
|
rm -f $@
|
2008-02-05 06:31:23 +00:00
|
|
|
ln -s $(srctree)/arch/ppc/lib/$@ $@
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
mk_defs.c:
|
|
|
|
rm -f $@
|
2008-02-05 06:31:23 +00:00
|
|
|
ln -s $(srctree)/arch/ppc/kernel/$@ $@
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
ppc_defs.head:
|
|
|
|
rm -f $@
|
2008-02-05 06:31:23 +00:00
|
|
|
ln -s $(srctree)/arch/ppc/kernel/$@ $@
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
ppc_defs.h: mk_defs.c ppc_defs.head \
|
2008-02-05 06:31:23 +00:00
|
|
|
$(srctree)/include/asm-ppc/mmu.h \
|
|
|
|
$(srctree)/include/asm-ppc/processor.h \
|
|
|
|
$(srctree)/include/asm-ppc/pgtable.h \
|
|
|
|
$(srctree)/include/asm-ppc/ptrace.h
|
2005-04-16 22:20:36 +00:00
|
|
|
# $(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
|
2008-02-05 06:31:23 +00:00
|
|
|
ln -s $(srctree)/include/asm-ppc asm
|
2007-10-15 19:59:31 +00:00
|
|
|
$(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
|
2005-04-16 22:20:36 +00:00
|
|
|
rm -f asm
|
|
|
|
|
|
|
|
misc.o: misc.S ppc_defs.h
|
|
|
|
rm -f asm
|
2008-02-05 06:31:23 +00:00
|
|
|
ln -s $(srctree)/include/asm-ppc asm
|
2007-10-15 19:59:31 +00:00
|
|
|
$(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
|
2005-04-16 22:20:36 +00:00
|
|
|
rm -f asm
|
|
|
|
|
2008-03-08 02:55:58 +00:00
|
|
|
clean-files := $(OBJS) ppc_defs.h checksum.S mk_defs.c
|