📄 makefile
字号:
<!doctype html public "-//W3C//DTD HTML 3.2//EN"><html><head><title>Linux/Makefile</title><meta http-equiv=Content-Type content="text/html; charset=gb2312"><base href="http://oldlinux.org/lxr/http/"></head><body bgcolor=white><div align=center> [<b><i>源代码浏览</i></b>] [<a href="diff/Makefile">区别标定</a>] [<a href="ident">标识符搜索</a>] [<a href="search">文本搜索</a>] [<a href="find">文件搜索</a>]</div><h1 align=center> <a href="http:/"> OldLinux</a> <a href="http:blurb.html"> 交叉引用</a><br> <a href="source/">Linux</a>/<a href="source/Makefile">Makefile</a></h1><div align=center> <b>版本:</b> [<a href="source/Makefile?v=1.0">1.0</a>] [<a href="source/Makefile?v=0.99.11">0.99.11</a>] [<a href="source/Makefile?v=0.99">0.99</a>] [<a href="source/Makefile?v=0.97">0.97</a>] [<a href="source/Makefile?v=0.96a">0.96a</a>] [<a href="source/Makefile?v=0.95">0.95</a>] [<a href="source/Makefile?v=0.12">0.12</a>] [<b><i>0.11</i></b>] [<a href="source/Makefile?v=0.01">0.01</a>] <br> <b>体系结构:</b> [<b><i>i386</i></b>] <br></div><hr><pre> <a name=L1 href="source/Makefile#L1">1</a> # <a name=L2 href="source/Makefile#L2">2</a> # if you want the ram-disk device, define this to be the <a name=L3 href="source/Makefile#L3">3</a> # size in blocks. <a name=L4 href="source/Makefile#L4">4</a> # <a name=L5 href="source/Makefile#L5">5</a> RAMDISK = #-DRAMDISK=512 <a name=L6 href="source/Makefile#L6">6</a> <a name=L7 href="source/Makefile#L7">7</a> AS86 =as86 -0 -a <a name=L8 href="source/Makefile#L8">8</a> LD86 =ld86 -0 <a name=L9 href="source/Makefile#L9">9</a> <a name=L10 href="source/Makefile#L10">10</a> AS =gas <a name=L11 href="source/Makefile#L11">11</a> LD =gld <a name=L12 href="source/Makefile#L12">12</a> LDFLAGS =-s -x -M <a name=L13 href="source/Makefile#L13">13</a> CC =gcc $(RAMDISK) <a name=L14 href="source/Makefile#L14">14</a> CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ <a name=L15 href="source/Makefile#L15">15</a> -fcombine-regs -mstring-insns <a name=L16 href="source/Makefile#L16">16</a> CPP =cpp -nostdinc -Iinclude <a name=L17 href="source/Makefile#L17">17</a> <a name=L18 href="source/Makefile#L18">18</a> # <a name=L19 href="source/Makefile#L19">19</a> # ROOT_DEV specifies the default root-device when making the image. <a name=L20 href="source/Makefile#L20">20</a> # This can be either FLOPPY, /dev/xxxx or empty, in which case the <a name=L21 href="source/Makefile#L21">21</a> # default of /dev/hd6 is used by 'build'. <a name=L22 href="source/Makefile#L22">22</a> # <a name=L23 href="source/Makefile#L23">23</a> ROOT_DEV=/dev/hd6 <a name=L24 href="source/Makefile#L24">24</a> <a name=L25 href="source/Makefile#L25">25</a> ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o <a name=L26 href="source/Makefile#L26">26</a> DRIVERS =kernel/blk_drv/blk_drv.a kernel/chr_drv/chr_drv.a <a name=L27 href="source/Makefile#L27">27</a> MATH =kernel/math/math.a <a name=L28 href="source/Makefile#L28">28</a> LIBS =lib/lib.a <a name=L29 href="source/Makefile#L29">29</a> <a name=L30 href="source/Makefile#L30">30</a> .c.s: <a name=L31 href="source/Makefile#L31">31</a> $(CC) $(CFLAGS) \ <a name=L32 href="source/Makefile#L32">32</a> -nostdinc -Iinclude -S -o $*.s $< <a name=L33 href="source/Makefile#L33">33</a> .s.o: <a name=L34 href="source/Makefile#L34">34</a> $(AS) -c -o $*.o $< <a name=L35 href="source/Makefile#L35">35</a> .c.o: <a name=L36 href="source/Makefile#L36">36</a> $(CC) $(CFLAGS) \ <a name=L37 href="source/Makefile#L37">37</a> -nostdinc -Iinclude -c -o $*.o $< <a name=L38 href="source/Makefile#L38">38</a> <a name=L39 href="source/Makefile#L39">39</a> all: Image <a name=L40 href="source/Makefile#L40">40</a> <a name=L41 href="source/Makefile#L41">41</a> Image: boot/bootsect boot/setup tools/system tools/build <a name=L42 href="source/Makefile#L42">42</a> tools/build boot/bootsect boot/setup tools/system $(ROOT_DEV) > Image <a name=L43 href="source/Makefile#L43">43</a> sync <a name=L44 href="source/Makefile#L44">44</a> <a name=L45 href="source/Makefile#L45">45</a> disk: Image <a name=L46 href="source/Makefile#L46">46</a> dd bs=8192 if=Image of=/dev/PS0 <a name=L47 href="source/Makefile#L47">47</a> <a name=L48 href="source/Makefile#L48">48</a> tools/build: tools/build.c <a name=L49 href="source/Makefile#L49">49</a> $(CC) $(CFLAGS) \ <a name=L50 href="source/Makefile#L50">50</a> -o tools/build tools/build.c <a name=L51 href="source/Makefile#L51">51</a> <a name=L52 href="source/Makefile#L52">52</a> boot/head.o: boot/head.s <a name=L53 href="source/Makefile#L53">53</a> <a name=L54 href="source/Makefile#L54">54</a> tools/system: boot/head.o init/main.o \ <a name=L55 href="source/Makefile#L55">55</a> $(ARCHIVES) $(DRIVERS) $(MATH) $(LIBS) <a name=L56 href="source/Makefile#L56">56</a> $(LD) $(LDFLAGS) boot/head.o init/main.o \ <a name=L57 href="source/Makefile#L57">57</a> $(ARCHIVES) \ <a name=L58 href="source/Makefile#L58">58</a> $(DRIVERS) \ <a name=L59 href="source/Makefile#L59">59</a> $(MATH) \ <a name=L60 href="source/Makefile#L60">60</a> $(LIBS) \ <a name=L61 href="source/Makefile#L61">61</a> -o tools/system > System.map <a name=L62 href="source/Makefile#L62">62</a> <a name=L63 href="source/Makefile#L63">63</a> kernel/math/math.a: <a name=L64 href="source/Makefile#L64">64</a> (cd kernel/math; make) <a name=L65 href="source/Makefile#L65">65</a> <a name=L66 href="source/Makefile#L66">66</a> kernel/blk_drv/blk_drv.a: <a name=L67 href="source/Makefile#L67">67</a> (cd kernel/blk_drv; make) <a name=L68 href="source/Makefile#L68">68</a> <a name=L69 href="source/Makefile#L69">69</a> kernel/chr_drv/chr_drv.a: <a name=L70 href="source/Makefile#L70">70</a> (cd kernel/chr_drv; make) <a name=L71 href="source/Makefile#L71">71</a> <a name=L72 href="source/Makefile#L72">72</a> kernel/kernel.o: <a name=L73 href="source/Makefile#L73">73</a> (cd kernel; make) <a name=L74 href="source/Makefile#L74">74</a> <a name=L75 href="source/Makefile#L75">75</a> mm/mm.o: <a name=L76 href="source/Makefile#L76">76</a> (cd mm; make) <a name=L77 href="source/Makefile#L77">77</a> <a name=L78 href="source/Makefile#L78">78</a> fs/fs.o: <a name=L79 href="source/Makefile#L79">79</a> (cd fs; make) <a name=L80 href="source/Makefile#L80">80</a> <a name=L81 href="source/Makefile#L81">81</a> lib/lib.a: <a name=L82 href="source/Makefile#L82">82</a> (cd lib; make) <a name=L83 href="source/Makefile#L83">83</a> <a name=L84 href="source/Makefile#L84">84</a> boot/setup: boot/setup.s <a name=L85 href="source/Makefile#L85">85</a> $(AS86) -o boot/setup.o boot/setup.s <a name=L86 href="source/Makefile#L86">86</a> $(LD86) -s -o boot/setup boot/setup.o <a name=L87 href="source/Makefile#L87">87</a> <a name=L88 href="source/Makefile#L88">88</a> boot/bootsect: boot/bootsect.s <a name=L89 href="source/Makefile#L89">89</a> $(AS86) -o boot/bootsect.o boot/bootsect.s <a name=L90 href="source/Makefile#L90">90</a> $(LD86) -s -o boot/bootsect boot/bootsect.o <a name=L91 href="source/Makefile#L91">91</a> <a name=L92 href="source/Makefile#L92">92</a> tmp.s: boot/bootsect.s tools/system <a name=L93 href="source/Makefile#L93">93</a> (echo -n "SYSSIZE = (";ls -l tools/system | grep system \ <a name=L94 href="source/Makefile#L94">94</a> | cut -c25-31 | tr '\012' ' '; echo "+ 15 ) / 16") > tmp.s <a name=L95 href="source/Makefile#L95">95</a> cat boot/bootsect.s >> tmp.s <a name=L96 href="source/Makefile#L96">96</a> <a name=L97 href="source/Makefile#L97">97</a> clean: <a name=L98 href="source/Makefile#L98">98</a> rm -f Image System.map tmp_make core boot/bootsect boot/setup <a name=L99 href="source/Makefile#L99">99</a> rm -f init/*.o tools/system tools/build boot/*.o<a name=L100 href="source/Makefile#L100">100</a> (cd mm;make clean)<a name=L101 href="source/Makefile#L101">101</a> (cd fs;make clean)<a name=L102 href="source/Makefile#L102">102</a> (cd kernel;make clean)<a name=L103 href="source/Makefile#L103">103</a> (cd lib;make clean)<a name=L104 href="source/Makefile#L104">104</a> <a name=L105 href="source/Makefile#L105">105</a> backup: clean<a name=L106 href="source/Makefile#L106">106</a> (cd .. ; tar cf - linux | compress - > backup.Z)<a name=L107 href="source/Makefile#L107">107</a> sync<a name=L108 href="source/Makefile#L108">108</a> <a name=L109 href="source/Makefile#L109">109</a> dep:<a name=L110 href="source/Makefile#L110">110</a> sed '/\#\#\# Dependencies/q' < Makefile > tmp_make<a name=L111 href="source/Makefile#L111">111</a> (for i in init/*.c;do echo -n "init/";$(CPP) -M $$i;done) >> tmp_make<a name=L112 href="source/Makefile#L112">112</a> cp tmp_make Makefile<a name=L113 href="source/Makefile#L113">113</a> (cd fs; make dep)<a name=L114 href="source/Makefile#L114">114</a> (cd kernel; make dep)<a name=L115 href="source/Makefile#L115">115</a> (cd mm; make dep)<a name=L116 href="source/Makefile#L116">116</a> <a name=L117 href="source/Makefile#L117">117</a> ### Dependencies:<a name=L118 href="source/Makefile#L118">118</a> init/main.o : init/main.c include/unistd.h include/sys/stat.h \<a name=L119 href="source/Makefile#L119">119</a> include/sys/types.h include/sys/times.h include/sys/utsname.h \<a name=L120 href="source/Makefile#L120">120</a> include/utime.h include/time.h include/linux/tty.h include/termios.h \<a name=L121 href="source/Makefile#L121">121</a> include/linux/sched.h include/linux/head.h include/linux/fs.h \<a name=L122 href="source/Makefile#L122">122</a> include/linux/mm.h include/signal.h include/asm/system.h include/asm/io.h \<a name=L123 href="source/Makefile#L123">123</a> include/stddef.h include/stdarg.h include/fcntl.h </pre><hr><div align=center> [<b><i>源代码浏览</i></b>] [<a href="diff/Makefile">区别标定</a>] [<a href="ident">标识符搜索</a>] [<a href="search">文本搜索</a>] [<a href="find">文件搜索</a>] </div><hr>本网页由 <a href="http:blurb.html">LXR引擎</a> 自动生成.<br></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -