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 vio.o viopath.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 cputable.o vio.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
36obj-$(CONFIG_VIOPATH) += viopath.o
37endif
38ifeq ($(CONFIG_PPC_PSERIES),y)
39obj-$(CONFIG_PCI) += pSeries_pci.o eeh.o
40
41obj-y += nvram.o rtasd.o
42endif
43
44obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
45
46obj-$(CONFIG_SCANLOG) += scanlog.o
47
48obj-$(CONFIG_LPARCFG) += lparcfg.o
49
50obj-$(CONFIG_KGDB) += ppc-stub.o
51
52obj-$(CONFIG_SMP) += smp.o
53
54obj-y += prom.o lmb.o rtas.o rtas-proc.o chrp_setup.o i8259.o
55
56include $(TOPDIR)/Rules.make
57
58#
59# This is just to get the dependencies...
60#
61
62head.o: head.S ppc_defs.h
63
64ppc_defs.h: mk_defs.c ppc_defs.head \
65		$(TOPDIR)/include/asm/mmu.h \
66		$(TOPDIR)/include/asm/processor.h \
67		$(TOPDIR)/include/asm/pgtable.h \
68		$(TOPDIR)/include/asm/ptrace.h
69	$(CC) $(CFLAGS) -S mk_defs.c
70	cp ppc_defs.head ppc_defs.h
71# for bk, this way we can write to the file even if it's not checked out
72	chmod u+w ppc_defs.h
73	grep '^#define' mk_defs.s >> ppc_defs.h
74	rm mk_defs.s
75
76checks: checks.c
77	$(HOSTCC) -I$(HPATH) $(HOSTCFLAGS) -D__KERNEL__ -fno-builtin -o checks checks.c
78	./checks
79