Makefile 954 Bytes
Newer Older
1
#
2
# Makefile for the linux kernel.
3 4 5 6 7
#
# 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).
#
8
# Note 2! The CFLAGS definitions are now in the main makefile...
9

10 11
.S.s:
	$(CPP) -traditional $< -o $*.s
12
.c.s:
13
	$(CC) $(CFLAGS) -S $<
14 15 16
.s.o:
	$(AS) -c -o $*.o $<
.c.o:
17 18
	$(CC) $(CFLAGS) -c $<

19
OBJS  = sched.o sys_call.o traps.o irq.o dma.o fork.o \
Linus Torvalds's avatar
Linus Torvalds committed
20
 	panic.o printk.o vsprintf.o sys.o module.o ksyms.o exit.o \
Linus Torvalds's avatar
Linus Torvalds committed
21
	signal.o ptrace.o ioport.o itimer.o \
Linus Torvalds's avatar
Linus Torvalds committed
22
	info.o ldt.o time.o tqueue.o vm86.o
23

Linus Torvalds's avatar
Linus Torvalds committed
24
all: kernel.o
25

26 27 28 29
kernel.o: $(OBJS)
	$(LD) -r -o kernel.o $(OBJS)
	sync

30 31 32 33
sys_call.s: sys_call.S

sys_call.o: sys_call.s

34
sched.o: sched.c
35
	$(CC) $(CFLAGS) $(PROFILING) -fno-omit-frame-pointer -c $<
36

37
dep:
38
	$(CPP) -M *.c > .depend
39 40

dummy:
41

42 43 44 45 46 47 48
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif