Makefile 864 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
.s.o:
Linus Torvalds's avatar
Linus Torvalds committed
15
	$(AS) -o $*.o $<
16
.c.o:
17 18
	$(CC) $(CFLAGS) -c $<

Linus Torvalds's avatar
Linus Torvalds committed
19 20
OBJS  = sched.o dma.o fork.o exec_domain.o panic.o printk.o vsprintf.o sys.o \
	module.o ksyms.o exit.o signal.o itimer.o info.o time.o softirq.o
21

Linus Torvalds's avatar
Linus Torvalds committed
22
all: kernel.o
23

24 25 26 27
kernel.o: $(OBJS)
	$(LD) -r -o kernel.o $(OBJS)
	sync

28
sched.o: sched.c
29
	$(CC) $(CFLAGS) $(PROFILING) -fno-omit-frame-pointer -c $<
30

31
dep:
32
	$(CPP) -M *.c > .depend
33 34

dummy:
Linus Torvalds's avatar
Linus Torvalds committed
35
modules:
36

37 38 39 40 41 42 43
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif