[source navigation] [diff markup] [identifier search] [freetext search] [file search]

Oldlinux Cross Reference
Linux/Makefile

Version: [1.0] [0.99.11] [0.99] [0.98] [0.97] [0.96a] [0.95] [0.12] [0.11] [0.01]
Architecture: [i386]

  1 #
  2 # if you want the ram-disk device, define this to be the
  3 # size in blocks.
  4 #
  5 RAMDISK = #-DRAMDISK=512
  6 
  7 AS86    =as86 -0 -a
  8 LD86    =ld86 -0
  9 
 10 AS      =gas
 11 LD      =gld
 12 LDFLAGS =-s -x -M
 13 CC      =gcc $(RAMDISK)
 14 CFLAGS  =-Wall -O -fstrength-reduce -fomit-frame-pointer \
 15 -fcombine-regs -mstring-insns
 16 CPP     =cpp -nostdinc -Iinclude
 17 
 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 
 25 ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.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
 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 
 41 Image: boot/bootsect boot/setup tools/system tools/build
 42         tools/build boot/bootsect boot/setup tools/system $(ROOT_DEV) > Image
 43         sync
 44 
 45 disk: Image
 46         dd bs=8192 if=Image of=/dev/PS0
 47 
 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 \
 55                 $(ARCHIVES) $(DRIVERS) $(MATH) $(LIBS)
 56         $(LD) $(LDFLAGS) boot/head.o init/main.o \
 57         $(ARCHIVES) \
 58         $(DRIVERS) \
 59         $(MATH) \
 60         $(LIBS) \
 61         -o tools/system > System.map
 62 
 63 kernel/math/math.a:
 64         (cd kernel/math; make)
 65 
 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 
 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 
 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
 96 
 97 clean:
 98         rm -f Image System.map tmp_make core boot/bootsect boot/setup
 99         rm -f init/*.o tools/system tools/build boot/*.o
100         (cd mm;make clean)
101         (cd fs;make clean)
102         (cd kernel;make clean)
103         (cd lib;make clean)
104 
105 backup: clean
106         (cd .. ; tar cf - linux | compress - > backup.Z)
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 \
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 

[source navigation] [diff markup] [identifier search] [freetext search] [file search]

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.