You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
875 B
39 lines
875 B
3 years ago
|
AR =ar
|
||
|
AS =as
|
||
|
LD =ld
|
||
|
LDFLAGS =-m elf_i386 -Ttext 0 -e startup_32
|
||
|
CC =gcc -march=i386
|
||
|
CFLAGS =-w -g -fstrength-reduce -fomit-frame-pointer -mcld \
|
||
|
-finline-functions -nostdinc -fno-stack-protector -I../include
|
||
|
CPP =gcc -E -nostdinc -I../include
|
||
|
|
||
|
.c.o:
|
||
|
$(CC) $(CFLAGS) \
|
||
|
-c -o $*.o $<
|
||
|
.s.o:
|
||
|
$(AS) -o $*.o $<
|
||
|
.c.s:
|
||
|
$(CC) $(CFLAGS) \
|
||
|
-S -o $*.s $<
|
||
|
|
||
|
OBJS = memory.o page.o
|
||
|
|
||
|
all: mm.o
|
||
|
|
||
|
mm.o: $(OBJS)
|
||
|
$(LD) -r -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/asm/system.h ../include/linux/sched.h ../include/linux/head.h \
|
||
|
../include/linux/fs.h ../include/linux/mm.h ../include/linux/kernel.h
|