乽偲傝偁偊偢 make 偟傛偆乿(1) 戞嶰斉

artane

NCA02423@niftyserve.or.jp

1994擭4寧16擔

拲堄丗偙偺暥偼偁偔傑偱傕乽巹揑庯枴偺堊偺 Linux 乿偑栚揑偱偁偭偰丄杮棃偺
乽傑偭偲偆側乿僔僗僥儉偺巊梡朄傗僼傽僀儖攝抲偲偼堎側傞壜擻惈偑戝偒偄偱
偡丅廬偭偰丄乽僔僗僥儉儅僱乕僕儍乕乿傪慱偭偰 Linux 偱曌嫮偝傟偰傞曽偼撉
傑側偄曽偑恎偺堊偱偡丅(傑偠)

埲慜偺斉傪弌偟偰偐傜 Linux 偺巊梡娐嫬傕曄傢偭偰棃傑偟偨屘丄慡柺夵掶抳偟
傑偡丅

    Note: 偙偺暥彂偼丄1994擭4寧16擔埲棃丄峏怴偝傟偰偄傑偣傫丅尰嵼偲偼帠
    忣偑堎側傞晹暘偑偁傞偺偱丄偛拲堄偔偩偝偄丅(JF Project)
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

Table of Contents
0. 側偤丄僐儞僷僀儖偑昁梫偐
1. 僐儞僷僀儔偲 make
2. 攝晅宍懺
3. 儔僀僽儔儕摍偺攝抲
4. make 偡傞
   
    4.1. 曄峏偺昁梫偑嵟掅尷側傕偺
    4.2. Laser 5 偺 CD 偐傜堷偭挘偭偰偔傞
    4.3. 僇乕僱儖傪峔抸偡傞 (僷僢僠偺巊偄曽)
   
5. 偁偲偑偒
6. 嶲峫偵偡傞偲偄偄杮
7. 僋僀僢僋儕僼傽儗儞僗
   
    7.1. 夝搥
    7.2. make丂乮戝懱偵偍偄偰嫟捠帠崁乯
    7.3. gcc 偺僐儞僷僀儔僆僾僔儑儞
   
8. 偙偺暥彂偵偮偄偰

0. 側偤丄僐儞僷僀儖偑昁梫偐

僐儞僷僀儖偲偼丄偁傞婯懃偵廬偭偰彂偐傟偨暥彂 (僜乕僗) 傪幚峴偱偒傞僐乕
僪 (僆僽僕僃僋僩) 偵曄姺偡傞帠傪 (棎朶側尵偄曽偱偡偑) 巜偟傑偡丅(傾僙儞
僽儖偲堘偆偺偼傾僙儞僽儖偼婡夿偵枾拝偟偰偄偰丄暥偐傜捈愙僆僽僕僃僋僩偵
曄姺偡傞嶌嬈側偺偵懳偟偰丄僐儞僷僀儖偼僜乕僗僐乕僪偐傜傾僙儞僽儖偺堊偺
僐乕僪傪弌偡 [1] 嶌嬈側偺偱偡)丅

偙偙偱丄僆僽僕僃僋僩偼婡夿枅偵堘偆偟丄婎斦偲側傞 OS 偵傛偭偰傕堎側傝傑
偡丅壖偵僷僜僐儞偺悽奅側傜偽 PC98, FM-Towns, IBM-PC, Mac, X68000, AMIGA
乧偲偄傑嫇偘偨偩偗偱傕僴乕僪偺暘椶偩偗偱戲嶳偁傝傑偡偟丄OS 偵傛偭偰傕
MS-DOS, OS-9, System7, 386BSD, Linux 乧僴乕僪僂僃傾偺堘偄偼偁傞掱搙偼拞
偵偁傞 MPU 偲 OS 偑摨偠側傜偽偁傞掱搙媧廂偟偰偔傟傞偲偼偄偊丄偦偆偩偲偟
偰傕戲嶳偺暘椶偑偁傝傑偡丅

偙偙偱壖偵傾僙儞僽儔偟偐側偐偭偨側傜偽丄偦傟偧傟偺 OS丄偦傟偧傟偺 MPU
偱慡偔堘偆彂偒曽傪偟側偗傟偽側傜側偄忋偵暋嶨側寁嶼傪傗傜偣傞偲偟偨傜乧
峫偊偨偩偗偱擼儈僜偑敋敪偟偰偟傑偄傑偡丅

偙偆偄偭偨乽僴乕僪娫偺嵎堎乿傗乽婰弎偺暋嶨偝乿傪忔傝墇偊傞偨傔偵僀儞僞
僾儕僞 [2] 傗僐儞僷僀儔偑怓乆側巇條 (BASIC, PASCAL, FORTRAN, 偦偟偰 C
摍) 偱嶌傜傟丄偦偺奜懁偺丄OS 婑傝側晹暘偱偺嵎堎傪儔僀僽儔儕 [3] 偑杽傔
偰偄傞偺偱偡丅

偙偙偱丄UN*X 偺悽奅偵栚傪岦偗偰尒傑偟傚偆丅戝宆偺僗乕僷乕僐儞僺儏乕僞偐
傜 WS丄偦偟偰崱婱曽偑巊偭偰偄傞 Towns 傗 IBM-PC 偲尵偭偨僷僜僐儞傑偱嶨
懡側僴乕僪巇條偲 MPU 偵嵶偐偔堘偆 OS 巇條偑崿嵼偟偰偄傑偡丅

偙傟傜偺娫偱丄摨偠偐偦傟偵嬤偄彂偒曽偱僾儘僌儔儉傪彂偔偙偲偑弌棃傟偽丄
偁傞婡夿偱彂偒丄摦偐偟偨僾儘僌儔儉偺惉壥偺杦偳傪慡偔堘偆婡夿偱幚尰偡傞
帠偑弌棃傑偡枖丄偦偺帠偵傛偭偰丄儐乕僓偲偟偰巊偭偰傞恖払偑僾儘僌儔儉傪
彂偔楯椡傪寖尭偡傞帠偑弌棃傞偺偱偡丅

廬偭偰丄UN*X 偱偼丄MS-DOS 摍偲堘偄丄捠忢偼 C 摍偺崅媺尵岅偵傛偭偰彂偐傟
偨僜乕僗僐乕僪偺宍偱 (僼儕乕側) 僾儘僌儔儉偑棳捠偟偰偄傑偡丅 [4]

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

1. 僐儞僷僀儔偲 make

丂僜乕僗僐乕僪偱擖庤偟偨暔傪僐儞僷僀儖偡傞偵偼丄偦傟偵揔崌偟偰偄傞僐儞
僷僀儔偑昁梫偵側傝傑偡丅崱婱曽偑巊偭偰偄傞 Towns 傗 IBM-PC 偵偍偗傞
Linux 偱偼丄 gcc 偑昗弨偺 C 尵岅僐儞僷僀儔偲側偭偰偄傑偡偺偱丄傑偢偼偦
傟傪僀儞僗僩乕儖 [5] 偟偰壓偝偄丅

偝偰丄偙傟偱 C 偺抦幆偺偁傞恖側傜偽丄"HELLO WORLD" 側傫偧偲昞帵偝偣偰僯
儎儕偲偡傞強偱偡偑丄捠忢棳捠偟偰偄傞僾儘僌儔儉偼屄暿偵僐儞僷僀儖偟偰偄
偨偺偱偼偲偰傕庤娫偑偐偐偭偰偟傑偆偟丄嶌傞懁傕拵庢傝 (僨僶僢僌丗儈僗傪
廋惓偡傞) 偺庤娫偑偐偐偭偰偟傑偆偺偱丄僐儞僷僀儖傪巟墖偡傞僣乕儖偑婔偮
傕嶌傜傟傑偟偨丅

偦偺拞偱傕億僺儏儔乕偐偮嫮椡側偺偑 make ( Linux 偱偼 GNU-make ) 偱偡丅

偙傟偼丄徻偟偔偼 C 尵岅偺杮傪尒偰梸偟偄偺偱偡偑 (墱偑怺偄偺偱夝愢偼偟側
偄)丄僜乕僗僼傽僀儖偲僆僽僕僃僋僩僼傽僀儖傪懳墳偝偣偰偍偄偰丄僆僽僕僃僋
僩偑弌棃偨屻偵僜乕僗偑彂偒捈偝傟偰偄偨傝偟偨側傜偽僐儞僷僀儖傪傗傝捈偟
偨傝丄摿掕偺嶌嬈傪峴偆條偵偡傞懳墳昞 (僶僢僠偱傕偁傞) 傪 Makefile 摍偲
柤晅偗傜傟偨僼傽僀儖偵彂偄偰偍偔帠偵傛偭偰敿帺摦偱僐儞僷僀儖傪恑傑偣偰
偔傟傞僣乕儖偱偡丅

椺偊偽丄

Example 1. Makefile 椺

  # Test.c 偼 main.c 偲 sub.c 偐傜惉傞                                       
  #                                                                          
  # 儔僀僽儔儕偺偁傞僷僗                                                     
  LIBDIR = /usr/lib                                                          
  # 僿僢僟偺偁傞僷僗                                                         
  HEADDIR = /usr/include                                                     
  # 僆僽僕僃僋僩                                                             
  OBJS = main.o sub.o                                                        
  # 僜乕僗                                                                   
  SRCS = main.c sub.c                                                        
  # 巊偆儔僀僽儔儕                                                           
  LIBS = -lc -lg                                                             
  # 婡庬幆暿摍傗僐儞僷僀儔惂屼偺堊偺丄掕媊僼儔僌                             
  FLAGS = -O -DTONWS -Dlinux                                                 
                                                                             
  # 傑偢偼丄幚峴宍幃偺掕媊                                                   
  test: $(OBJS)                                                              
  丂gcc -static -o test $(OBJS) -L$(LIBDIR) -l$(LIBS)                        
                                                                             
  # 師偵丄僐儞僷僀儖                                                         
  # 僞乕僎僢僩: 僜乕僗偲尵偆懳墳昞傪彂偄偰丄堷偭妡偐偭偨暔偵懳偡傞張棟傪師偺 
  # 峴偵彂偔丅                                                               
  # 壓偺応崌丄sub.c 偑 sub.o 偑弌棃偨屻偵彂偒姺偊傜傟偰偄偨傜丄              
  # gcc -c sub.c $(FLAGS) 傪幚峴偟偰丄sub.c 傪僐儞僷僀儖偡傞丅               
  #                                                                          
  sub.o: sub.c                                                               
   gcc -c sub.c $(FLAGS)                                                     
                                                                             
  main.o: main.c                                                             
   gcc -c main.c $(FLAGS)                                                    
                                                                             
  # 僆儅働丅                                                                 
  clean:                                                                     
   rm -fr $(OBJS) test                                                       

摍偲偙傟偼僀僀僇僎儞側暔 (壦嬻偺暔) 側偺偱偡偑丄偙偆偄偭偨姶偠偱彂偒傑
偡丅偙偺帪丄扨偵 make 偲偡傟偽僜乕僗偐傜 test 偲尵偆僆僽僕僃僋僩偑嶌傜
傟傞偟丄make clean 偲偡傟偽丄僆僽僕僃僋僩傪徚偟偰偔傟傑偡丅

偦偺懠丄Bison (Yacc) 傗傜 Lint 傗傜 lex (Flex) 傗傜怓乆偲偁傝傑偡偑丄偦
傟偼屻妛偺僞僱偵偟傑偟傚偆丅(偲傝偁偊偢丄C 偺巊偄曽偩偗偱傕恎偵晅偗側偄
偲偒偮偄暔偑偁傞)

    僠僃僢僋億僀儞僩:
   
     仩 make 偺婎杮揑側暥朄
       
     仩 C 偺儅僋儘偺彂偒曽
       
     仩 婡庬傗 OS 偵埶懚偟偰偄傞婰弎傊偺懳墳丄摿偵 BSD 宯偐 SYSV 宯偐偱
        偺敾抐
       
     仩 僐儞僷僀儔傊偺僆僾僔儑儞偺彂偒曽
       
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

2. 攝晅宍懺

丂乽側偤丄僐儞僷僀儖偑昁梫偐乿偱巹偼乽 UN*X 偺悽奅偱偼捠忢僜乕僗攝晅偱
偁傞丅乿偲彂偒傑偟偨丅偟偐偟丄僶儔僶儔偱偼怓乆搒崌偑埆偄偟丄戝偒偝傕偦
偺傑傑偱偼揹榖戙傗壽嬥偑偐偝傫偱栤戣偑弌偰偒傑偡丅(偦偺忋丄UN*X 偺悽奅
偱偼僶働僣儕儗乕揑偵捠怣偟偰傞偺偱丄懠偺抂枛偵柪榝傪偐偗傞偲尵偆栤戣偑
惗偠傞帠傕彮側偔側偄 [6] 丅)

偦偙偱搊応偡傞偺偑傾乕僇僀僶傗埑弅僣乕儖偲尵偆暔偱偡丅戝傑偐偵攝晅偵墬
偄偰巊傢傟傞宍懺偼丄

 a. tar 傪巊偭偰傑偲傔傞(埑弅偣偢)
   
 b. tar 偱傑偲傔偨暔傪 compress (gzip) 偱埑弅偡傞
   
 c. tar 偱傑偲傔偨暔傪 LHa (LHarc) 摍偺埑弅婡擻晅偒傾乕僇僀僶偱埑弅偡傞
   
 d. LHa / UN*X 摍偺丄UN*X 懳墳偺埑弅婡擻晅偒傾乕僇僀僶偱埑弅偡傞
   
 e. zip 傪巊偭偰丄LHa 偲摨偠曽朄偱埑弅偡傞
   
 f. shar 傪巊偭偰丄僜乕僗僐乕僪傪偦偺傑傑堦屄偵傑偲傔傞丅偙偺応崌丄埑弅
    傗僶僀僫儕壔偝傟偨暔偼憲傟側偄丅
   
偵戝暿偝傟傑偡偑丄"d" 偼晛媦偺娭學偐丄梋傝堦斒揑偱偼偁傝傑偣傫丅

枖丄傾乕僇僀僽偝傟偨暔傪棳偡偵偼丄

 1. 僥僉僗僩側傜偽丄偦偺傑傑棳偡
   
 2. 僶僀僫儕僀儊乕僕傪棳偡丅偙傟偼 ftp 僒僀僩傗 BBS 摍偱梡偄傜傟傞晛捠
    偺曽幃
   
 3. ish 傪巊偭偰僶僀僫儕傪僥僉僗僩壔偡傞 (僶僀僫儕壔偵偼 ish 傪梡偄傞)
   
 4. uuencode 傪巊偭偰僥僉僗僩壔偡傞 (僶僀僫儕壔偵偼 uudecode 傪梡偄傞)
   
"3" 偲 "4" 偼丄BBS 傗僯儏乕僗僌儖乕僾偱偺彂偒崬傒偱庡偵梡偄傜傟傑偡丅

    僠僃僢僋億僀儞僩:
   
     仩 奼挘巕偱偺攝晅宍懺偺堘偄(乮俈乯嶲徠)
       
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

3. 儔僀僽儔儕摍偺攝抲

彮偟丄僀儞僗僩乕儖偵尵媦偟傑偟傚偆丅傑偢丄摉慠側偑傜僀儞僗僩乕儔側傝庤
摦側傝偱 gcc 傪揥奐偟傑偡丅

gcc-2.5.8 偑 1994/4/16 尰嵼偺 Linux / Towns 昗弨偺敜 [7] 偱偡偺偱丄揥奐
偝傟偨 gcc 偼埲壓偺條側攝抲偵側偭偰傞偲巚偄傑偡丅 (偙偙偱偼丄FFMHOB 偱
偺攝晅宍懺偺暔傪 zcat 偲 tar 傪巊偭偰

    zcat gcc-*.tgz | tar xvoof - -C /                                  

摍偲偟偰夝搥偟偨偲尵偆慜採偱榖傪恑傔傑偡偑丄UNIX USER 帍傗 LASER 5 偺
CD-ROM 偱傕丄SLS 傗 SLACKWARE 偺僷僢働乕僕偺拞偵擖偭偰偄傑偡偺偱丄偦偪
傜傪帩偭偰偄傞曽偼偦偪傜偑偍摼偱偡:乯

偙傟埲奜偵傕丄奺庬偺儔僀僽儔儕 (僾儘僌儔儉幚峴帪傕偟偔偼嶌惉帪偵儕儞僋
偝傟傞丄嵟傕 OS 婑傝偺晹暘) 傪擖庤偟偰 /lib 傗 /usr/lib 偵攝抲偡傞昁梫
偑偁傝傑偡丅

1994/4/16 尰嵼偺 Linux 岦偗偺 C 儔僀僽儔儕偺儕價僕儑儞偼 4.5.19 偱偡偺
偱丄埲壓偵帵偡嶰偮傪僟僂儞儘乕僪 ( 1.5 M 偼偁傝傑偡 ^^; ) 偡傞偐 CD-ROM
摍偐傜摫擖偟傑偡 [8] 丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆丂libc-4.5.19.tar.gz     :婎杮揑側儔僀僽儔儕傿丅幚峴偺傒偺堊偺暔偑拞怱丅  劆
劆丂extra-4.5.19.tar.gz    :僾儘僌儔儈儞僌偡傞偵偼昁梫側儔僀僽儔儕丅        劆
劆丂include-4.5.19.tar.gz  :忋偺擇偮傪 gcc 偐傜巊偆堊偺僿僢僟椶丅           劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

lib 傪僟僂儞偟偨 (傕偟偔偼帩偭偰傞 CD-ROM 偺) 僨傿儗僋僩儕傿偐傜

  zcat libc-4.5.19.tar.gz | tar xvoof - -C /                           
  zcat extra-4.5.19.tar.gz | tar xvoof - -C /                          
  zcat include-4.5.19.tar.gz | tar xvoof - -C /                        
                                                                       
  ln -sf /lib/libc.so.4.5.19 /lib/libc.so.4.5                          
  ln -sf /lib/libc.so.4.5 /lib/libc.so.4                               

丂嵟掅尷丄埲忋偺憖嶌偑昁梫偱偡丅

偙傟埲奜偵尰嵼巊偭偰偄傞僶乕僕儑儞偺 Linux 偺僜乕僗僐乕僪偺堦晹偑昁梫偵
側傝傑偡(嬶懱揑偵偼丄C 偺僿僢僟偲偟偰採嫙偝傟偰傞晹暘)丅偦偟偰丄攝抲偼
丄(帺屓棳偱偡偑丄嵟掅尷偺攝抲姺偊偱嵪傓)

  /lib : 僟僀僫儈僢僋儕儞僋儔僀僽儔儕傿                                
                                                                       
  /usr/include : gcc 偺 include                                        
  /usr/include/linux , /usr/include/asm : Linux 懁偺 include           
丂丂丂丂丂丂丂丂丂丂丂丂丂丂丂丂丂丂丂丂(僇乕僱儖偺僜乕僗僐乕僪偺堦晹) 

丂偙傟傜偼埲壓偺條偵偟偰攝抲偟傑偡丅( /usr 偵 gcc 傪夝搥偟偨偲偡傞)

  ln -sf /usr/gcc-2.5.8/lib/gcc-lib/i486-linux/2.5.8/lib/* /usr/lib    
  ln -sf /usr/gcc-2.5.8/lib/gcc-lib/i486-linux/2.5.8/lib/* /lib        
  ln -sf /usr/gcc-2.5.8/include/* /usr/include                         
  ln -sf /usr/src/linux/include/* /usr/include                         

    僠僃僢僋億僀儞僩:
   
     仩 攝晅偝傟偰偄傞 gcc 偺僨傿儗僋僩儕傿攝抲峔憿偺妋擣
       
     仩 僔儞儃儕僢僋儕儞僋 (ln -sf) 偺巊偄曽
       
     仩 Linux 偱偺儔僀僽儔儕偺攝抲峔憿
       
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4. make 偡傞

仏仏僐儔儉仏仏

崱攝晅偝傟偰偄傞僜僼僩偺婔偮偐偼 configure 側傞僔僃儖僗僋儕僾僩傪摦偐偟
偰敿帺摦偱 Makefile 傗 OS 埶懚忣曬傪嶌惉偟偰偔傟傞暔偑偁傝傑偡 (嵟嬤攝
晅偝傟偰傞 GNU 宯偺僜僼僩偼杦偳偑偦偆偱偡)丅偟偐偟丄僐儞僷僀儔傗 OS 偺
嵶偐偄巇條偺娭學偱昁偢偟傕惓妋側暔傪嶌偭偰偔傟側偄応崌偑彮側偐傜偢偁傝
傑偡丅偦偙偱丄扨偵 configure 仺 make 偡傞偩偗偱側偔丄栤戣売強傪嵟揔側宍
偱廋惓偡傞弍傪妎偊傞昁梫偑偁傝傑偡丅

仏仏僐儔儉廔傢傝仏仏

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.1. 曄峏偺昁梫偑嵟掅尷側傕偺

偱偼丄偙偙偱偼杦偳曄峏柍偱摦偔暔傪庢傝忋偘傑偟傚偆丅椺偲偟偰丄FUNIX 偵
偁傞 fu 傪 make 偟偰傒傑偟傚偆丅

傑偢丄MS-DOS 忋偺丄Linux 偐傜傾僋僙僗弌棃傞嬫夋偵僟僂儞儘乕僪偟偰偒偨
fu 傪揮憲偟傑偡 (栜榑 FD 偵僶僢僋傾僢僾傪庢偭偰抲偔偙偲)丅師偵丄懡暘婱
曽偑庤偵偟偰偄傞僶乕僕儑儞偺 fu 偺攝晅宍懺偼 (c) 偱偁傞偲巚偄傑偡丅偦偙
偱丄LHa 傪巊偭偰偙傟傪夝搥偡傞偲丄fu***.tar 偲尵偆 ( *** 偼僶乕僕儑儞丅
尰嵼偼 302 偑嵟怴偩偲巚偆乧丅埲壓 fu302 偱偁傞偲壖掕)僼傽僀儖偑弌偰棃傞
偼偢偱偡丅

偦偟偰丄Linux 傪婲摦丅偦偟偰丄Linux 偱偺僜乕僗僐乕僪偺儖乕僩 (偑壖偵 /
usr/src 偩偲掕媊偡傞) 偵 tar 傪巊偭偰 MS-DOS 嬫夋 (偙偙偱偼丄/mnt/dos/
buff 偲壖掕) 偵偁傞 fu302.tar 傪揮憲丒揥奐偟傑偡丅

嬶懱揑偵偼丄

  cd /usr/src                                                          
  tar xvf fu302.tar                                                    

偲尵偆姶偠偱偡丅

偦偆偡傞偲丄./fu302 (/usr/src/fu302) 偵僜乕僗僐乕僪摍偑揥奐偝傟偰傞敜偱
偡丅偮偄偱偵丄

  cd fu302                                                             

偲懪偪崬傫偱僨傿儗僋僩儕傪堏摦偟傑偟傚偆丅

偙偙偱丄傑偢儅僯儏傾儖 (fu.doc.euc) 傪撉傒傑偡(徫)丅(擔杮岅側偺偱傢偐傞
偲巚偆)

  more fu.euc.doc                                                      

less 偑偁傞恖偼less 傪巊偄傑偟傚偆:-)

師偵婡庬婯掕傪 HP9000 偵彂偒姺偊傑偡 [9]丅 machine.h 傪僄僨傿僞偱埲壓偺
傛偆偵彂偒姺偊傑偡丅埲壓丄亜偺屻偵棃傞峴傪丄師偺條偵彂偒姺偊傑偡丅

  亜#define H2050 1                                                    
  #define H2050 0                                                      
                                                                       
  亜#define HP9000 0                                                   
  #define HP9000 1                                                     

師偵 Makefile 傪 HP9000 梡偺暔偵抲偒姺偊偰丄峏偵彂偒姺偊傑偡丅傑偢丄

  cp MakeHP9000 Makefile                                               

婱曽偑岲傒偺僄僨傿僞傪婲摦偟偰丄(擮偺堊偵) Makefile 傪彂偒姺偊傑偡 [10]
丅偙偺 Makefile 偺応崌丄# 偱巒傑傞峴偼僐儊儞僩埖偄偵偝傟傞偺偱丄懪偪崬
傑側偔偰傕寢峔偱偡丅

  亜CFLAGS =                                                                   
  CFALGS = -O6 -Dlinux -DTOWNS                                                 
                                                                               
  # 堦墳丄擮偺偨傔偵 Linux 偱偁傞偙偲偲 Towns 偱偁傞偙偲傪愰尵偟偰偍偔乧       
  # 堦晹僿僢僟僼傽僀儖偑 Linux 偐偳偆偐摍傪僠僃僢僋偟偰偄傞偺偱丅/lib/specs 偵 
  # 婰弎偟偰抲偄偰偁傞暔偵娭偟偰偼晅偗側偔偰傕椙偄丅(扨側傞曐尟)               
                                                                               
  亜gcc -s乮拞棯乯-lcurses                                                     
  gcc -s -L/usr/lib ${OBJFU} ${OBJSUB} ${OBJCOM} -o $@ -lcurses -ltermcap      
                                                                               
  # 儔僀僽儔儕傿傪巜掕 (偐側傝僨僞儔儊) 偟偨忋偵丄僔儞儃儖忣曬傪嶍彍偵偟偨丅   
  # 僩儔僽儖偑婲偒偨応崌偵栤戣偑偁傞偐傕抦傟側偄偑丄僔儞儃儖忣曬偼幚峴晹暘偺   
  # 壗攞傕僗儁乕僗傪嬺偆偺偱丄婎杮揑偐偮僨僶僢僌傪昁梫偲偡傞忬嫷偺暔埲奜偼梫   
  # 傜側偄偲巚偆偑丄偳偆偱偟傚偆偐丠                                           
                                                                               
  ## libjcurses.a (偄傢備傞儁儕僇儞 curses) 摍擔杮岅傪捠偡 curses 傪偍帩偪偺曽 
  ## 偼丄偦偪傜傪儕儞僋偡傞曽偑儀僞乕偱偡:)                                    

偝偰丄偙偙傑偱嵪傫偩傜 make 傪巒傔傑偡丅

  make                                                                 

偲懪偪崬傫偱屻偼僄儔乕偑弌側偄偙偲傪婩傝偮偮懸偪傑偟傚偆丅(偙偙偐傜偑僀
僶儔偺摴側偺偱偡偑乧 )

寈崘偑弌傞偐傕偟傟傑偣傫偑丄偦傟偼柍帇偟偰偲傝偁偊偢弌棃傑偟偨丅偝偰丄
帋偟偵巊偭偰尒傑偟傚偆丅

 ./fu                                                                  

巊偄彑庤偑偄傑偄偪偩偲巚偭偨傜丄.setup.fu 傪巊偄傗偡偄條偵彂偒姺偊偰嵞
傃儂乕儉僨傿儗僋僩儕偵暋幨 (儅僯儏傾儖嶲徠) 偟傑偡丅

擺摼弌棃偨傜丄ln -sf /usr/src/fu302/fu /usr/local/bin 偐 cp ./fu /usr/
local/bin 偲偟偰偡偖偵幚峴弌棃傞傛偆偵偟傑偟傚偆 [11]丅

# 彯丄偙偺斉偺儕儕乕僗偲慜屻偟偰丄尮挊嶌幰偐傜 OK 傪捀偄偨忋偱 gzip 傗
 zip 傪
# 巊偊傞條偵夵椙偟偨 fu 偺嵎暘傪岞昞偡傞梊掕偱偡 (尰嵼丄峏側傞夵椙拞)丅
# 婜懸偟側偄偱偍懸偪壓偝偄:-)

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.2. Laser 5 偺 CD 偐傜堷偭挘偭偰偔傞

偝偰丄偙偺崁偱偼埲慜偼 GNU-CD2 偐傜堷偭挘偭偰棃偰偄傑偟偨偑丄崱偼
iso9660 僼僅乕儅僢僩偺 CD-ROM 偱偺僼傽僀儖柤偺惂尷傪崕暈偡傞偨傔偺
RockRidge 宍幃 (暿偵柤慜偺懳墳昞傪帩偭偰抲偄偰丄偦偪傜偺柤慜傪嶲徠偡傞)
偑晛媦偟偰偄傞偍堻偱 sed 摍傪巊偭偰僗僋儕僾僩傪彂偄偨傝側偳偡傞昁梫偼側
偔側傝偮偮偁傝傑偡丅

堦墳丄偙偺崁偺嵟屻偵嶲峫傑偱偵巆偟偰抲偒傑偡偺偱丄屆偄 CD-ROM 偐傜丄
MS-DOS 偺僥僉僗僩偲偟偰婰弎偟偨僜乕僗僐乕僪傪堷偭挘偭偰偔傞嵺偵嶲峫偵偟
偰壓偝偄丅

崱夞偼丄minicom 摍偺抂枛偐傜巊偆 zmodem 傪庢傝忋偘傑偡丅Linux 偐傜奺庬
BBS (win.or.jp 摍偺丄抂枛傪堦斒偵奐曻偟偰傞 U*IX 儂僗僩傕娷傓) 偵傾僋僙
僗偟偰僟僂儞儘乕僪傗傾僢僾儘乕僪偡傞嵺偵偼昁恵偺僜僼僩偱偡丅

傑偢丄CD-ROM 傪 mount 偟傑偡丅(/etc/fstab 傊偺搊榐傪朰傟偢偵:乯) CD-ROM
偼 /mnt/cdrom 偵 mount 偝傟傞偲尵偆慜採偱峴偒傑偡丅

  mount /dev/cdrom                                                            
  # /etc/fstab 傪彂偒姺偊偰側偄応崌偼丄mount -t iso9660 /dev/cdrom /mnt/cdrom 
  # 摍偲偟傑偟傚偆丅                                                          

師偵丄僜乕僗僐乕僪傪抲偔僨傿儗僋僩儕傿傪嶌傝傑偡丅扐偟丄偙偺嶌嬈偼柍偔
偰傕偄偄応崌偑懡偄偱偡 (/usr/local/src 偵僨傿儗僋僩儕傿傪嶌傞丅偲尵偆慜
採偱峴偒傑偡)丅

  mkdir /usr/local/src/rzsz                                            

偝偰丄夝搥偟傑偟傚偆丅

丂cd /mnt/cdrom/OTHERS/#211:Communications/term/                       
  zcat rzsz9202.tar.gz | tar xvoof - -C /usr/local/src/rzsz            

師偵丄Makefile 傪曄峏偟傑偡丅偙傟偼曄峏偺昁梫偑嵟掅尷偺傕偺傪撉傫偱丄側
偍偐偮揥奐偝傟偨 Makefile 傗 README 摍傪撉傔偽暘偐傞偲巚偄傑偡偟丄rz/sz
偼柍曄峏偱 make偟偰傕摦偔偺偱丄廻戣偵偟傑偡:-)

仏仏僐儔儉仏仏
- 屆偄 (傕偟偔偼 MS-DOS 愱梡偺) CD-ROM 偐傜揮憲偡傞 - 

GNU-CD2 偵偍偄偰偼丄"MS-DOS 偱撉傓" 偲尵偆惂栺偐傜丄僼傽僀儖柤偑 8 暥帤
亄奼挘巕 3 暥帤埲撪偵愝掕偝傟偰偄傑偡丅丂枖丄僼傽僀儖偺懏惈 (僼傽僀儖偑
偳偆偄偆暔偐帵偡乧 chmod 偱曄偊傜傟傞) 傕慡偔堘偄傑偡偟丄傕偟傕僥僉僗僩
偑 MS-DOS 巇條側傜偽丄mstrip 摍偱梋寁側夵峴僐乕僪傪徚偡昁梫偑偁傝傑偡丅

偦偙偱丄"婰榐偝傟偰傞僼傽僀儖僱乕儉偲杮棃偺暔偲偺懳墳昞傪梡堄偟偰偍偄偰
丄 UN*X 忋偱暅尦偡傞" 偲尵偆帠傪峴偆僐儅儞僪偑丄cdrname (Towns 斉 Linux
偵揧晅丅枖丄GNU-CD2 摍偵僜乕僗僐乕僪偑廂榐偝傟偰偄傞) 偱偡丅

椺偊偽 ish 偱偼丄GNU-CD2 偐傜 /usr/src/ish 偵僼傽僀儖傪揮憲偟偰丄

  mstrip *                                                             
  cd /usr/src/ish                                                      
  cdrname                                                              

丂偲偡傟偽丄僼傽僀儖柤傪暅尦偟偰偔傟傞敜偱偡丅偟偐偟丄CD-ROM 偐傜棊偲偟
偨応崌偵偼丄嵟屻偵梋寁側. 偑晅偄偰棃傞帠偑偁傝傑偡丅偙傟偼偟傚偆偑側偄
偺偱丄 SED (Stream EDitor) 摍傪巊偭偰柤慜傪曄峏偟偨屻偱 cdrname 偡傞昁
梫偑偁傝傑偡丅

埲壓丄僗僋儕僾僩丅

  #!/bin/sh                                                            
  ls *. | sed -n 's/\(.\)\.$/\mv & \1/p' | sh -                        

丂偝偰丄偙傟偱僼傽僀儖柤 (僷僗) 偑廋暅偝傟傑偟偨丅師偵丄Makefile 傪
Linux 岦偗偵曄峏偟傑偡(曄峏側偟偱傕弌棃偦偆偩偑丄曐尟傪偐偗偰偍偔)丅OS
埶懚忣曬傪乽5.1 曄峏偺昁梫偑嵟掅尷側傕偺乿偲摨偠傛偆偵曄偊傟偽椙偄偺偱
丄廻戣偵偟傑偡丅(^^) (扐偟丄-ltermcap 傗 -lcurses 偼昁梫側偄丅)

丂偝偰丄屻偼 make 堦敪偱幚峴宍幃偑弌棃傞敜偱偡丅

仏仏僐儔儉廔傢傝仏仏

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

4.3. 僇乕僱儖傪峔抸偡傞 (僷僢僠偺巊偄曽)

偙偙偱偼丄僟僂儞儘乕僪偟偨 Linux 偺僜乕僗偵 Towns 屌桳偺婡擻傪巊傢偣傞
堊偺廋惓 (偙偙偱偼丄偙傟傪乽僷僢僠摉偰乿偲帵偡乧傕偭偲峀偄堄枴 (僐儔儉
嶲徠) 側傫偱偡偑 :-乯 ) 傪巤偟偰奺庬婡擻偑巊偊傞 Linux / Towns 傊偲偟偰
峴偒丄嵟廔揑偵僽乕僩僀儊乕僕 (偲僇乕僱儖) 傪嶌傝忋偘傑偡丅

仏僐儔儉丗patch 偲偼丠仏

僜乕僗僐乕僪傗暥復偺堦晹傪曄峏偡傟偽嵪傓応崌丄偦偺晹暘傪巜揈偟偰廋惓梫
媮傪偡傞曽偑宱嵪揑偱偡丅偦偙偱惗傑傟偨偺偑丄diff 偲 patch 偱偡丅徻偟偔
尵偊偽丄廋惓慜偺暥彂 (暋悢巜掕壜) 偲廋惓屻偺暥彂傪斾妑偟偰丄堘偆峴偺巜
揈傪峴偆宍幃偺 (枖丄怴偟偄僼傽僀儖偑偁傟偽丄偦傟傕搊榐偡傞) 僼傽僀儖傪
diff 偵傛偭偰嶌傝丄patch 偼偦傟傪婎偵崱攝晅偝傟偨傝曐懚偝傟偰偨傝偡傞屆
偄暥彂傪怴偟偄暔偵曄峏偟偰峴偔偺偱偡丅

仏仏僐儔儉廔傢傝仏仏

偝偰丄NIFTY 偺 FFMHOB 偺 Lib12 偲 FUNIX 偺 Lib11 偵廂榐偝傟偰偄傞丄崱嵟
怴斉偱偁傞僇乕僱儖僐乕僪 (戝懱偼 FUNIX 偵偁傞 IBM PC 岦偗偺暔傪丄Towns
偱摦偔傛偆偵偟偨奺庬僷僢僠偑 FFMHOB 偵廂榐偝傟偰偄傑偡乧 CD-ROM 偱攝晅
偝傟偰傞応崌偼丄偲傝偁偊偢偦傟) 偱傗偭偰尒傑偟傚偆:-)

偙偙偱偼丄FUNIX Lib12 偵偁傞 1.00 偺僇乕僱儖僜乕僗偵 FFMHOB Lib6 偵偁傞
Towns 懳墳兝1 斉僷僢僠傪摉偰偰傒傑偡丅僇乕僱儖僜乕僗帺懱傪 pl5 傑偱傾僢
僾僌儗乕僪偟側偄偲兝1 斉僷僢僠偼摉偨傜側偄偺偱丄拲堄偟傑偟傚偆丅

傑偢丄偍偍傕偲偺 Linux 偺僇乕僱儖 (拞怱晹) 偺尦偺僐乕僪傪揥奐偟傑偡丅 
[12] (/---/偼丄埑弅忬懺偺尦僼傽僀儖偑偁傞僨傿儗僋僩儕傿)
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  cd /usr/src                                                       劆
劆  zcat /---/linux100.tgz  | tar xvoof -                             劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

丂師偵丄梊傔僟僂儞儘乕僪偟偰/usr/src偵揥奐偟偰偍偄偨patch1偐傜patch5枠
傪摉偰傑偡丅棳捠偟偰傞応強偵傛偭偰攝晍宍懺偑堘偆偺偱丄偙偙偱偼揥奐偵偮
偄偰徻弎偟傑偣傫 [13]丅
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  for i in patch#[1-5] ; do patch -p <$i ; done                     劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
 

丂師偵丄Towns 懳墳偵偡傞偨傔偵僷僢僠傪摉偰傑偡丅
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  zcat /---/tlx105b1.tgz | tar xvf -                                劆
劆  cd linux                                                          劆
劆  patch -p <../tlx.100.5.b1                                         劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

僒僥丄make偟傑偟傚偆丅傑偢丄巊偆僨僶僀僗傗婡擻摍傪愝掕偟傑偡丅乮昁偢
README.towns 傪帠慜偵撉傓帠乯
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  cd /usr/src/linux                                                 劆
劆  make config                                                       劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

丂偙偙偱弌偝傟傞幙栤偵摎偊傑偟傚偆丅

師偵丄僿僢僟摍偺埶懚娭學傪撉傒崬傒傑偡丅僇乕僱儖偲尵偆廳梫側暔側偺偱丄
摿偵昁梫偱偡丅
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  make depend                                                       劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偙偺帪揰偱丄makefile 傗 config.h乮応崌偵傛偭偰偼 drivers/char/
keyboard.map 傕乯傪曄峏偟偰偍偒傑偡丅偦偟偰丄make 偟傑偡丅乮386DX/16 偱
丄嵟掅堦帪娫嫮偼偐偐傞偺偱丄攦偄暔偲偐嵪傑偣傞偺傕庤偱偡 ^^;乯
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  make                                                              劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

make 偑廔椆偟偨側傜偽丄make 偺娫偵弌偨寈崘傪堦墳柍帇偟偰丄"zImage" 偲尵
偆僼傽僀儖乮偙傟偑丄怴偟偔弌棃偨僽乕僩僀儊乕僕乯柤偱dos 嬫夋偵揮幨偟傑
偡丅 MS-DOS 偐傜偺棫偪忋偘傪 \liboot 偱峴偭偰偄傞側傜偽丄
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  cp zImage /mnt/dos/liboot                                         劆
劆  sync                                                              劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
丂偱俷俲偱偡丅

丂偦偟偰丄僪僉儏儊儞僩偵廬偭偰怴偟偔弌棃偨僨僶僀僗傪/dev偵mknod偱搊榐偟
傑偡丅偦偺屻丄sync仺reboot偱堦扷俵俽亅俢俷俽偵栠傝傑偡丅
劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆  sync                                                              劆
劆  reboot -h now                                                     劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
偝偰丄俵俽亅俢俷俽偐傜怴偟偄 Linux 傪婲摦偟偰傒傑偟傚偆乧偄偮傕偺條偵僇
儗儞僩僪儔僀僽偲僨傿儗僋僩儕傿傪摦偐偟丄dosboot2 偟傑偡丅扐偟丄偙偙偱丄
dosboot -i image 乧偲巜掕偟偰偄偨偺傪丄dosboot2 -i zImage乧偲偟側偄偲屆
偄僨乕僞偱婲摦偟偰偟傑偆偺偱拲堄拲堄丅

    僠僃僢僋億僀儞僩:
   
     仩 MS-DOS 嬫夋偲 Linux 嬫夋偲偺僐儈儏僯働乕僔儑儞
       
     仩 vi, stevie 傗 mule, nemacs 摍 UN*X 偺僄僨傿僞偺巊偄曽
       
     仩 Makefile (make) 偺暥朄
       
     仩 C 偱偺婡庬丒OS 埶懚晹暘偺夝愅偲偦傟傪巜掕偡傞偺偵昁梫偲偝傟傞忣
        曬偺婰弎
       
     仩 patch -p丂偺巊偄曽
       
     仩 diff丂偺巊偄曽
       
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

5. 偁偲偑偒

嵟弶偼乽嬯愴擔婰乿挷偺暔傪梊掕偟偰偄偨偺偱偡偑丄慡偔傾儂側帠偵丄拞搑敿
抂側僠儏乕僩儕傾儖傕偳偒偵側偭偰偟傑偄傑偟偨乧

偙偺暥偼廂榐偝傟傞偐傕偟傟側偄 Linux-CD 偱偼側偔偰丄Nifty 偐傜僟僂儞儘
乕僪偝傟傞恖払傪懳徾偵偟偰偟傑偭偰傞偺偱丄make 偡傞偺懡偔偼柍堄枴側忣曬
偵側偭偰偟傑偭偨條側姶偠偱峏偵忣偗柍偄乧

崱夞偼 X 偵娭楢偟偨帠崁傗儔僀僽儔儕傿偺嶌惉摍偵偮偄偰偼徣偒傑偟偨丅懕偒
傪弌偣傟偽丄偦偙偱怗傟傞帠偵側傞偱偟傚偆丅偙偙偱弌偟偰傕椙偐偭偨偺偐傕
偟傟傑偣傫偑丄巹帺恎偺抦幆傪墇偊偰傞偺偱乧壗曽偐丄libc 傗 Xlib 偵娭偡傞
嬶懱揑巇條傪婰弎偟偨彂暔 (弌棃傟偽擔杮岅偱埨偄暔) 摍偵偮偄偰偍嫵偊婅偄
傑偡乧

偲傕偁傟丄偙傟偑乽摓払栚昗乿側偺偱偼側偔丄慡偔暿偺乽栚昗乿傪栚巜偡堊偺
摴昗偲側傝丄枖丄摨偠條偵嬯愴偝傟偰傞恖払偺摂偲側傞偙偲傪婩偭偰偍傝傑偡
乧

丂丂侾俋俋係丏係丏侾俇丂倐倷丂俙倰倲倎値倕丏

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

6. 嶲峫偵偡傞偲偄偄杮

丒乽擖栧 C 尵岅乿乽幚梡 C 尵岅乿乽墳梡 C 尵岅乿丗傾僗僉乕姧
丂丂丂丂丂丂丂丂丂丂丂(傾僗僉乕儔乕僯儞僌僔僗僥儉僔儕乕僘)
丂丂丂丂丂丂丂丂丂丂丂婱曽偺棟夝儗儀儖偵偁傢偣偰偳傟傪攦偆偐寛傔偰壓偝
偄丅
丂丂丂丂丂丂丂丂丂丂丂弶曕偐傜 893 傑偱傢偐傝傗偡偄杮偩偲巚偄傑偡丅

丒乽UNIX 僗乕僷乕僥僉僗僩 (忋) (壓)乿丗媄弍昡榑幮姧
丂丂丂丂丂丂丂丂丂丂丂偼偭偒傝偄偭偰偙傟偼僆僗僗儊偱偡丅(忋) 偑 3400 墌
丄
丂丂丂丂丂丂丂丂丂丂丂(壓) 偑 3700 墌偲堦悺崅偄偱偡偑丄UN*X 偵娭偟偰懱
宯揑
丂丂丂丂丂丂丂丂丂丂丂偐偮幚忣偵増偭偨宍偱曇廤偝傟偰偍傝丄戝嬥傪暐偆壙
抣偑
丂丂丂丂丂丂丂丂丂丂丂偁傞丅偲抐尵偟偰偟傑偄傑偡丅壓庤側 UN*X 杮攦偆傛
傝傕
丂丂丂丂丂丂丂丂丂丂丂埨偄偱偡丅

丒乽偼偠傔偰偺 "C" 乿丗媄弍昡榑幮姧
丂丂丂丂丂丂丂丂丂丂丂C 尵岅偺奣擮傪妛傇偵偼偄偄杮偱偡丅傑偀丄尰嵼偼棎
敪婥枴側
丂丂丂丂丂丂丂丂丂丂丂忬嫷偵 C 偺杮偼偁傞偺偱丄岲偒側偺傪慖傇偺偑偄偄偱
偟傚偆丅

丂懠偵丄ANSI 偐傜弌偰傞巇條彂摍傕昁梫偑偁傟偽帩偭偰抲偄偰懝偼側偄偱偟傚
偆丅
(偲尵偆偐丄昻朢側偺偱巹偼攦偭偰側偄偑丄杮奿揑偵僴儅傞応崌偼昁偢昁梫偵側
傞丅)

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

7. 僋僀僢僋儕僼傽儗儞僗

7.1. 夝搥

 

tar+compress:
   
    奼挘巕亖.tar.Z 枖偼 .taz (.taz偺応崌偼Linux 忋偱 mv *.taz *.tar.Z
    摍偲偟偰柤慜偺曄峏偑昁梫丅扐偟 gzip 偐傜攈惗偟偨 zcat 偱偼偙偺嶌嬈
    偼梫傜側偔側傝傑偟偨丅)
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  zcat SOURCE.tar.Z |tar xvf - -C (摢偺僨傿儗僋僩儕傿)  劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
tar+gzip:
   
    奼挘巕亖.tar.gz 枖偼 .tpz 枖偼 .tgz
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  zcat 僷僗僱乕儉 |tar xvoof - -C (摢偺僨傿儗僋僩儕傿)  劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
LHa+tar:
   
    奼挘巕亖.lzh
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  lha x SOURCE.lzh                                      劆
    劆  tar -xvoof SOURCE.tar -C (摢偺僨傿儗僋僩儕傿)         劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
LHa/UN*X:
   
    奼挘巕亖.lzh
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  cd (摢偺僨傿儗僋僩儕傿)                               劆
    劆  lha x SOURCE.lzh                                      劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
zip/unzip:
   
    奼挘巕亖.zip
    劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
    劆  cd (摢偺僨傿儗僋僩儕傿)                               劆
    劆  unzip x SOURCE.zip                                    劆
    劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊
   
 

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

7.2. make丂乮戝懱偵偍偄偰嫟捠帠崁乯

 

make :
   
    慡偰偺僼傽僀儖偺懚嵼娭學傪撉傫偱嶌嬈乮庡偵僐儞僷僀儖乯傪峴偆
   
make install :
   
    make偱弌棃忋偑偭偨幚峴宍幃僼傽僀儖傪幚峴弌棃傞娐嫬偵堏偟偨傝娐嫬峔
    抸偟偨傝偡傞丅
   
make clean :
   
    堦偐傜僐儞僷僀儖偟側偍偡傋偔丄僆僽僕僃僋僩傗幚峴宍幃摍傪徚偡丅
   
make depend 枖偼 make .depend :
   
    僜乕僗僐乕僪偲懠偺僜乕僗僐乕僪偺懳墳娭學(抧恾)傪晅偗壛偊傞丅
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

7.3. gcc 偺僐儞僷僀儔僆僾僔儑儞

乮庡側暔偩偗乧徻嵶偼乽僀儞僒僀僪 GNU C僐儞僷僀儔乿乮幚嫵乯傗 gcc 揧晅偺
info 摍傪尒偰壓偝偄丅乯

 

-D掕媊柤 :
   
    掕媊柤傪僜乕僗僐乕僪偱#define 偟偨偺偲摨偠偔偡傞丅
   
-D掕媊柤=抣 :
   
    掕媊柤傪抣偲偟偰#define偟偨偺偲摨偠偔偡傞丅
   
-L儔僀僽儔儕傿埵抲 :
   
    儔僀僽儔儕傿偺偁傞応強傪巜掕偡傞丅
   
-l儔僀僽儔儕傿柤 :
   
    儔僀僽儔儕傿傪儕儞僋懳徾偵壛偊傞丅
   
-static :
   
    扨懱偱幚峴壜擻側僼傽僀儖傪嶌傞乮儕儞僋偡傞乯
   
-s :
   
    僔儞儃儖乮儔儀儖乯忣曬傪幚峴宍幃僆僽僕僃僋僩偵擖傟側偄丅
   
-g :
   
    僔儞儃儖忣曬傪徻嵶傑偱巆偡丅僨僶僢僈傪巊偭偰僶僌庢傝傪偡傞帪偵昁梫
    丅
   
-I僿僢僟埵抲 :
   
    僿僢僟偺偁傞僨傿儗僋僩儕傿(晛捠丄/usr/include)傪巜掕偡傞丅
   
-O (-O2 媦傃 -O6 偑戙昞揑) :
   
    僐儞僷僀儖偱嵟揔壔乮僆僾僥傿儅僀僘乯傪峴偆丅偙傟偵傛偭偰僆僽僕僃僋
    僩偺戝偒偝傗幚峴懍搙傪岦忋偝偣傜傟傞丅
   
-S :
   
    僐儞僷僀儖偺傒峴偭偰傾僙儞僽儔(gas) 偺僜乕僗傪揻偐偣傞丅
   
-c :
   
    僐儞僷僀儖乮傾僙儞僽儖乯偺傒峴偭偰僆僽僕僃僋僩傪揻偐偣傞丅
   
-o 幚峴宍幃柤 :
   
    幚峴宍幃僼傽僀儖傪巜掕偝傟偨柤慜偱弌椡偡傞丅乮儕儞僇乯
   
劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒 

8. 偙偺暥彂偵偮偄偰

捛婰丗

偛懡暘偵傕傟偢丄偙偺暥彂偼僐僺乕僼儕乕偱偡丅偑丄僆儕僕僫儖偑巹偺彂偄偨
偙傟偱偁傞偙偲乮挊嶌幰恖奿尃乯偲偦傟偵晅懷偡傞尃棙偩偗偼曻婞偟傑偣傫丅
乮扐偟丄偙傟偼庡挘偺傒偱偁傝丄偙傟傪僂儕偵偟偰梋掱偺晄楯強摼傪忋偘偰傞
応崌埲奜偼嬥側偳傪惪媮偟偨傝丄欓傔偨傝偡傞堄巚偼偁傝傑偣傫丅柍抐揮嵹娊
寎丅乯

by Artane.(NCA02423@niftyserve.or.jp 枖偼 FNA0011@FNA)

Notes

[1]  偙傟傪丄乽 2 僷僗僐儞僷僀儖乿偲尵偄丄gcc 傗 LSI-C 摍偼偙偺曽朄傪庢
     偭偰偄傑偡偑丄応崌偵傛偭偰偼僜乕僗僐乕僪偐傜捈愙僆僽僕僃僋僩偵曄姺
     偡傞曽朄 ( 1 僷僗僐儞僷僀儖) 傕偁傝傑偡丅                         
                                                                       
[2]  壖憐偺僐乕僪偵曄姺偝傟偨傝偟偨傕偺傗丄偦偺傑傑偺暥帤楍傪夝庍偡傞曽
     朄丅懍搙偼抶偔側傞偑丄屳姺惈偼崅偔弌棃傞丅                        
                                                                       
[3]  儔僀僽儔儕偲偼丄娙扨偵尵偊偽嵶偐偄僾儘僌儔儉傪梊傔儅僔儞僐乕僪 (幚
     峴壜擻側僐乕僪) 偺宍偱婑偣廤傔偰抲偄偨暔丅偙傟傪擖傟姺偊傞帠偵傛偭
     偰丄僶乕僕儑儞傾僢僾傗 (偁傞掱搙偺) 懳徾僔僗僥儉偺曄峏偑尦僾儘僌儔
     儉偺曄峏傗嵞僐儞僷僀儖側偔偟偰壜擻偲側傞丅                        
                                                                       
[4]  栜榑丄椺奜傕偁傞丅僴乕僪偵埶懚偡傞晹暘傗 MPU 偑摨偠側傜偽乧偲尵偆 
     慜採偱崅懍壔傪慱偭偰晹暘揑偵傾僙儞僽儔偱彂偔帠傕彮側偔側偄偟丄婎杮
     僜僼僩摍偼捈愙幚峴壜擻側僶僀僫儕僀儊乕僕偱攝晅偝傟傞丅            
                                                                       
     偦偟偰丄嵟嬤偼摨偠 MPU 偲帡偨 OS 側傜偽偳偺婡夿偱傕巊偊傞宍幃偱偺 
     儅僔儞僐乕僪偵傛傞攝晅傕峴傢傟偮偮偁傞 ( 乧DIY 偺惛恄偐傜偼奜傟傑 
     偡偑) (椺偊偽丄80x86 宯 MPU 傪愊傓 UN*X 婡偱偺昗弨僼僅乕儅僢僩偲偡
     傞堊偵弌棃偨 elf binary 僼僅乕儅僢僩摍傕摦偔條偱偁傞偑丄壥偨偟偰偳
     偺掱搙棳傟偰偄傞偐晄柧)丅                                         
                                                                       
     枖丄彜嬈儀乕僗偱攝晅偝傟傞暔偼丄僶僀僫儕偱攝晅偝傟傞忋偵僐僺乕僾儘
     僥僋僩僐僺乕傪杊偖堊偵僷僗儚乕僪傗尞偑側偗傟偽僀儞僗僩乕儖弌棃側偄
     條偵埫崋壔偟偨傝側偳偡傞) 偑偐偐偭偰偄傞応崌傕彮側偔偁傝傑偣傫丅  
                                                                       
     埲壓丄乽攝晅乿偲偼丄乽僼儕乕僜僼僩偺攝晅乿偲尵偆尷掕揑側堄枴偱巊偄
     傑偡丅                                                            
                                                                       
[5]  僐儞僷僀儔傪崱巊偭偰偄傞娐嫬偱巊偊傞條偵偡傞偨傔偵丄HD 偵揮幨偟偨 
     傝丄娐嫬峔抸偟偨傝偡傞丄偲尵偆堄枴偱巊偭偨丅尩枾側掕媊偲偼堘偆丅  
                                                                       
[6]  乽僶働僣儕儗乕乿偺奣擮偼丄戝婯柾僱僢僩儚乕僋偺晛媦偲嫟偵夁嫀偺暔傊
     偲側傝偮偮偁傞乧傜偟偄偱偡丅偟偐偟丄僱僢僩儚乕僋偺夞慄帪娫(帒尮偲 
     傕尵偆)傪嬺偆偺偼憡曄傢傜偢偩偟丄戝婯柾側儂僗僩傗僱僢僩儚乕僋偺愭 
     偐傜偼丄憡曄傢傜偢婔偮偐偺儂僗僩傪宱桼偡傞応崌偑懡偄偺偱丄帪娫傪巊
     偆偺偼梋傝偄偄帠偱偼側偄偺偱偡丅僱僢僩儚乕僋傪捠偠偰偺僯儏乕僗 (  
     BBS 偵墬偗傞宖帵斅憡摉偲巚偊偽椙偄) 傪巊偭偨棳捠偺応崌丄摿偵攝椂偑
     昁梫偱偡丅                                                        
                                                                       
[7]  gcc 偼埑弅偟偨忬懺偱慡懱偺僜乕僗僐乕僪偱 9 M丄堦夞償傽乕僕儑儞傾僢
     僾偡傞偺偵嵎暘偑 900K 慜屻 (埑弅偟偰) 側偺偱丄拠乆 Linux 懳墳斉偺 
     僶僀僫儕偑岞昞偝傟側偄條偱偡丅僶僀僫儕偱埑弅偱傕 1.5 M 埲忋偼峴偭 
     偰偟傑偄傑偡偐傜偹丅                                              
                                                                       
[8]  埨慡忋偺栤戣偑偁傞偺偱丄屆偄僶乕僕儑儞偺 lib ( lib*.so.2.* 摍偺儊 
     僕儍乕僶乕僕儑儞偑怴偟偔擖傟傞暔偲柧傜偐偵堘偆暔) 傪巆偟丄cp 傪巊 
     偭偰揮幨偟偰偔偩偝偄丅                                            
                                                                       
[9]  偙傟傕帋峴嶖岆偺忋偱弌偨寢榑丅壗屘 HP 宯側偺偐偼(撲)偩偲偟偐尵偄條
     偑側偄丅彯丄X 僂僀儞僪僂愱梡斉 fu 偺 Xfree86 / TOWNS 偱偺摦嶌偼丄 
     昿斏偵棊偪傞偨傔傗傔偨曽偑偄偄偱偡丅                              
                                                                       
[10] OS 偑堘偆偺偱乽曐尟乿傪偐偗偰偄傞偲巚偭偰壓偝偄丅                 
                                                                       
[11] 弌棃傟偽 cp 傪巊偭偰壓偝偄丅ln -s 偼傕偟傕 fu 偺応強偑曄傢傞偲僗僇
     偵廔傢傞偺偱丅make install 偡傞庤傕偁傝傑偡偑丄巹偼梋傝庯枴偱偼側 
     偄偺偱巊傢側偄丅                                                  
                                                                       
[12] 僟僂儞儘乕僪偺嵺偼丄揔摉側柤慜偵曄峏偟偰峴偆帠偵側傝傑偡乧        
                                                                       
[13] 偙偙偱偼丄僔僃儖偑bash偱偁傞丅偲尵偆慜採偱傗偭偰偄傑偡偺偱丄懠偺僔
     僃儖傪偍巊偄偺応崌偵偼儖乕僾偺慻傒偐偨傪曄偊傞偐丄patch1乣patch5傪
     弴偵庤摦偱摉偰傞昁梫偑偁傝傑偡丅                                  

