BUILD.conf 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473
  1. #!/bin/bash
  2. #### INSTAL PARAMS ####
  3. ARCH=amd64
  4. ### DIRS ###
  5. BASEDIR=${_BUILD_DIR}
  6. INC_DIR=${BASEDIR}/sys/include
  7. INC_ARCH=${BASEDIR}/${ARCH}/include
  8. LIB_DIR=${BASEDIR}/${ARCH}/lib
  9. SRC_DIR=${BASEDIR}/sys/src
  10. UTIL_DIR=${_BUILD_DIR}/util
  11. CMD_DIR=${SRC_DIR}/cmd
  12. KRL_DIR=${SRC_DIR}/9/k10
  13. TEST_DIR=${SRC_DIR}/test
  14. ### COMPILER ###
  15. CC=gcc
  16. CFLAGS_DEBUG="-g"
  17. CFLAGS_LIB="-O0 -static -fplan9-extensions -ffreestanding -fno-builtin -Wall -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wuninitialized -Wmaybe-uninitialized -I${INC_ARCH} -I${INC_DIR}"
  18. CFLAGS_KLIB="-mcmodel=kernel -O0 -fplan9-extensions -ffreestanding -fno-builtin -Wall -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wuninitialized -Wmaybe-uninitialized -I${INC_ARCH} -I${INC_DIR}"
  19. CFLAGS_CMD="-mcmodel=small -O0 -fplan9-extensions -ffreestanding -fno-builtin -Wall -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wuninitialized -Wmaybe-uninitialized -I${INC_ARCH} -I${INC_DIR}"
  20. LDFLAGS=-L$LIB_DIR
  21. AR=ar
  22. RANLIB=ranlib
  23. LD=ld
  24. LEX=lex
  25. PARSER_GEN=yacc
  26. COLLECT=/usr/lib/gcc/x86_64-linux-gnu/4.9/collect2
  27. COLLECTFLAGS="-plugin /usr/lib/gcc/x86_64-linux-gnu/4.9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper --sysroot=/ --build-id -m elf_x86_64 --hash-style=gnu"
  28. AWK=awk
  29. XD=xxd
  30. NM=nm
  31. ### KERNEL ###
  32. DATE=$(date +%s)
  33. EXTKERNDATE="-DKERNDATE=${DATE}"
  34. KERNEL_CONF="k8cpu"
  35. KERNEL_SOURCE="entry.S *.c ../386/*.c ../ip/*.c ../port/*.c l64v.S l64fpu.S cpuidamd64.S l64acidt.S l64idt.S l64vsyscall.S "
  36. KERNEL_CFLAGS="-mcmodel=kernel -O0 -static -fplan9-extensions -ffreestanding -fno-builtin ${EXTKERNDATE}"
  37. KERNEL_CFLAGS_DEBUG="-g -fvar-tracking -fvar-tracking-assignments"
  38. KERNEL_WARNFLAGS="-Wall -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wuninitialized -Wmaybe-uninitialized"
  39. KERNEL_UCFLAGS="-O0 -static -fplan9-extensions -ffreestanding -fno-builtin"
  40. KERNEL_GLOBIGNORE=*devcap.c:*sdaoe.c:ratrace.c:*doauthenticate.c:*getpasswd.c:*nopsession.c:*archk8.c:*rdb.c:*etherbcm.c:*devprobe.c:*tcklock.c:*sd.c:*ssl.c:*tls.c:*proc-OLD.c:*proc-SMP.c
  41. KERNEL_LDFLAGS="-z max-page-size=0x1000 -nostdlib -g"
  42. KERNEL_OBJECT=9k
  43. ### Libraries ###
  44. BUILD_LIBS="lib9p libString libauth libauthsrv libavl libbin libbio libcomplete libcontrol libdisk libdraw libflate libframe libgeometry libhtml libhttpd\
  45. liblex libmemdraw libmemlayer libndb libplumb libregexp libstdio libsunrpc libthread libventi libc libmp libip"
  46. BUILD_KLIBS="libc libip libdraw"
  47. ### CMD ###
  48. BUILD_CMD="rc bind mount cat cp echo ls ipconfig ps mkdir pwd chmod rio date dd vga ping telnet dhcpclient srv"
  49. ### functions ###
  50. test_hello()
  51. {
  52. BUILD_IN="hello.c"
  53. BUILD_OUT="hello"
  54. CLEAN_COM="rm -f *.o"
  55. LIBS_TO_LINK="stdio c"
  56. LDFLAGS_EXTRA="-static -e_main"
  57. }
  58. test_to_fork()
  59. {
  60. BUILD_IN="to_fork.c"
  61. BUILD_OUT="to_fork"
  62. CLEAN_COM="rm -f *.o"
  63. LIBS_TO_LINK="stdio c"
  64. LDFLAGS_EXTRA="-static -e_main"
  65. }
  66. test_saymyname()
  67. {
  68. BUILD_IN="say.c"
  69. BUILD_OUT="say"
  70. CLEAN_COM="rm -f *.o"
  71. LIBS_TO_LINK="stdio c"
  72. LDFLAGS_EXTRA="-static -e_main"
  73. }
  74. cmd_dd()
  75. {
  76. BUILD_IN="dd.c"
  77. BUILD_OUT="dd.elf.out"
  78. CLEAN_COM="rm -f *.o"
  79. LIBS_TO_LINK="libc"
  80. LDFLAGS_EXTRA="-static -e_main"
  81. }
  82. cmd_date()
  83. {
  84. BUILD_IN="date.c"
  85. BUILD_OUT="date.elf.out"
  86. CLEAN_COM="rm -f *.o"
  87. LIBS_TO_LINK="libc"
  88. LDFLAGS_EXTRA="-static -e_main"
  89. }
  90. cmd_chmod()
  91. {
  92. BUILD_IN="chmod.c"
  93. BUILD_OUT="chmod.elf.out"
  94. CLEAN_COM="rm -f *.o"
  95. LIBS_TO_LINK="libc"
  96. LDFLAGS_EXTRA="-static -e_main"
  97. }
  98. cmd_pwd()
  99. {
  100. BUILD_IN="pwd.c"
  101. BUILD_OUT="pwd.elf.out"
  102. CLEAN_COM="rm -f *.o"
  103. LIBS_TO_LINK="libc"
  104. LDFLAGS_EXTRA="-static -e_main"
  105. }
  106. cmd_mkdir()
  107. {
  108. BUILD_IN="mkdir.c"
  109. BUILD_OUT="mkdir.elf.out"
  110. CLEAN_COM="rm -f *.o"
  111. LIBS_TO_LINK="libc"
  112. LDFLAGS_EXTRA="-static -e_main"
  113. }
  114. cmd_rio()
  115. {
  116. BUILD_IN="data.c fsys.c rio.c scrl.c time.c util.c wctl.c wind.c xfid.c"
  117. BUILD_OUT="rio.elf.out"
  118. CLEAN_COM="rm -f *.o"
  119. LIBS_TO_LINK="libcomplete libframe libdraw libthread libplumb libc"
  120. LDFLAGS_EXTRA="-static -e_main"
  121. }
  122. cmd_vga()
  123. {
  124. BUILD_DIR=${CMD_DIR}/aux/vga
  125. BUILD_IN="3dfx.c bt485.c ct65540.c error.c i81x.c ics534x.c mach64xx.c neomagic.c radeon.c s3928.c sc15025.c trio64.c tvp3026.c vga.c vision968.c \
  126. ark2000pv.c ch9294.c cyber938x.c et4000.c ibm8514.c io.c main.c nvidia.c rgb524.c s3clock.c stg1702.c tvp3020.c tvp3026clock.c virge.c vmware.c \
  127. att20c49x.c clgd542x.c data.c et4000hwgc.c icd2061a.c mach32.c mga2164w.c palette.c rgb524mn.c s3generic.c t2r4.c tvp3025.c vesa.c vision864.c w30c516.c \
  128. att21c498.c clgd546x.c db.c hiqvideo.c ics2494.c mach64.c mga4xx.c pci.c s3801.c s3hwgc.c template.c tvp3025clock.c vesadb.c vision964.c"
  129. BUILD_OUT="vga.elf.out"
  130. CLEAN_COM="rm -f *.o"
  131. LIBS_TO_LINK="ndb bio libc"
  132. LDFLAGS_EXTRA="-static -e_main"
  133. }
  134. cmd_srv()
  135. {
  136. BUILD_IN="srv.c"
  137. BUILD_OUT="srv.elf.out"
  138. CLEAN_COM="rm -f *.o"
  139. LIBS_TO_LINK="libauth bio ip libc"
  140. LDFLAGS_EXTRA="-static -e_main"
  141. }
  142. cmd_dhcpclient()
  143. {
  144. BUILD_DIR=${CMD_DIR}/ip
  145. BUILD_IN="dhcpclient.c"
  146. BUILD_OUT="dhcpclient.elf.out"
  147. CLEAN_COM="rm -f *.o"
  148. LIBS_TO_LINK="bio ip libc"
  149. LDFLAGS_EXTRA="-static -e_main"
  150. }
  151. cmd_telnet()
  152. {
  153. BUILD_DIR=${CMD_DIR}/ip
  154. BUILD_IN="telnet.c"
  155. BUILD_OUT="telnet.elf.out"
  156. CLEAN_COM="rm -f *.o"
  157. LIBS_TO_LINK="bio ip libc"
  158. LDFLAGS_EXTRA="-static -e_main"
  159. }
  160. cmd_ping()
  161. {
  162. BUILD_DIR=${CMD_DIR}/ip
  163. BUILD_IN="ping.c"
  164. BUILD_OUT="ping.elf.out"
  165. CLEAN_COM="rm -f *.o"
  166. LIBS_TO_LINK="ndb bio ip libc"
  167. LDFLAGS_EXTRA="-static -e_main"
  168. }
  169. cmd_ipconfig()
  170. {
  171. BUILD_DIR=${CMD_DIR}/ip/ipconfig
  172. BUILD_IN="ipv6.c main.c ppp.c"
  173. BUILD_OUT="ipconfig.elf.out"
  174. CLEAN_COM="rm -f *.o"
  175. LIBS_TO_LINK="9p ndb bio ip libc"
  176. LDFLAGS_EXTRA="-static -e_main"
  177. }
  178. cmd_ps()
  179. {
  180. BUILD_IN="ps.c"
  181. BUILD_OUT="ps.elf.out"
  182. CLEAN_COM="rm -f *.o"
  183. LIBS_TO_LINK="bio libc"
  184. LDFLAGS_EXTRA="-static -e_main"
  185. }
  186. cmd_ls()
  187. {
  188. BUILD_IN="ls.c"
  189. BUILD_OUT="ls.elf.out"
  190. CLEAN_COM="rm -f *.o"
  191. LIBS_TO_LINK="bio libc"
  192. LDFLAGS_EXTRA="-static -e_main"
  193. }
  194. cmd_cp()
  195. {
  196. BUILD_IN="cp.c"
  197. BUILD_OUT="cp.elf.out"
  198. CLEAN_COM="rm -f *.o"
  199. LIBS_TO_LINK="libc"
  200. LDFLAGS_EXTRA="-static -e_main"
  201. }
  202. cmd_echo()
  203. {
  204. BUILD_IN="echo.c"
  205. BUILD_OUT="echo.elf.out"
  206. CLEAN_COM="rm -f *.o"
  207. LIBS_TO_LINK="libc"
  208. LDFLAGS_EXTRA="-static -e_main"
  209. }
  210. cmd_cat()
  211. {
  212. BUILD_IN="cat.c"
  213. BUILD_OUT="cat.elf.out"
  214. CLEAN_COM="rm -f *.o"
  215. LIBS_TO_LINK="libc"
  216. LDFLAGS_EXTRA="-static -e_main"
  217. }
  218. cmd_rc()
  219. {
  220. BUILD_IN=" code.c \
  221. exec.c \
  222. getflags.c \
  223. glob.c \
  224. havefork.c \
  225. here.c \
  226. io.c \
  227. lex.c \
  228. pcmd.c \
  229. pfnc.c \
  230. plan9.c \
  231. simple.c \
  232. subr.c \
  233. trap.c \
  234. tree.c \
  235. var.c \
  236. y.tab.c \
  237. "
  238. BUILD_OUT="rc.elf.out"
  239. CLEAN_COM="rm -f *.o *.tab.*"
  240. LIBS_TO_LINK="String libc"
  241. LDFLAGS_EXTRA="-static -e_main"
  242. #Extra tasks if we're compiling
  243. if [ $1 -eq 1 ]
  244. then
  245. echo "$PARSER_GEN -d syn.y"
  246. $PARSER_GEN -d syn.y
  247. if [ $? -ne 0 ]
  248. then
  249. echo "ERROR executing $PARSER_GEN"
  250. exit 1
  251. fi
  252. echo "cp y.tab.h x.tab.h"
  253. cp y.tab.h x.tab.h
  254. if [ $? -ne 0 ]
  255. then
  256. echo "ERROR copying y.tab.h to x.tab.h"
  257. fi
  258. fi
  259. }
  260. # One for command? ugh, do it better!!
  261. cmd_bind()
  262. {
  263. BUILD_IN="bind.c"
  264. BUILD_OUT="bind.elf.out"
  265. CLEAN_COM="rm -f *.o"
  266. LIBS_TO_LINK="libc"
  267. LDFLAGS_EXTRA="-static -e_main"
  268. }
  269. cmd_mount()
  270. {
  271. BUILD_IN="mount.c"
  272. BUILD_OUT="mount.elf.out"
  273. CLEAN_COM="rm -f *.o"
  274. LIBS_TO_LINK="auth libc"
  275. LDFLAGS_EXTRA="-static -e_main"
  276. }
  277. lib9p()
  278. {
  279. BUILD_IN=" auth.c\
  280. dirread.c\
  281. fid.c\
  282. file.c\
  283. intmap.c\
  284. listen.c\
  285. mem.c\
  286. req.c\
  287. parse.c\
  288. post.c\
  289. rfork.c\
  290. srv.c\
  291. thread.c\
  292. uid.c\
  293. util.c\
  294. "
  295. BUILD_OUT="${LIB_DIR}/lib9p.a"
  296. CLEAN_COM="rm -f *.o"
  297. }
  298. libString()
  299. {
  300. BUILD_IN=" s_alloc.c\
  301. s_append.c\
  302. s_array.c\
  303. s_copy.c\
  304. s_getline.c\
  305. s_grow.c\
  306. s_memappend.c\
  307. s_nappend.c\
  308. s_parse.c\
  309. s_putc.c\
  310. s_rdinstack.c\
  311. s_read.c\
  312. s_read_line.c\
  313. s_reset.c\
  314. s_terminate.c\
  315. s_tolower.c\
  316. s_unique.c\
  317. "
  318. BUILD_OUT="${LIB_DIR}/libString.a"
  319. CLEAN_COM="rm -f *.o"
  320. }
  321. libauth()
  322. {
  323. BUILD_IN=" amount.c\
  324. amount_getkey.c\
  325. attr.c\
  326. auth_attr.c\
  327. auth_challenge.c\
  328. auth_chuid.c\
  329. auth_getkey.c\
  330. auth_getuserpasswd.c\
  331. auth_proxy.c\
  332. auth_respond.c\
  333. auth_rpc.c\
  334. auth_userpasswd.c\
  335. auth_wep.c\
  336. login.c\
  337. newns.c\
  338. noworld.c\
  339. "
  340. BUILD_OUT="${LIB_DIR}/libauth.a"
  341. CLEAN_COM="rm -f *.o"
  342. }
  343. libauthsrv()
  344. {
  345. BUILD_IN=" _asgetticket.c\
  346. _asrdresp.c\
  347. authdial.c\
  348. convA2M.c\
  349. convM2A.c\
  350. convM2PR.c\
  351. convM2T.c\
  352. convM2TR.c\
  353. convPR2M.c\
  354. convT2M.c\
  355. convTR2M.c\
  356. nvcsum.c\
  357. opasstokey.c\
  358. passtokey.c\
  359. readnvram.c\
  360. "
  361. BUILD_OUT="${LIB_DIR}/libauthsrv.a"
  362. CLEAN_COM="rm -f *.o"
  363. }
  364. libavl()
  365. {
  366. BUILD_IN="avl.c"
  367. BUILD_OUT="${LIB_DIR}/libavl.a"
  368. CLEAN_COM="rm -f *.o"
  369. }
  370. libbin()
  371. {
  372. BUILD_IN="bin.c"
  373. BUILD_OUT="${LIB_DIR}/libbin.a"
  374. CLEAN_COM="rm -f *.o"
  375. }
  376. libbio()
  377. {
  378. BUILD_IN=" bbuffered.c\
  379. bfildes.c\
  380. bflush.c\
  381. bgetrune.c\
  382. bgetc.c\
  383. bgetd.c\
  384. binit.c\
  385. boffset.c\
  386. bprint.c\
  387. bputrune.c\
  388. bputc.c\
  389. brdline.c\
  390. brdstr.c\
  391. bread.c\
  392. bseek.c\
  393. bwrite.c\
  394. bvprint.c\
  395. "
  396. BUILD_OUT="${LIB_DIR}/libbio.a"
  397. CLEAN_COM="rm -f *.o"
  398. }
  399. libcomplete()
  400. {
  401. BUILD_IN="complete.c"
  402. BUILD_OUT="${LIB_DIR}/libcomplete.a"
  403. CLEAN_COM="rm -f *.o"
  404. }
  405. libcontrol()
  406. {
  407. BUILD_IN=" box.c\
  408. button.c\
  409. cache.c\
  410. control.c\
  411. entry.c\
  412. group.c\
  413. keyboard.c\
  414. label.c\
  415. menu.c\
  416. radiobutton.c\
  417. scribble.c\
  418. slider.c\
  419. tabs.c\
  420. text.c\
  421. textbutton.c\
  422. textbutton3.c\
  423. "
  424. BUILD_OUT="${LIB_DIR}/libcontrol.a"
  425. CLEAN_COM="rm -f *.o"
  426. }
  427. libdisk()
  428. {
  429. BUILD_IN=" disk.c\
  430. proto.c\
  431. scsi.c\
  432. "
  433. BUILD_OUT="${LIB_DIR}/libdisk.a"
  434. CLEAN_COM="rm -f *.o"
  435. }
  436. libdraw()
  437. {
  438. BUILD_IN=" alloc.c\
  439. allocimagemix.c\
  440. arith.c\
  441. bezier.c\
  442. border.c\
  443. buildfont.c\
  444. bytesperline.c\
  445. chan.c\
  446. cloadimage.c\
  447. computil.c\
  448. creadimage.c\
  449. debug.c\
  450. defont.c\
  451. draw.c\
  452. drawrepl.c\
  453. egetrect.c\
  454. ellipse.c\
  455. emenuhit.c\
  456. event.c\
  457. fmt.c\
  458. font.c\
  459. freesubfont.c\
  460. getdefont.c\
  461. getrect.c\
  462. getsubfont.c\
  463. icossin.c\
  464. icossin2.c\
  465. init.c\
  466. keyboard.c\
  467. line.c\
  468. menuhit.c\
  469. mkfont.c\
  470. mouse.c\
  471. newwindow.c\
  472. openfont.c\
  473. poly.c\
  474. loadimage.c\
  475. readcolmap.c\
  476. readimage.c\
  477. readsubfont.c\
  478. rectclip.c\
  479. replclipr.c\
  480. rgb.c\
  481. scroll.c\
  482. string.c\
  483. stringbg.c\
  484. stringsubfont.c\
  485. stringwidth.c\
  486. subfont.c\
  487. subfontcache.c\
  488. subfontname.c\
  489. unloadimage.c\
  490. window.c\
  491. writecolmap.c\
  492. writeimage.c\
  493. writesubfont.c\
  494. "
  495. BUILD_OUT="${LIB_DIR}/libdraw.a"
  496. CLEAN_COM="rm -f *.o"
  497. }
  498. libflate()
  499. {
  500. BUILD_IN=" deflate.c\
  501. deflatezlib.c\
  502. deflateblock.c\
  503. deflatezlibblock.c\
  504. inflate.c\
  505. inflatezlib.c\
  506. inflateblock.c\
  507. inflatezlibblock.c\
  508. flateerr.c\
  509. crc.c\
  510. adler.c\
  511. "
  512. BUILD_OUT=${LIB_DIR}/libflate.a
  513. CLEAN_COM="rm -f *.o"
  514. }
  515. libframe()
  516. {
  517. BUILD_IN=" frbox.c\
  518. frdraw.c\
  519. frdelete.c\
  520. frinit.c\
  521. frinsert.c\
  522. frptofchar.c\
  523. frselect.c\
  524. frstr.c\
  525. frutil.c\
  526. "
  527. BUILD_OUT=${LIB_DIR}/libframe.a
  528. CLEAN_COM="rm -f *.o"
  529. }
  530. libgeometry()
  531. {
  532. BUILD_IN=" arith3.c\
  533. matrix.c\
  534. qball.c\
  535. quaternion.c\
  536. transform.c\
  537. tstack.c\
  538. "
  539. BUILD_OUT=${LIB_DIR}/libgeometry.a
  540. CLEAN_COM="rm -f *.o"
  541. }
  542. libhtml()
  543. {
  544. BUILD_IN=" build.c\
  545. lex.c\
  546. strinttab.c\
  547. utils.c\
  548. "
  549. BUILD_OUT=${LIB_DIR}/libhtml.a
  550. CLEAN_COM="rm -f *.o"
  551. }
  552. libhttpd()
  553. {
  554. BUILD_IN=" alloc.c\
  555. checkcontent.c\
  556. date.c\
  557. fail.c\
  558. gethead.c\
  559. hio.c\
  560. httpfmt.c\
  561. httpunesc.c\
  562. lower.c\
  563. okheaders.c\
  564. parse.c\
  565. parsereq.c\
  566. query.c\
  567. redirected.c\
  568. unallowed.c\
  569. urlfmt.c\
  570. urlunesc.c\
  571. "
  572. BUILD_OUT=${LIB_DIR}/libhttpd.a
  573. CLEAN_COM="rm -f *.o"
  574. }
  575. liblex()
  576. {
  577. BUILD_IN=" allprint.c\
  578. main.c\
  579. reject.c\
  580. yyless.c\
  581. yywrap.c\
  582. "
  583. BUILD_OUT=${LIB_DIR}/libl.a
  584. CLEAN_COM="rm -f *.o"
  585. CFLAGS_EXTRA=-I${SRC_DIR}/cmd/lex
  586. }
  587. libmemdraw()
  588. {
  589. BUILD_IN=" alloc.c\
  590. arc.c\
  591. cload.c\
  592. cmap.c\
  593. cread.c\
  594. defont.c\
  595. draw.c\
  596. ellipse.c\
  597. fillpoly.c\
  598. hwdraw.c\
  599. iprint.c\
  600. line.c\
  601. load.c\
  602. openmemsubfont.c\
  603. poly.c\
  604. read.c\
  605. string.c\
  606. subfont.c\
  607. unload.c\
  608. write.c\
  609. "
  610. BUILD_OUT=${LIB_DIR}/libmemdraw.a
  611. CLEAN_COM="rm -f *.o"
  612. }
  613. libmemlayer()
  614. {
  615. BUILD_IN=" draw.c\
  616. lalloc.c\
  617. layerop.c\
  618. ldelete.c\
  619. lhide.c\
  620. line.c\
  621. load.c\
  622. lorigin.c\
  623. lsetrefresh.c\
  624. ltofront.c\
  625. ltorear.c\
  626. unload.c\
  627. "
  628. BUILD_OUT=${LIB_DIR}/libmemlayer.a
  629. CLEAN_COM="rm -f *.o"
  630. }
  631. libndb()
  632. {
  633. BUILD_IN=" csgetval.c\
  634. csipinfo.c\
  635. dnsquery.c\
  636. ipattr.c\
  637. ndbaux.c\
  638. ndbcache.c\
  639. ndbcat.c\
  640. ndbconcatenate.c\
  641. ndbdiscard.c\
  642. ndbfree.c\
  643. ndbgetipaddr.c\
  644. ndbgetval.c\
  645. ndbhash.c\
  646. ndbipinfo.c\
  647. ndblookval.c\
  648. ndbopen.c\
  649. ndbparse.c\
  650. ndbreorder.c\
  651. ndbsubstitute.c\
  652. "
  653. BUILD_OUT=${LIB_DIR}/libndb.a
  654. CLEAN_COM="rm -f *.o"
  655. CFLAGS_EXTRA=-I${SRC_DIR}/libndb
  656. }
  657. libplumb()
  658. {
  659. BUILD_IN=" event.c\
  660. mesg.c\
  661. plumbsendtext.c\
  662. "
  663. BUILD_OUT=${LIB_DIR}/libplumb.a
  664. CLEAN_COM="rm -f *.o"
  665. }
  666. libregexp()
  667. {
  668. BUILD_IN=" regcomp.c\
  669. regerror.c\
  670. regexec.c\
  671. regsub.c\
  672. regaux.c\
  673. rregexec.c\
  674. rregsub.c\
  675. "
  676. BUILD_OUT=${LIB_DIR}/libregexp.a
  677. CLEAN_COM="rm -f *.o"
  678. }
  679. libstdio()
  680. {
  681. BUILD_IN=" _IO_getc.c\
  682. _IO_putc.c\
  683. clearerr.c\
  684. dtoa.c\
  685. fclose.c\
  686. fdopen.c\
  687. feof.c\
  688. ferror.c\
  689. fflush.c\
  690. fgetc.c\
  691. fgetpos.c\
  692. fgets.c\
  693. fileno.c\
  694. fopen.c\
  695. fprintf.c\
  696. fputc.c\
  697. fputs.c\
  698. fread.c\
  699. freopen.c\
  700. fscanf.c\
  701. fseek.c\
  702. fseeko.c\
  703. fsetpos.c\
  704. ftell.c\
  705. ftello.c\
  706. fwrite.c\
  707. getc.c\
  708. gets.c\
  709. printf.c\
  710. putc.c\
  711. puts.c\
  712. rewind.c\
  713. scanf.c\
  714. sclose.c\
  715. setbuf.c\
  716. setvbuf.c\
  717. snprintf.c\
  718. sopenr.c\
  719. sopenw.c\
  720. sprintf.c\
  721. sscanf.c\
  722. tmpfile.c\
  723. tmpnam.c\
  724. ungetc.c\
  725. vfprintf.c\
  726. vfscanf.c\
  727. vprintf.c\
  728. vsnprintf.c\
  729. vsprintf.c\
  730. "
  731. BUILD_OUT=${LIB_DIR}/libstdio.a
  732. CLEAN_COM="rm -f *.o"
  733. }
  734. libsunrpc()
  735. {
  736. BUILD_IN=" mount3.c\
  737. nfs3.c\
  738. portmap.c\
  739. authunix.c\
  740. client.c\
  741. emalloc.c\
  742. error.c\
  743. fd.c\
  744. fmt.c\
  745. net.c\
  746. prog.c\
  747. rpc.c\
  748. server.c\
  749. suncall.c\
  750. udp.c\
  751. "
  752. BUILD_OUT=${LIB_DIR}/libsunrpc.a
  753. CLEAN_COM="rm -f *.o"
  754. }
  755. libthread()
  756. {
  757. BUILD_IN=" amd64.c\
  758. channel.c\
  759. chanprint.c\
  760. create.c\
  761. debug.c\
  762. dial.c\
  763. exec.c\
  764. exit.c\
  765. id.c\
  766. iocall.c\
  767. ioclose.c\
  768. iodial.c\
  769. ioopen.c\
  770. ioproc.c\
  771. ioread.c\
  772. ioreadn.c\
  773. iosleep.c\
  774. iowrite.c\
  775. kill.c\
  776. lib.c\
  777. main.c\
  778. note.c\
  779. ref.c\
  780. rendez.c\
  781. sched.c\
  782. "
  783. BUILD_OUT=${LIB_DIR}/libthread.a
  784. CLEAN_COM="rm -f *.o"
  785. }
  786. libventi()
  787. {
  788. BUILD_IN=" cache.c\
  789. client.c\
  790. conn.c\
  791. dial.c\
  792. debug.c\
  793. dtype.c\
  794. entry.c\
  795. fcall.c\
  796. fcallfmt.c\
  797. file.c\
  798. hangup.c\
  799. log.c\
  800. mem.c\
  801. packet.c\
  802. parsescore.c\
  803. queue.c\
  804. root.c\
  805. rpc.c\
  806. scorefmt.c\
  807. send.c\
  808. server.c\
  809. srvhello.c\
  810. strdup.c\
  811. string.c\
  812. time.c\
  813. version.c\
  814. zero.c\
  815. zeroscore.c\
  816. "
  817. BUILD_OUT=${LIB_DIR}/libventi.a
  818. CLEAN_COM="rm -f *.o"
  819. }
  820. libc()
  821. {
  822. SUBDIRS="9sys 9syscall fmt port $ARCH"
  823. }
  824. libc_9sys()
  825. {
  826. BUILD_IN=" abort.c\
  827. access.c\
  828. announce.c\
  829. convD2M.c\
  830. convM2D.c\
  831. convM2S.c\
  832. convS2M.c\
  833. cputime.c\
  834. ctime.c\
  835. dial.c\
  836. dirfstat.c\
  837. dirfwstat.c\
  838. dirmodefmt.c\
  839. dirread.c\
  840. dirstat.c\
  841. dirwstat.c\
  842. fcallfmt.c\
  843. fork.c\
  844. getnetconninfo.c\
  845. getenv.c\
  846. getpid.c\
  847. getppid.c\
  848. getwd.c\
  849. iounit.c\
  850. nulldir.c\
  851. postnote.c\
  852. privalloc.c\
  853. pushssl.c\
  854. pushtls.c\
  855. putenv.c\
  856. qlock.c\
  857. read.c\
  858. read9pmsg.c\
  859. readv.c\
  860. rerrstr.c\
  861. sbrk.c\
  862. setnetmtpt.c\
  863. sysfatal.c\
  864. syslog.c\
  865. sysname.c\
  866. time.c\
  867. times.c\
  868. tm2sec.c\
  869. truerand.c\
  870. wait.c\
  871. waitpid.c\
  872. werrstr.c\
  873. write.c\
  874. writev.c\
  875. "
  876. BUILD_OUT=${LIB_DIR}/libc.a
  877. CLEAN_COM="rm -f *.o"
  878. }
  879. libc_9syscall()
  880. {
  881. if [ $1 -eq 1 ]
  882. then
  883. DO_NOTHING=1
  884. ${UTIL_DIR}/mksys $ARCH
  885. if [ $? -eq 0 ]
  886. then
  887. echo $CC $BUILD_DEBUG -c *.s
  888. $CC $BUILD_DEBUG -c *.s
  889. if [ $? -ne 0 ]
  890. then
  891. echo "ERROR compiling libc"
  892. fi
  893. echo $AR rv "${LIB_DIR}/libc.a" *.o
  894. $AR rv "${LIB_DIR}/libc.a" *.o
  895. else
  896. echo "ERROR executing ${UTIL_DIR}/mksys $ARCH"
  897. fi
  898. fi
  899. CLEAN_COM="rm -f *.o *.s"
  900. }
  901. libc_fmt()
  902. {
  903. BUILD_IN=" dofmt.c\
  904. dorfmt.c\
  905. errfmt.c\
  906. fltfmt.c\
  907. fmt.c\
  908. fmtfd.c\
  909. fmtlock.c\
  910. fmtprint.c\
  911. fmtquote.c\
  912. fmtrune.c\
  913. fmtstr.c\
  914. fmtvprint.c\
  915. fprint.c\
  916. print.c\
  917. runefmtstr.c\
  918. runeseprint.c\
  919. runesmprint.c\
  920. runesnprint.c\
  921. runesprint.c\
  922. runevseprint.c\
  923. runevsmprint.c\
  924. runevsnprint.c\
  925. seprint.c\
  926. smprint.c\
  927. snprint.c\
  928. sprint.c\
  929. vfprint.c\
  930. vseprint.c\
  931. vsmprint.c\
  932. vsnprint.c\
  933. "
  934. BUILD_OUT=${LIB_DIR}/libc.a
  935. CLEAN_COM="rm -f *.o"
  936. }
  937. libc_port()
  938. {
  939. BUILD_IN=" _assert.c\
  940. abs.c\
  941. asin.c\
  942. atan.c\
  943. atan2.c\
  944. atexit.c\
  945. atnotify.c\
  946. atof.c\
  947. atol.c\
  948. atoll.c\
  949. cistrcmp.c\
  950. cistrncmp.c\
  951. cistrstr.c\
  952. charstod.c\
  953. cleanname.c\
  954. crypt.c\
  955. ctype.c\
  956. encodefmt.c\
  957. execl.c\
  958. exp.c\
  959. fabs.c\
  960. floor.c\
  961. fmod.c\
  962. frand.c\
  963. frexp.c\
  964. getcallerpc.c\
  965. getfields.c\
  966. getuser.c\
  967. hangup.c\
  968. hypot.c\
  969. lnrand.c\
  970. lock.c\
  971. log.c\
  972. lrand.c\
  973. malloc.c\
  974. memccpy.c\
  975. memchr.c\
  976. memcmp.c\
  977. memmove.c\
  978. memset.c\
  979. mktemp.c\
  980. muldiv.c\
  981. nan.c\
  982. needsrcquote.c\
  983. netcrypt.c\
  984. netmkaddr.c\
  985. nrand.c\
  986. ntruerand.c\
  987. perror.c\
  988. pool.c\
  989. pow.c\
  990. pow10.c\
  991. profile.c\
  992. qsort.c\
  993. quote.c\
  994. rand.c\
  995. readn.c\
  996. rune.c\
  997. runebase.c\
  998. runebsearch.c\
  999. runestrcat.c\
  1000. runestrchr.c\
  1001. runestrcmp.c\
  1002. runestrcpy.c\
  1003. runestrecpy.c\
  1004. runestrdup.c\
  1005. runestrncat.c\
  1006. runestrncmp.c\
  1007. runestrncpy.c\
  1008. runestrrchr.c\
  1009. runestrlen.c\
  1010. runestrstr.c\
  1011. runetype.c\
  1012. sin.c\
  1013. sinh.c\
  1014. sqrt.c\
  1015. strcat.c\
  1016. strchr.c\
  1017. strcmp.c\
  1018. strcpy.c\
  1019. strecpy.c\
  1020. strcspn.c\
  1021. strdup.c\
  1022. strlen.c\
  1023. strncat.c\
  1024. strncmp.c\
  1025. strncpy.c\
  1026. strpbrk.c\
  1027. strrchr.c\
  1028. strspn.c\
  1029. strstr.c\
  1030. strtod.c\
  1031. strtok.c\
  1032. strtol.c\
  1033. strtoll.c\
  1034. strtoul.c\
  1035. strtoull.c\
  1036. tan.c\
  1037. tanh.c\
  1038. tokenize.c\
  1039. toupper.c\
  1040. utfecpy.c\
  1041. utflen.c\
  1042. utfnlen.c\
  1043. utfrune.c\
  1044. utfrrune.c\
  1045. utfutf.c\
  1046. u16.c\
  1047. u32.c\
  1048. u64.c\
  1049. "
  1050. BUILD_OUT=${LIB_DIR}/libc.a
  1051. CLEAN_COM="rm -f *.o"
  1052. }
  1053. libc_amd64()
  1054. {
  1055. BUILD_IN=" _seek.c\
  1056. notejmp.c\
  1057. cycles.c\
  1058. argv0.c\
  1059. rdpmc.c\
  1060. "
  1061. BUILD_OUT=${LIB_DIR}/libc.a
  1062. CLEAN_COM="rm -f *.o"
  1063. if [ $1 -eq 1 ]
  1064. then
  1065. as -o setjmp.o -c setjmp.s
  1066. as -o sqrt.o -c sqrt.s
  1067. as -o tas.o -c tas.s
  1068. echo "$CC $CFLAGS_LIB $BUILD_DEBUG -o atom.o -c atom.S"
  1069. $CC $CFLAGS_LIB $BUILD_DEBUG -o atom.o -c atom.S
  1070. echo "$CC $CFLAGS_LIB $BUILD_DEBUG -o main9.o -c main9.S"
  1071. $CC $CFLAGS_LIB $BUILD_DEBUG -o main9.o -c main9.S
  1072. fi
  1073. }
  1074. libmp()
  1075. {
  1076. SUBDIRS="port $ARCH"
  1077. }
  1078. libmp_port()
  1079. {
  1080. BUILD_IN=" mpaux.c\
  1081. mpfmt.c\
  1082. strtomp.c\
  1083. mptobe.c\
  1084. mptole.c\
  1085. betomp.c\
  1086. letomp.c\
  1087. mpadd.c\
  1088. mpsub.c\
  1089. mpcmp.c\
  1090. mpfactorial.c\
  1091. mpmul.c\
  1092. mpleft.c\
  1093. mpright.c\
  1094. mpvecadd.c\
  1095. mpvecsub.c\
  1096. mpvecdigmuladd.c\
  1097. mpveccmp.c\
  1098. mpdigdiv.c\
  1099. mpdiv.c\
  1100. mpexp.c\
  1101. mpmod.c\
  1102. mpextendedgcd.c\
  1103. mpinvert.c\
  1104. mprand.c\
  1105. crt.c\
  1106. mptoi.c\
  1107. mptoui.c\
  1108. mptov.c\
  1109. mptouv.c\
  1110. "
  1111. BUILD_OUT=${LIB_DIR}/libmp.a
  1112. CLEAN_COM="rm -f *.o"
  1113. }
  1114. libmp_amd64()
  1115. {
  1116. DO_NOTHING=1
  1117. }
  1118. libip()
  1119. {
  1120. BUILD_IN=" eipfmt.c\
  1121. equivip.c\
  1122. parseip.c\
  1123. parseether.c\
  1124. myetheraddr.c\
  1125. myipaddr.c\
  1126. classmask.c\
  1127. bo.c\
  1128. readipifc.c\
  1129. ipaux.c\
  1130. ptclbsum.c\
  1131. "
  1132. BUILD_OUT=${LIB_DIR}/libip.a
  1133. CLEAN_COM="rm -f *.o"
  1134. }
  1135. klibc()
  1136. {
  1137. BUILD_IN=" ./9sys/abort.c \
  1138. ./9sys/access.c \
  1139. ./9sys/announce.c \
  1140. ./9sys/convD2M.c \
  1141. ./9sys/convM2D.c \
  1142. ./9sys/convM2S.c \
  1143. ./9sys/convS2M.c \
  1144. ./9sys/cputime.c \
  1145. ./9sys/ctime.c \
  1146. ./9sys/dial.c \
  1147. ./9sys/dirfstat.c \
  1148. ./9sys/dirfwstat.c \
  1149. ./9sys/dirmodefmt.c \
  1150. ./9sys/dirread.c \
  1151. ./9sys/dirstat.c \
  1152. ./9sys/dirwstat.c \
  1153. ./9sys/fcallfmt.c \
  1154. ./9sys/fork.c \
  1155. ./9sys/getnetconninfo.c \
  1156. ./9sys/getenv.c \
  1157. ./9sys/getpid.c \
  1158. ./9sys/getppid.c \
  1159. ./9sys/getwd.c \
  1160. ./9sys/iounit.c \
  1161. ./9sys/nulldir.c \
  1162. ./9sys/postnote.c \
  1163. ./9sys/privalloc.c \
  1164. ./9sys/pushssl.c \
  1165. ./9sys/pushtls.c \
  1166. ./9sys/putenv.c \
  1167. ./9sys/qlock.c \
  1168. ./9sys/read.c \
  1169. ./9sys/read9pmsg.c \
  1170. ./9sys/readv.c \
  1171. ./9sys/rerrstr.c \
  1172. ./9sys/sbrk.c \
  1173. ./9sys/setnetmtpt.c \
  1174. ./9sys/sysfatal.c \
  1175. ./9sys/syslog.c \
  1176. ./9sys/sysname.c \
  1177. ./9sys/time.c \
  1178. ./9sys/times.c \
  1179. ./9sys/tm2sec.c \
  1180. ./9sys/truerand.c \
  1181. ./9sys/wait.c \
  1182. ./9sys/waitpid.c \
  1183. ./9sys/werrstr.c \
  1184. ./9sys/write.c \
  1185. ./9sys/writev.c \
  1186. ./fmt/dofmt.c \
  1187. ./fmt/dorfmt.c \
  1188. ./fmt/errfmt.c \
  1189. ./fmt/fltfmt.c \
  1190. ./fmt/fmt.c \
  1191. ./fmt/fmtfd.c \
  1192. ./fmt/fmtlock.c \
  1193. ./fmt/fmtprint.c \
  1194. ./fmt/fmtquote.c \
  1195. ./fmt/fmtrune.c \
  1196. ./fmt/fmtstr.c \
  1197. ./fmt/fmtvprint.c \
  1198. ./fmt/fprint.c \
  1199. ./fmt/print.c \
  1200. ./fmt/runefmtstr.c \
  1201. ./fmt/runeseprint.c \
  1202. ./fmt/runesmprint.c \
  1203. ./fmt/runesnprint.c \
  1204. ./fmt/runesprint.c \
  1205. ./fmt/runevseprint.c \
  1206. ./fmt/runevsmprint.c \
  1207. ./fmt/runevsnprint.c \
  1208. ./fmt/seprint.c \
  1209. ./fmt/smprint.c \
  1210. ./fmt/snprint.c \
  1211. ./fmt/sprint.c \
  1212. ./fmt/vfprint.c \
  1213. ./fmt/vseprint.c \
  1214. ./fmt/vsmprint.c \
  1215. ./fmt/vsnprint.c \
  1216. ./port/_assert.c \
  1217. ./port/abs.c \
  1218. ./port/asin.c \
  1219. ./port/atan.c \
  1220. ./port/atan2.c \
  1221. ./port/atexit.c \
  1222. ./port/atnotify.c \
  1223. ./port/atof.c \
  1224. ./port/atol.c \
  1225. ./port/atoll.c \
  1226. ./port/cistrcmp.c \
  1227. ./port/cistrncmp.c \
  1228. ./port/cistrstr.c \
  1229. ./port/charstod.c \
  1230. ./port/cleanname.c \
  1231. ./port/crypt.c \
  1232. ./port/ctype.c \
  1233. ./port/encodefmt.c \
  1234. ./port/execl.c \
  1235. ./port/exp.c \
  1236. ./port/fabs.c \
  1237. ./port/floor.c \
  1238. ./port/fmod.c \
  1239. ./port/frand.c \
  1240. ./port/frexp.c \
  1241. ./port/getcallerpc.c \
  1242. ./port/getfields.c \
  1243. ./port/getuser.c \
  1244. ./port/hangup.c \
  1245. ./port/hypot.c \
  1246. ./port/lnrand.c \
  1247. ./port/lock.c \
  1248. ./port/log.c \
  1249. ./port/lrand.c \
  1250. ./port/malloc.c \
  1251. ./port/memccpy.c \
  1252. ./port/memchr.c \
  1253. ./port/memcmp.c \
  1254. ./port/memmove.c \
  1255. ./port/memset.c \
  1256. ./port/mktemp.c \
  1257. ./port/muldiv.c \
  1258. ./port/nan.c \
  1259. ./port/needsrcquote.c \
  1260. ./port/netcrypt.c \
  1261. ./port/netmkaddr.c \
  1262. ./port/nrand.c \
  1263. ./port/ntruerand.c \
  1264. ./port/perror.c \
  1265. ./port/pool.c \
  1266. ./port/pow.c \
  1267. ./port/pow10.c \
  1268. ./port/profile.c \
  1269. ./port/qsort.c \
  1270. ./port/quote.c \
  1271. ./port/rand.c \
  1272. ./port/readn.c \
  1273. ./port/rune.c \
  1274. ./port/runebase.c \
  1275. ./port/runebsearch.c \
  1276. ./port/runestrcat.c \
  1277. ./port/runestrchr.c \
  1278. ./port/runestrcmp.c \
  1279. ./port/runestrcpy.c \
  1280. ./port/runestrecpy.c \
  1281. ./port/runestrdup.c \
  1282. ./port/runestrncat.c \
  1283. ./port/runestrncmp.c \
  1284. ./port/runestrncpy.c \
  1285. ./port/runestrrchr.c \
  1286. ./port/runestrlen.c \
  1287. ./port/runestrstr.c \
  1288. ./port/runetype.c \
  1289. ./port/sin.c \
  1290. ./port/sinh.c \
  1291. ./port/sqrt.c \
  1292. ./port/strcat.c \
  1293. ./port/strchr.c \
  1294. ./port/strcmp.c \
  1295. ./port/strcpy.c \
  1296. ./port/strecpy.c \
  1297. ./port/strcspn.c \
  1298. ./port/strdup.c \
  1299. ./port/strlen.c \
  1300. ./port/strncat.c \
  1301. ./port/strncmp.c \
  1302. ./port/strncpy.c \
  1303. ./port/strpbrk.c \
  1304. ./port/strrchr.c \
  1305. ./port/strspn.c \
  1306. ./port/strstr.c \
  1307. ./port/strtod.c \
  1308. ./port/strtok.c \
  1309. ./port/strtol.c \
  1310. ./port/strtoll.c \
  1311. ./port/strtoul.c \
  1312. ./port/strtoull.c \
  1313. ./port/tan.c \
  1314. ./port/tanh.c \
  1315. ./port/tokenize.c \
  1316. ./port/toupper.c \
  1317. ./port/utfecpy.c \
  1318. ./port/utflen.c \
  1319. ./port/utfnlen.c \
  1320. ./port/utfrune.c \
  1321. ./port/utfrrune.c \
  1322. ./port/utfutf.c \
  1323. ./port/u16.c \
  1324. ./port/u32.c \
  1325. ./port/u64.c \
  1326. ./amd64/_seek.c \
  1327. ./amd64/notejmp.c \
  1328. ./amd64/cycles.c \
  1329. ./amd64/argv0.c \
  1330. ./amd64/rdpmc.c
  1331. "
  1332. BUILD_OUT="${LIB_DIR}/klibc.a"
  1333. CLEAN_COM="rm -f *.o"
  1334. }
  1335. klibip()
  1336. {
  1337. BUILD_IN="bo.c classmask.c eipfmt.c equivip.c ipaux.c myetheraddr.c myipaddr.c parseether.c parseip.c ptclbsum.c readipifc.c testreadipifc.c"
  1338. BUILD_OUT=${LIB_DIR}/klibip.a
  1339. CLEAN_COM="rm -f *.o"
  1340. }
  1341. klibdraw()
  1342. {
  1343. BUILD_IN=" alloc.c\
  1344. allocimagemix.c\
  1345. arith.c\
  1346. bezier.c\
  1347. border.c\
  1348. buildfont.c\
  1349. bytesperline.c\
  1350. chan.c\
  1351. cloadimage.c\
  1352. computil.c\
  1353. creadimage.c\
  1354. debug.c\
  1355. defont.c\
  1356. draw.c\
  1357. drawrepl.c\
  1358. egetrect.c\
  1359. ellipse.c\
  1360. emenuhit.c\
  1361. event.c\
  1362. fmt.c\
  1363. font.c\
  1364. freesubfont.c\
  1365. getdefont.c\
  1366. getrect.c\
  1367. getsubfont.c\
  1368. icossin.c\
  1369. icossin2.c\
  1370. init.c\
  1371. keyboard.c\
  1372. line.c\
  1373. menuhit.c\
  1374. mkfont.c\
  1375. mouse.c\
  1376. newwindow.c\
  1377. openfont.c\
  1378. poly.c\
  1379. loadimage.c\
  1380. readcolmap.c\
  1381. readimage.c\
  1382. readsubfont.c\
  1383. rectclip.c\
  1384. replclipr.c\
  1385. rgb.c\
  1386. scroll.c\
  1387. string.c\
  1388. stringbg.c\
  1389. stringsubfont.c\
  1390. stringwidth.c\
  1391. subfont.c\
  1392. subfontcache.c\
  1393. subfontname.c\
  1394. unloadimage.c\
  1395. window.c\
  1396. writecolmap.c\
  1397. writeimage.c\
  1398. writesubfont.c\
  1399. "
  1400. BUILD_OUT="${LIB_DIR}/klibdraw.a"
  1401. CLEAN_COM="rm -f *.o"
  1402. }