|
|
1.1.1.3 root 1: #
2: # if you want the ram-disk device, define this to be the
3: # size in blocks.
4: #
1.1.1.5 ! root 5: #RAMDISK = -DRAMDISK=512
1.1 root 6:
1.1.1.3 root 7: AS86 =as86 -0 -a
8: LD86 =ld86 -0
1.1 root 9:
1.1.1.5 ! root 10: AS =as
! 11: LD =ld
1.1 root 12: LDFLAGS =-s -x -M
1.1.1.3 root 13: CC =gcc $(RAMDISK)
1.1.1.5 ! root 14: CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer
1.1.1.2 root 15: CPP =cpp -nostdinc -Iinclude
1.1 root 16:
1.1.1.3 root 17: #
18: # ROOT_DEV specifies the default root-device when making the image.
19: # This can be either FLOPPY, /dev/xxxx or empty, in which case the
1.1.1.5 ! root 20: # default of FLOPPY is used by 'build'.
1.1.1.3 root 21: #
1.1.1.5 ! root 22: ROOT_DEV=/dev/hdb1
1.1.1.3 root 23:
1.1.1.5 ! root 24: ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o
! 25: FILESYSTEMS =fs/minix/minix.o
! 26: DRIVERS =kernel/blk_drv/blk_drv.a kernel/chr_drv/chr_drv.a
! 27: MATH =kernel/math/math.a
! 28: LIBS =lib/lib.a
1.1 root 29:
30: .c.s:
31: $(CC) $(CFLAGS) \
32: -nostdinc -Iinclude -S -o $*.s $<
33: .s.o:
34: $(AS) -c -o $*.o $<
35: .c.o:
36: $(CC) $(CFLAGS) \
37: -nostdinc -Iinclude -c -o $*.o $<
38:
39: all: Image
40:
1.1.1.2 root 41: Image: boot/bootsect boot/setup tools/system tools/build
1.1.1.5 ! root 42: tools/build boot/bootsect boot/setup tools/system $(ROOT_DEV) > Image
1.1 root 43: sync
44:
1.1.1.3 root 45: disk: Image
46: dd bs=8192 if=Image of=/dev/PS0
47:
1.1 root 48: tools/build: tools/build.c
49: $(CC) $(CFLAGS) \
50: -o tools/build tools/build.c
51:
52: boot/head.o: boot/head.s
53:
54: tools/system: boot/head.o init/main.o \
1.1.1.5 ! root 55: $(ARCHIVES) $(FILESYSTEMS) $(DRIVERS) $(MATH) $(LIBS)
1.1 root 56: $(LD) $(LDFLAGS) boot/head.o init/main.o \
57: $(ARCHIVES) \
1.1.1.5 ! root 58: $(FILESYSTEMS) \
1.1.1.2 root 59: $(DRIVERS) \
1.1.1.3 root 60: $(MATH) \
1.1 root 61: $(LIBS) \
62: -o tools/system > System.map
63:
1.1.1.3 root 64: kernel/math/math.a:
65: (cd kernel/math; make)
66:
1.1.1.2 root 67: kernel/blk_drv/blk_drv.a:
68: (cd kernel/blk_drv; make)
69:
70: kernel/chr_drv/chr_drv.a:
71: (cd kernel/chr_drv; make)
72:
1.1 root 73: kernel/kernel.o:
74: (cd kernel; make)
75:
76: mm/mm.o:
77: (cd mm; make)
78:
79: fs/fs.o:
80: (cd fs; make)
81:
1.1.1.5 ! root 82: fs/minix/minix.o:
! 83: (cd fs/minix; make)
! 84:
1.1 root 85: lib/lib.a:
86: (cd lib; make)
87:
1.1.1.3 root 88: boot/setup: boot/setup.s
89: $(AS86) -o boot/setup.o boot/setup.s
90: $(LD86) -s -o boot/setup boot/setup.o
91:
1.1.1.4 root 92: boot/setup.s: boot/setup.S include/linux/config.h
93: $(CPP) -traditional boot/setup.S -o boot/setup.s
94:
95: boot/bootsect.s: boot/bootsect.S include/linux/config.h
96: $(CPP) -traditional boot/bootsect.S -o boot/bootsect.s
97:
1.1.1.3 root 98: boot/bootsect: boot/bootsect.s
99: $(AS86) -o boot/bootsect.o boot/bootsect.s
100: $(LD86) -s -o boot/bootsect boot/bootsect.o
101:
1.1 root 102: clean:
1.1.1.4 root 103: rm -f Image System.map tmp_make core boot/bootsect boot/setup \
1.1.1.5 ! root 104: boot/bootsect.s boot/setup.s init/main.s
1.1.1.3 root 105: rm -f init/*.o tools/system tools/build boot/*.o
1.1 root 106: (cd mm;make clean)
107: (cd fs;make clean)
108: (cd kernel;make clean)
109: (cd lib;make clean)
110:
111: backup: clean
1.1.1.3 root 112: (cd .. ; tar cf - linux | compress - > backup.Z)
1.1 root 113: sync
114:
115: dep:
116: sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
117: (for i in init/*.c;do echo -n "init/";$(CPP) -M $$i;done) >> tmp_make
118: cp tmp_make Makefile
119: (cd fs; make dep)
120: (cd kernel; make dep)
121: (cd mm; make dep)
122:
123: ### Dependencies:
124: init/main.o : init/main.c include/unistd.h include/sys/stat.h \
1.1.1.4 root 125: include/sys/types.h include/sys/time.h include/time.h include/sys/times.h \
126: include/sys/utsname.h include/sys/param.h include/sys/resource.h \
127: include/utime.h include/linux/tty.h include/termios.h include/linux/sched.h \
128: include/linux/head.h include/linux/fs.h include/linux/mm.h \
129: include/linux/kernel.h include/signal.h include/asm/system.h \
130: include/asm/io.h include/stddef.h include/stdarg.h include/fcntl.h \
131: include/string.h
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.