Annotation of linux/Makefile, revision 1.1.1.3

1.1.1.3 ! root        1: #
        !             2: # if you want the ram-disk device, define this to be the
        !             3: # size in blocks.
        !             4: #
        !             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: 
                     10: AS     =gas
                     11: LD     =gld
                     12: LDFLAGS        =-s -x -M
1.1.1.3 ! root       13: CC     =gcc $(RAMDISK)
        !            14: CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \
        !            15: -fcombine-regs -mstring-insns
1.1.1.2   root       16: CPP    =cpp -nostdinc -Iinclude
1.1       root       17: 
1.1.1.3 ! root       18: #
        !            19: # ROOT_DEV specifies the default root-device when making the image.
        !            20: # This can be either FLOPPY, /dev/xxxx or empty, in which case the
        !            21: # default of /dev/hd6 is used by 'build'.
        !            22: #
        !            23: ROOT_DEV=/dev/hd6
        !            24: 
1.1       root       25: ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o
1.1.1.2   root       26: DRIVERS =kernel/blk_drv/blk_drv.a kernel/chr_drv/chr_drv.a
1.1.1.3 ! root       27: MATH   =kernel/math/math.a
1.1       root       28: LIBS   =lib/lib.a
                     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.3 ! 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.3 ! root       55:                $(ARCHIVES) $(DRIVERS) $(MATH) $(LIBS)
1.1       root       56:        $(LD) $(LDFLAGS) boot/head.o init/main.o \
                     57:        $(ARCHIVES) \
1.1.1.2   root       58:        $(DRIVERS) \
1.1.1.3 ! root       59:        $(MATH) \
1.1       root       60:        $(LIBS) \
                     61:        -o tools/system > System.map
                     62: 
1.1.1.3 ! root       63: kernel/math/math.a:
        !            64:        (cd kernel/math; make)
        !            65: 
1.1.1.2   root       66: kernel/blk_drv/blk_drv.a:
                     67:        (cd kernel/blk_drv; make)
                     68: 
                     69: kernel/chr_drv/chr_drv.a:
                     70:        (cd kernel/chr_drv; make)
                     71: 
1.1       root       72: kernel/kernel.o:
                     73:        (cd kernel; make)
                     74: 
                     75: mm/mm.o:
                     76:        (cd mm; make)
                     77: 
                     78: fs/fs.o:
                     79:        (cd fs; make)
                     80: 
                     81: lib/lib.a:
                     82:        (cd lib; make)
                     83: 
1.1.1.3 ! root       84: boot/setup: boot/setup.s
        !            85:        $(AS86) -o boot/setup.o boot/setup.s
        !            86:        $(LD86) -s -o boot/setup boot/setup.o
        !            87: 
        !            88: boot/bootsect: boot/bootsect.s
        !            89:        $(AS86) -o boot/bootsect.o boot/bootsect.s
        !            90:        $(LD86) -s -o boot/bootsect boot/bootsect.o
        !            91: 
        !            92: tmp.s: boot/bootsect.s tools/system
        !            93:        (echo -n "SYSSIZE = (";ls -l tools/system | grep system \
        !            94:                | cut -c25-31 | tr '\012' ' '; echo "+ 15 ) / 16") > tmp.s
        !            95:        cat boot/bootsect.s >> tmp.s
1.1       root       96: 
                     97: clean:
1.1.1.3 ! root       98:        rm -f Image System.map tmp_make core boot/bootsect boot/setup
        !            99:        rm -f init/*.o tools/system tools/build boot/*.o
1.1       root      100:        (cd mm;make clean)
                    101:        (cd fs;make clean)
                    102:        (cd kernel;make clean)
                    103:        (cd lib;make clean)
                    104: 
                    105: backup: clean
1.1.1.3 ! root      106:        (cd .. ; tar cf - linux | compress - > backup.Z)
1.1       root      107:        sync
                    108: 
                    109: dep:
                    110:        sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
                    111:        (for i in init/*.c;do echo -n "init/";$(CPP) -M $$i;done) >> tmp_make
                    112:        cp tmp_make Makefile
                    113:        (cd fs; make dep)
                    114:        (cd kernel; make dep)
                    115:        (cd mm; make dep)
                    116: 
                    117: ### Dependencies:
                    118: init/main.o : init/main.c include/unistd.h include/sys/stat.h \
                    119:   include/sys/types.h include/sys/times.h include/sys/utsname.h \
                    120:   include/utime.h include/time.h include/linux/tty.h include/termios.h \
                    121:   include/linux/sched.h include/linux/head.h include/linux/fs.h \
1.1.1.2   root      122:   include/linux/mm.h include/signal.h include/asm/system.h include/asm/io.h \
                    123:   include/stddef.h include/stdarg.h include/fcntl.h 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.