|
|
1.1 root 1: #
2: # Makefile for linux.
3: # If you don't have '-mstring-insns' in your gcc (and nobody but me has :-)
4: # remove them from the CFLAGS defines.
5: #
6:
1.1.1.2 root 7: AS86 =as86 -0
8: CC86 =cc86 -0
9: LD86 =ld86 -0
1.1 root 10:
1.1.1.3 ! root 11: AS =as
! 12: LD =ld
! 13: LDFLAGS =-s -x -M -Ttext 0 -e startup_32
1.1 root 14: CC =gcc
1.1.1.3 ! root 15: CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -fno-stack-protector
1.1 root 16: CPP =gcc -E -nostdinc -Iinclude
17:
18: ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o
19: LIBS =lib/lib.a
20:
21: .c.s:
22: $(CC) $(CFLAGS) \
23: -nostdinc -Iinclude -S -o $*.s $<
24: .s.o:
1.1.1.3 ! root 25: $(AS) -o $*.o $<
1.1 root 26: .c.o:
27: $(CC) $(CFLAGS) \
28: -nostdinc -Iinclude -c -o $*.o $<
29:
30: all: Image
31:
32: Image: boot/boot tools/system tools/build
1.1.1.3 ! root 33: objcopy -O binary -R .note -R .comment tools/system tools/system.bin
! 34: tools/build boot/boot tools/system.bin > Image
1.1.1.2 root 35: # sync
1.1 root 36:
37: tools/build: tools/build.c
1.1.1.3 ! root 38: $(CC) $(CFLAGS) \
! 39: -o tools/build tools/build.c
1.1.1.2 root 40: #chmem +65000 tools/build
1.1 root 41:
42: boot/head.o: boot/head.s
43:
44: tools/system: boot/head.o init/main.o \
45: $(ARCHIVES) $(LIBS)
46: $(LD) $(LDFLAGS) boot/head.o init/main.o \
47: $(ARCHIVES) \
48: $(LIBS) \
49: -o tools/system > System.map
50:
51: kernel/kernel.o:
52: (cd kernel; make)
53:
54: mm/mm.o:
55: (cd mm; make)
56:
57: fs/fs.o:
58: (cd fs; make)
59:
60: lib/lib.a:
61: (cd lib; make)
62:
63: boot/boot: boot/boot.s tools/system
64: (echo -n "SYSSIZE = (";ls -l tools/system | grep system \
1.1.1.2 root 65: | cut -c31-37 | tr '\012' ' '; echo "+ 15 ) / 16") > tmp.s
1.1 root 66: cat boot/boot.s >> tmp.s
67: $(AS86) -o boot/boot.o tmp.s
68: rm -f tmp.s
69: $(LD86) -s -o boot/boot boot/boot.o
70:
71: clean:
72: rm -f Image System.map tmp_make boot/boot core
1.1.1.3 ! root 73: rm -f init/*.o boot/*.o tools/system tools/build tools/system.bin
1.1 root 74: (cd mm;make clean)
75: (cd fs;make clean)
76: (cd kernel;make clean)
77: (cd lib;make clean)
78:
79: backup: clean
80: (cd .. ; tar cf - linux | compress16 - > backup.Z)
1.1.1.2 root 81: # sync
1.1 root 82:
83: dep:
84: sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
85: (for i in init/*.c;do echo -n "init/";$(CPP) -M $$i;done) >> tmp_make
86: cp tmp_make Makefile
87: (cd fs; make dep)
88: (cd kernel; make dep)
89: (cd mm; make dep)
90:
91: ### Dependencies:
92: init/main.o : init/main.c include/unistd.h include/sys/stat.h \
93: include/sys/types.h include/sys/times.h include/sys/utsname.h \
94: include/utime.h include/time.h include/linux/tty.h include/termios.h \
95: include/linux/sched.h include/linux/head.h include/linux/fs.h \
96: include/linux/mm.h include/asm/system.h include/asm/io.h include/stddef.h \
97: include/stdarg.h include/fcntl.h
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.