-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (31 loc) · 839 Bytes
/
Makefile
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
CC =gcc
CFLAGS =-O -Wall -m32 -march=i386 -fomit-frame-pointer\
-finline-functions -nostdinc -I../include -fstack-protector-explicit -fno-pic -g
AS =as
AR =ar
LD =ld
LDFLAGS =-m elf_i386 -r
CPP =gcc -E -nostdinc -I../include
.c.o:
$(CC) $(CFLAGS) \
-c $< -o $*.o
.s.o:
$(AS) --32 -march=i386 $< -o $*.o
.c.s:
$(CC) $(CFLAGS) \
-S $< -o $*.s
OBJS = memory.o page.o
all: mm.o
mm.o: $(OBJS)
$(LD) $(LDFLAGS) -o mm.o $(OBJS)
clean:
rm -f core *.o *.a tmp_make
for i in *.c;do rm -f `basename $$i .c`.s;done
dep:
sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
(for i in *.c;do $(CPP) -M $$i;done) >> tmp_make
cp tmp_make Makefile
### Dependencies:
memory.o : memory.c ../include/signal.h ../include/sys/types.h \
../include/linux/config.h ../include/linux/head.h ../include/linux/kernel.h \
../include/asm/system.h