Blame view

arch/um/sys-ppc/Makefile 1.68 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
  OBJ = built-in.o
  
  .S.o:
222d394d3   Sam Ravnborg   kbuild: enable 'm...
4
  	$(CC) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
5

64ac24e73   Matthew Wilcox   Generic semaphore...
6
  OBJS = ptrace.o sigcontext.o checksum.o miscthings.o misc.o \
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
7
  	ptrace_user.o sysrq.o
9b8c24fac   matt mooney   um: change to new...
8
  asflags-y := -DCONFIG_PPC32 -I. -I$(srctree)/arch/ppc/kernel
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
9
10
11
12
13
14
15
16
  
  all: $(OBJ)
  
  $(OBJ): $(OBJS)
  	rm -f $@
  	$(LD) $(LINKFLAGS) --start-group $^ --end-group -o $@
  
  ptrace_user.o: ptrace_user.c
9b8c24fac   matt mooney   um: change to new...
17
  	$(CC) -D__KERNEL__ $(USER_CFLAGS) $(ccflags-y) -c -o $@ $<
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
18
19
  
  sigcontext.o: sigcontext.c
9b8c24fac   matt mooney   um: change to new...
20
  	$(CC) $(USER_CFLAGS) $(ccflags-y) -c -o $@ $<
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
21

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
22
23
  checksum.S:
  	rm -f $@
47afa1d5f   WANG Cong   uml: remove TOPDIR
24
  	ln -s $(srctree)/arch/ppc/lib/$@ $@
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
25
26
27
  
  mk_defs.c:
  	rm -f $@
47afa1d5f   WANG Cong   uml: remove TOPDIR
28
  	ln -s $(srctree)/arch/ppc/kernel/$@ $@
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
29
30
31
  
  ppc_defs.head:
  	rm -f $@
47afa1d5f   WANG Cong   uml: remove TOPDIR
32
  	ln -s $(srctree)/arch/ppc/kernel/$@ $@
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
33
34
  
  ppc_defs.h: mk_defs.c ppc_defs.head \
47afa1d5f   WANG Cong   uml: remove TOPDIR
35
36
37
38
  		$(srctree)/include/asm-ppc/mmu.h \
  		$(srctree)/include/asm-ppc/processor.h \
  		$(srctree)/include/asm-ppc/pgtable.h \
  		$(srctree)/include/asm-ppc/ptrace.h
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
  #	$(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
47afa1d5f   WANG Cong   uml: remove TOPDIR
54
  	ln -s $(srctree)/include/asm-ppc asm
9b8c24fac   matt mooney   um: change to new...
55
  	$(CC) $(asflags-y) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
56
57
58
59
  	rm -f asm
  
  misc.o: misc.S ppc_defs.h
  	rm -f asm
47afa1d5f   WANG Cong   uml: remove TOPDIR
60
  	ln -s $(srctree)/include/asm-ppc asm
9b8c24fac   matt mooney   um: change to new...
61
  	$(CC) $(asflags-y) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
62
  	rm -f asm
64ac24e73   Matthew Wilcox   Generic semaphore...
63
  clean-files := $(OBJS) ppc_defs.h checksum.S mk_defs.c