1#
2# Makefile for the linux kernel.
3#
4# Note! Dependencies are done automagically by 'make dep', which also
5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file).
7#
8# Note 2! The CFLAGS definitions are now in the main makefile...
9
10USE_STANDARD_AS_RULE    := true
11
12EXTRA_CFLAGS = -mno-minimal-toc
13
14KHEAD := head.o
15
16all: $(KHEAD) kernel.o
17
18O_TARGET := kernel.o
19
20export-objs         := ppc_ksyms.o setup.o
21
22obj-y               :=	ppc_ksyms.o setup.o entry.o traps.o irq.o idle.o \
23			time.o process.o signal.o syscalls.o misc.o ptrace.o \
24			align.o semaphore.o bitops.o stab.o htab.o pacaData.o \
25			LparData.o udbg.o binfmt_elf32.o sys_ppc32.o sys32.o \
26			ioctl32.o ptrace32.o signal32.o open_pic.o xics.o \
27			pmc.o mf_proc.o proc_pmc.o proc_pcifr.o iSeries_setup.o \
28			ItLpQueue.o hvCall.o mf.o HvLpEvent.o ras.o \
29			iSeries_proc.o HvCall.o flight_recorder.o HvLpConfig.o \
30			rtc.o perfmon.o
31
32obj-$(CONFIG_PCI) +=  pci.o pci_dn.o pci_dma.o pSeries_lpar.o pSeries_hvCall.o
33
34ifeq ($(CONFIG_PPC_ISERIES),y)
35obj-$(CONFIG_PCI) += iSeries_pci.o iSeries_pci_reset.o iSeries_IoMmTable.o iSeries_irq.o iSeries_VpdInfo.o XmPciLpEvent.o 
36endif
37ifeq ($(CONFIG_PPC_PSERIES),y)
38obj-$(CONFIG_PCI) += pSeries_pci.o eeh.o
39
40obj-y += rtasd.o nvram.o
41endif
42
43obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
44
45obj-$(CONFIG_KGDB) += ppc-stub.o
46
47obj-$(CONFIG_SMP) += smp.o
48
49obj-y += prom.o lmb.o rtas.o rtas-proc.o chrp_setup.o i8259.o
50
51include $(TOPDIR)/Rules.make
52
53#
54# This is just to get the dependencies...
55#
56
57head.o: head.S ppc_defs.h
58
59ppc_defs.h: mk_defs.c ppc_defs.head \
60		$(TOPDIR)/include/asm/mmu.h \
61		$(TOPDIR)/include/asm/processor.h \
62		$(TOPDIR)/include/asm/pgtable.h \
63		$(TOPDIR)/include/asm/ptrace.h
64	$(CC) $(CFLAGS) -S mk_defs.c
65	cp ppc_defs.head ppc_defs.h
66# for bk, this way we can write to the file even if it's not checked out
67	chmod u+w ppc_defs.h
68	grep '^#define' mk_defs.s >> ppc_defs.h
69	rm mk_defs.s
70
71checks: checks.c
72	$(HOSTCC) -I$(HPATH) $(HOSTCFLAGS) -D__KERNEL__ -fno-builtin -o checks checks.c
73	./checks
74