File: Makefile

package info (click to toggle)
kernel-source-2.0.32 2.0.32-5
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 29,648 kB
  • ctags: 86,850
  • sloc: ansic: 542,141; asm: 26,201; makefile: 3,423; sh: 1,195; perl: 727; tcl: 408; cpp: 277; lisp: 211; awk: 134
file content (71 lines) | stat: -rw-r--r-- 1,622 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...

#.S.s:
#	$(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s

ifdef SMP
.S.o:
	$(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c $< -o $*.o
else
.S.o:
	$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
endif

all: kernel.o head.o

O_TARGET := kernel.o
O_OBJS   := process.o signal.o entry.o traps.o irq.o vm86.o bios32.o \
            ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o ksyms.o

ifdef CONFIG_MCA
O_OBJS += mca.o
endif

ifdef SMP

O_OBJS += smp.o

head.o: head.S $(TOPDIR)/include/linux/tasks.h
	$(CC) -D__ASSEMBLY__ -D__SMP__ -traditional -c $*.S -o $*.o

else

head.o: head.S $(TOPDIR)/include/linux/tasks.h
	$(CC) -D__ASSEMBLY__ -traditional -c $*.S -o $*.o

endif

hexify:
	$(HOSTCC) hexify.c -o hexify

smp.c: trampoline.hex

trampoline.hex: trampoline hexify
	(dd if=trampoline bs=1 skip=32 | ./hexify >trampoline.hex )

trampoline: trampoline.o trampoline32.o
	$(LD86) -s -o $@ trampoline.o trampoline32.o

trampoline.o: trampoline.s
	$(AS86) -o $@ $<

trampoline32.o: trampoline32.s
	$(AS386) -o $@ $<

trampoline.s: trampoline.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
	$(CPP) -D__SMP__ -traditional $< -o $@

trampoline32.s: trampoline32.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Makefile
	$(CPP) -D__SMP__ -traditional $< -o $@

clean:
	rm -f trampoline hexify

include $(TOPDIR)/Rules.make