Simple command line calculator http://amath.innolan.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure 29KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283
  1. #!/bin/sh
  2. #
  3. # Copyright {c} 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms, with or without
  7. # modification, are permitted provided that the following conditions
  8. # are met:
  9. # 1. Redistributions of source code must retain the above copyright
  10. # notice, this list of conditions and the following disclaimer.
  11. # 2. Redistributions in binary form must reproduce the above copyright
  12. # notice, this list of conditions and the following disclaimer in the
  13. # documentation and/or other materials provided with the distribution.
  14. #
  15. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  16. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  18. # ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
  19. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  20. # DAMAGES {INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  21. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION}
  22. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  23. # LIABILITY, OR TORT {INCLUDING NEGLIGENCE OR OTHERWISE} ARISING IN ANY WAY
  24. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  25. # SUCH DAMAGE.
  26. #
  27. set -e
  28. version="1.8.1"
  29. clang=false
  30. debugsym=false
  31. regtest=true
  32. openlibm=false
  33. stdlibm=false
  34. stdlibc=false
  35. useldconfig=false
  36. fpic=false
  37. prefix="/usr"
  38. pkgconfigdir="lib/pkgconfig"
  39. mandir="share/man"
  40. cflags=""
  41. cxxflags=""
  42. ldflags=""
  43. gcclib="-lstdc++"
  44. libm=""
  45. libc=""
  46. for arg in "$@"; do
  47. unknown=true
  48. case "$arg" in
  49. --prefix=*)
  50. prefix=`echo $arg | sed 's/--prefix=//'`
  51. unknown=false
  52. ;;
  53. --pkgconfig=*)
  54. pkgconfigdir=`echo $arg | sed 's/--pkgconfig=//'`
  55. unknown=false
  56. ;;
  57. --mandir=*)
  58. mandir=`echo $arg | sed 's/--mandir=//'`
  59. unknown=false
  60. ;;
  61. --cross-compile=*)
  62. crosscompile=`echo $arg | sed 's/--cross-compile=//'`
  63. crosscompile="${crosscompile}-"
  64. unknown=false
  65. ;;
  66. CFLAGS=*)
  67. cflags=`echo $arg | sed 's/CFLAGS=//'`
  68. cflags="${cflags} "
  69. unknown=false
  70. ;;
  71. CXXFLAGS=*)
  72. cxxflags=`echo $arg | sed 's/CXXFLAGS=//'`
  73. cxxflags="${cxxflags} "
  74. unknown=false
  75. ;;
  76. LDFLAGS=*)
  77. ldflags=`echo $arg | sed 's/LDFLAGS=//'`
  78. ldflags="${ldflags} "
  79. unknown=false
  80. ;;
  81. --enable-clang)
  82. clang=true
  83. unknown=false
  84. ;;
  85. --disable-clang)
  86. clang=false
  87. unknown=false
  88. ;;
  89. --enable-ldconfig)
  90. useldconfig=true
  91. unknown=false
  92. ;;
  93. --disable-ldconfig)
  94. useldconfig=false
  95. unknown=false
  96. ;;
  97. --enable-pic)
  98. fpic=true
  99. unknown=false
  100. ;;
  101. --disable-pic)
  102. fpic=false
  103. unknown=false
  104. ;;
  105. --enable-debug)
  106. debugsym=true
  107. unknown=false
  108. ;;
  109. --disable-debug)
  110. debugsym=false
  111. unknown=false
  112. ;;
  113. --enable-test)
  114. regtest=true
  115. unknown=false
  116. ;;
  117. --disable-test)
  118. regtest=false
  119. unknown=false
  120. ;;
  121. --with-libm)
  122. stdlibm=true
  123. unknown=false
  124. ;;
  125. --without-libm)
  126. stdlibm=false
  127. unknown=false
  128. ;;
  129. --with-openlibm)
  130. openlibm=true
  131. unknown=false
  132. ;;
  133. --without-openlibm)
  134. openlibm=false
  135. unknown=false
  136. ;;
  137. --with-stdc++)
  138. gcclib="-lstdc++"
  139. unknown=false
  140. ;;
  141. --without-stdc++)
  142. gcclib=""
  143. unknown=false
  144. ;;
  145. --with-libc)
  146. stdlibc=true
  147. unknown=false
  148. ;;
  149. --without-libc)
  150. stdlibc=false
  151. unknown=false
  152. ;;
  153. --help)
  154. echo "amath configure script ${version}"
  155. echo
  156. echo 'usage: ./configure [options]'
  157. echo 'options:'
  158. echo ' --prefix=<path>: installation prefix'
  159. echo ' --pkgconfig=<path>: pkg-config path (without prefix)'
  160. echo ' --mandir=<path>: manpage path (without prefix)'
  161. echo ' --cross-compile=<prefix>: cross compiler prefix'
  162. echo ' --enable-debug: include debug symbols'
  163. echo ' --disable-debug: do not include debug symbols'
  164. echo ' --enable-test: build code with regression tests'
  165. echo ' --disable-test: do not include regression test'
  166. echo ' --enable-clang: build with clang compiler'
  167. echo ' --disable-clang: do not build with clang compiler'
  168. echo ' --enable-ldconfig: use ldconfig to registre libraries'
  169. echo ' --disable-ldconfig: do not use ldconfig to registre libraries'
  170. echo ' --enable-pic: build with Position Independent Code (-fPIC)'
  171. echo ' --disable-pic: do not build static libraries with Position Independent Code'
  172. echo ' --with-libm: link with libm library (-lm)'
  173. echo ' --without-libm: do not link with libm library'
  174. echo ' --with-openlibm: link with openlibm library (-lopenlibm)'
  175. echo ' --without-openlibm: do not link with openlibm library'
  176. echo ' --with-stdc++: link with stdc++ library (-lstdc++)'
  177. echo ' --without-stdc++: do not link with stdc++ library'
  178. echo ' --with-libc: explicit link with libc library (-lc)'
  179. echo ' --without-libc: do not link with libc library'
  180. echo
  181. echo ' CFLAGS=<flags>: additional compiler flags'
  182. echo ' CXXFLAGS=<flags>: additional compiler flags'
  183. echo ' LDFLAGS=<flags>: additional linker flags'
  184. echo
  185. exit 0
  186. ;;
  187. esac
  188. if $unknown; then
  189. echo "Invalid option $arg"
  190. exit 1
  191. fi
  192. done
  193. if $clang; then
  194. ccompiler="clang"
  195. cxxcompiler="clang++"
  196. else
  197. ccompiler="gcc"
  198. cxxcompiler="g++"
  199. fi
  200. if $regtest; then
  201. options=" -DWITHTEST"
  202. else
  203. options=" "
  204. fi
  205. if $debugsym; then
  206. appop="-O0 -g"
  207. libop="-O0 -g"
  208. exestrip=""
  209. debugflag="-DDEBUG "
  210. else
  211. appop="-O2"
  212. libop="-O3"
  213. exestrip="-s"
  214. debugflag=""
  215. fi
  216. dlibm=false
  217. mflags=""
  218. if $stdlibm; then
  219. libm="-lm "
  220. mflags="-DLIBM "
  221. dlibm=true
  222. fi
  223. if $openlibm; then
  224. libm="-lopenlibm "
  225. mflags="-DLIBM "
  226. dlibm=true
  227. fi
  228. if $useldconfig; then
  229. soverion=".${version}"
  230. else
  231. soverion=""
  232. fi
  233. if $stdlibc; then
  234. gcclib="${gcclib} -lc"
  235. libc="-lc"
  236. fi
  237. if $fpic; then
  238. fPIC=" -fPIC"
  239. else
  240. fPIC=""
  241. fi
  242. cflags="${cflags}${debugflag}${mflags}"
  243. cxxflags="${cflags} ${cxxflags}"
  244. APPSRCS='
  245. evaluator.cpp
  246. functionlist.cpp
  247. fgrid.cpp
  248. lexer.cpp
  249. nodes.cpp
  250. operators.cpp
  251. optimizer.cpp
  252. parser.cpp
  253. token.cpp
  254. userfunction.cpp
  255. values.cpp
  256. viewer.cpp
  257. '
  258. SYSSRCS='
  259. console.cpp
  260. console_amiga.cpp
  261. console_stdc.cpp
  262. console_termios.cpp
  263. console_windows.cpp
  264. filesystem_amiga.cpp
  265. filesystem_stdc.cpp
  266. language.cpp
  267. language_amiga.cpp
  268. language_stdc.cpp
  269. preferences.cpp
  270. preferences_amiga.cpp
  271. preferences_stdc.cpp
  272. program.cpp
  273. program_amiga.cpp
  274. program_haiku.cpp
  275. program_stdc.cpp
  276. program_test.cpp
  277. window_amiga.cpp
  278. window_haiku.cpp
  279. '
  280. FUNCTIONSRC='
  281. absolute.cpp
  282. aexcosecant.cpp
  283. aexsecant.cpp
  284. arcchord.cpp
  285. arccos.cpp
  286. arcsin.cpp
  287. arctan.cpp
  288. arccosecant.cpp
  289. arccotangent.cpp
  290. arcsecant.cpp
  291. arccovercosine.cpp
  292. arccoversine.cpp
  293. archacovercosine.cpp
  294. archacoversine.cpp
  295. archavercosine.cpp
  296. archaversine.cpp
  297. arcvercosine.cpp
  298. arcversine.cpp
  299. ceil.cpp
  300. chord.cpp
  301. cosecant.cpp
  302. cosine.cpp
  303. cotangent.cpp
  304. covercos.cpp
  305. coversin.cpp
  306. cube.cpp
  307. excosecant.cpp
  308. exsecant.cpp
  309. floor.cpp
  310. hacovercos.cpp
  311. hacoversin.cpp
  312. havercos.cpp
  313. haversin.cpp
  314. hyparccosecant.cpp
  315. hyparccosine.cpp
  316. hyparccotangent.cpp
  317. hyparcsecant.cpp
  318. hyparcsine.cpp
  319. hyparctangent.cpp
  320. hypcosecant.cpp
  321. hypcosine.cpp
  322. hypcotangent.cpp
  323. hypsecant.cpp
  324. hypsine.cpp
  325. hyptangent.cpp
  326. ln.cpp
  327. log10.cpp
  328. log2.cpp
  329. node.cpp
  330. round.cpp
  331. secant.cpp
  332. signum.cpp
  333. sine.cpp
  334. square.cpp
  335. tangent.cpp
  336. trunc.cpp
  337. user.cpp
  338. vercos.cpp
  339. versin.cpp
  340. '
  341. STATEMENTSRCS='
  342. about.cpp
  343. clear.cpp
  344. delete.cpp
  345. digits.cpp
  346. draw.cpp
  347. empty.cpp
  348. eval.cpp
  349. execute.cpp
  350. exit.cpp
  351. funcdef.cpp
  352. funclist.cpp
  353. help.cpp
  354. input.cpp
  355. license.cpp
  356. list.cpp
  357. load.cpp
  358. memory.cpp
  359. node.cpp
  360. output.cpp
  361. plot.cpp
  362. prefs.cpp
  363. prompt.cpp
  364. save.cpp
  365. show.cpp
  366. silent.cpp
  367. version.cpp
  368. '
  369. LIBAPPSRCS='
  370. aengine.cpp
  371. bigint.cpp
  372. charbuf.cpp
  373. cplex.cpp
  374. nnumb.cpp
  375. ntext.cpp
  376. ntextd.cpp
  377. ntextp.cpp
  378. real.cpp
  379. '
  380. LIBREALSRCS='
  381. acos.c
  382. acosh.c
  383. asin.c
  384. asinh.c
  385. atan.c
  386. atan2.c
  387. atanh.c
  388. cbrt.c
  389. ceil.c
  390. csign.c
  391. cos.c
  392. cosh.c
  393. exp.c
  394. expm1.c
  395. fabs.c
  396. floor.c
  397. fmod.c
  398. hypot.c
  399. kcos.c
  400. kremp2.c
  401. ksin.c
  402. ktan.c
  403. log.c
  404. log10.c
  405. log1p.c
  406. pow.c
  407. remp2.c
  408. round.c
  409. scalbn.c
  410. sin.c
  411. sinh.c
  412. sqrt.c
  413. tan.c
  414. tanh.c
  415. trunc.c
  416. '
  417. LIBREAL2SRCS='
  418. acot.c
  419. acoth.c
  420. acrd.c
  421. acsc.c
  422. acsch.c
  423. acvc.c
  424. acvs.c
  425. aexc.c
  426. aexs.c
  427. ahcc.c
  428. ahcv.c
  429. ahv.c
  430. ahvc.c
  431. asec.c
  432. asech.c
  433. avcs.c
  434. aver.c
  435. cot.c
  436. coth.c
  437. crd.c
  438. csc.c
  439. csch.c
  440. cvc.c
  441. cvs.c
  442. exc.c
  443. exs.c
  444. hcc.c
  445. hcv.c
  446. hv.c
  447. hvc.c
  448. log2i.c
  449. log2p.c
  450. sec.c
  451. sech.c
  452. vcs.c
  453. ver.c
  454. '
  455. LIBCPLEXSRCS='
  456. cacos.c
  457. cacosh.c
  458. casin.c
  459. casinh.c
  460. catan.c
  461. catanh.c
  462. ccos.c
  463. ccosh.c
  464. cexp.c
  465. clog.c
  466. cpow.c
  467. csin.c
  468. csinh.c
  469. csqrt.c
  470. ctan.c
  471. ctanh.c
  472. '
  473. LIBCPLEX2SRCS='
  474. cacot.c
  475. cacoth.c
  476. cacsc.c
  477. cacsch.c
  478. casec.c
  479. casech.c
  480. ccbrt.c
  481. ccot.c
  482. ccoth.c
  483. ccsc.c
  484. ccsch.c
  485. clogb.c
  486. clog10.c
  487. csec.c
  488. csech.c
  489. csgn.c
  490. prim.c
  491. '
  492. LIBC1SRCS='
  493. alloccpy.c
  494. mem.c
  495. memcpy.c
  496. memset.c
  497. strcmp.c
  498. strlen.c
  499. untag.c
  500. '
  501. FLXSRCS='
  502. asprintf.c
  503. createcat.c
  504. createcatsrc.c
  505. createct.c
  506. globals.c
  507. locale_other.c
  508. main.c
  509. openlibs.c
  510. readprefs.c
  511. scancd.c
  512. scanct.c
  513. scanpo.c
  514. showfuncs.c
  515. strptime.c
  516. swapfuncs.c
  517. utils.c
  518. vastubs.c
  519. '
  520. if $dlibm; then
  521. LIBREALSRCS="${LIBREAL2SRCS}"
  522. else
  523. LIBREALSRCS="${LIBREALSRCS}${LIBREAL2SRCS}"
  524. fi
  525. if $dlibm; then
  526. LIBCPLEXSRCS="${LIBCPLEX2SRCS}"
  527. else
  528. LIBCPLEXSRCS="${LIBCPLEXSRCS}${LIBCPLEX2SRCS}"
  529. fi
  530. amathc="amathc"
  531. amath="amath"
  532. amathcplex="amathcplex"
  533. amathapp="amathapp"
  534. appmain="appmain"
  535. appfunction="functions"
  536. appstatement="statement"
  537. appsystem="appsystem"
  538. program="src/main"
  539. ldsysflags="-l${appsystem} -l${appfunction} -l${appstatement} -l${appmain} -l${appfunction} -l${appstatement} -l${appmain} "
  540. ldlibflags="-l${amathapp} ${libm}-l${amathcplex} ${libm}-l${amath} -l${amathc} ${gcclib}"
  541. ############################ Main Application ###########################
  542. {
  543. echo "CXX = ${crosscompile}${cxxcompiler}"
  544. echo "CXXFLAGS = ${appop}${options} ${cxxflags}${fPIC} -I. -I.. -Wall"
  545. echo "AR = ${crosscompile}ar"
  546. echo "RANLIB = ${crosscompile}ranlib"
  547. echo "DEL = rm -f"
  548. echo
  549. echo "all: lib"
  550. echo "static: lib"
  551. echo
  552. files=""
  553. for f in ${APPSRCS}
  554. do
  555. b=`basename $f .cpp`
  556. echo "${b}.o: ${f}"
  557. echo " \${CXX} \${CXXFLAGS} -c ${f}"
  558. echo
  559. files="${files} ${b}.o"
  560. done
  561. echo "lib: ${files}"
  562. echo " \${AR} rcs lib${appmain}.a ${files}"
  563. echo " \${RANLIB} lib${appmain}.a"
  564. echo
  565. echo "clean:"
  566. echo " \${DEL} lib${appmain}.a ${files}"
  567. echo
  568. } > src/main/Makefile
  569. #########################################################################
  570. ########################### Functions Library ###########################
  571. {
  572. echo "CXX = ${crosscompile}${cxxcompiler}"
  573. echo "CXXFLAGS = ${appop}${options} ${cxxflags}${fPIC} -I. -I../.. -Wall"
  574. echo "AR = ${crosscompile}ar"
  575. echo "RANLIB = ${crosscompile}ranlib"
  576. echo "DEL = rm -f"
  577. echo
  578. echo "all: lib"
  579. echo "static: lib"
  580. echo
  581. files=""
  582. for f in ${FUNCTIONSRC}
  583. do
  584. b=`basename $f .cpp`
  585. echo "${b}.o: ${f}"
  586. echo " \${CXX} \${CXXFLAGS} -c ${f}"
  587. echo
  588. files="${files} ${b}.o"
  589. done
  590. echo "lib: ${files}"
  591. echo " \${AR} rcs lib${appfunction}.a ${files}"
  592. echo " \${RANLIB} lib${appfunction}.a"
  593. echo
  594. echo "clean:"
  595. echo " \${DEL} lib${appfunction}.a ${files}"
  596. echo
  597. } > src/main/function/Makefile
  598. #########################################################################
  599. ########################### Statement Library ###########################
  600. {
  601. echo "CXX = ${crosscompile}${cxxcompiler}"
  602. echo "CXXFLAGS = ${appop}${options} ${cxxflags}${fPIC} -I. -I../.. -Wall"
  603. echo "AR = ${crosscompile}ar"
  604. echo "RANLIB = ${crosscompile}ranlib"
  605. echo "DEL = rm -f"
  606. echo
  607. echo "all: lib"
  608. echo "static: lib"
  609. echo
  610. files=""
  611. for f in ${STATEMENTSRCS}
  612. do
  613. b=`basename $f .cpp`
  614. echo "${b}.o: ${f}"
  615. echo " \${CXX} \${CXXFLAGS} -c ${f}"
  616. echo
  617. files="${files} ${b}.o"
  618. done
  619. echo "lib: ${files}"
  620. echo " \${AR} rcs lib${appstatement}.a ${files}"
  621. echo " \${RANLIB} lib${appstatement}.a"
  622. echo
  623. echo "clean:"
  624. echo " \${DEL} lib${appstatement}.a ${files}"
  625. echo
  626. } > src/main/statement/Makefile
  627. #########################################################################
  628. ############################ System Library #############################
  629. {
  630. echo "CXX = ${crosscompile}${cxxcompiler}"
  631. echo "CXXFLAGS = ${appop}${options} ${cxxflags}${fPIC} -I. -I.. -Wall"
  632. echo "AR = ${crosscompile}ar"
  633. echo "RANLIB = ${crosscompile}ranlib"
  634. echo "DEL = rm -f"
  635. echo
  636. echo "all: lib"
  637. echo "static: lib"
  638. echo
  639. files=""
  640. for f in ${SYSSRCS}
  641. do
  642. b=`basename $f .cpp`
  643. echo "${b}.o: ${f}"
  644. echo " \${CXX} \${CXXFLAGS} -c ${f}"
  645. echo
  646. files="${files} ${b}.o"
  647. done
  648. echo "lib: ${files}"
  649. echo " \${AR} rcs lib${appsystem}.a ${files}"
  650. echo " \${RANLIB} lib${appsystem}.a"
  651. echo
  652. echo "clean:"
  653. echo " \${DEL} lib${appsystem}.a ${files}"
  654. echo
  655. } > src/system/Makefile
  656. #########################################################################
  657. ########################## Application Library ##########################
  658. {
  659. echo "CXX = ${crosscompile}${cxxcompiler}"
  660. echo "CXXFLAGS = ${libop}${options} ${cxxflags}-I. -I.. -Wall"
  661. echo "AR = ${crosscompile}ar"
  662. echo "RANLIB = ${crosscompile}ranlib"
  663. echo "MKDIR = mkdir -p"
  664. echo "RMDIR = rm -Rf"
  665. echo "DEL = rm -f"
  666. echo "INSTALL = install -m 0644"
  667. echo "LDCONFIG = ldconfig"
  668. echo "DOXYGEN = doxygen"
  669. echo "PREFIX = ${prefix}"
  670. echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
  671. echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
  672. echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
  673. echo "alib = lib${amathapp}.a"
  674. echo "solib = lib${amathapp}.so"
  675. echo "pkgconfig = amatha.pc"
  676. echo
  677. echo "all: static shared"
  678. echo
  679. echo "static: \${alib}"
  680. echo
  681. echo "shared: \${solib}"
  682. echo
  683. files=""
  684. files2=""
  685. for f in ${LIBAPPSRCS}
  686. do
  687. b=`basename $f .cpp`
  688. echo "static/${b}.o: ${f}"
  689. echo " \${CXX} \${CXXFLAGS}${fPIC} -c ${f} -o static/${b}.o"
  690. echo
  691. echo "shared/${b}.o: ${f}"
  692. echo " \${CXX} \${CXXFLAGS} -fPIC -c ${f} -o shared/${b}.o"
  693. echo
  694. files="${files} static/${b}.o"
  695. files2="${files2} shared/${b}.o"
  696. done
  697. echo ".PHONY: build"
  698. echo "build:"
  699. echo " \${MKDIR} static"
  700. echo " \${MKDIR} shared"
  701. echo
  702. echo "\${solib}: build ${files2}"
  703. echo " \${CXX} \${CXXFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${files2}"
  704. echo
  705. echo "\${alib}: build ${files}"
  706. echo " \${AR} rcs static/\${alib} ${files}"
  707. echo " \${RANLIB} static/\${alib}"
  708. echo
  709. echo ".PHONY: doc"
  710. echo "doc:"
  711. echo " \${DOXYGEN} amatha.dox"
  712. echo
  713. echo ".PHONY: install"
  714. echo "install: \${alib} \${solib}"
  715. echo " \${MKDIR} \${INSTDIR}"
  716. echo " \${MKDIR} \${INSTDIRPC}"
  717. echo " \${MKDIR} \${INSTDIRI}"
  718. echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
  719. echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
  720. echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
  721. echo " \${INSTALL} aengine.h \${INSTDIRI}/aengine.h"
  722. echo " \${INSTALL} bigint.h \${INSTDIRI}/bigint.h"
  723. echo " \${INSTALL} charbuf.h \${INSTDIRI}/charbuf.h"
  724. echo " \${INSTALL} cplex.h \${INSTDIRI}/cplex.h"
  725. echo " \${INSTALL} nnumb.h \${INSTDIRI}/nnumb.h"
  726. echo " \${INSTALL} ntext.h \${INSTDIRI}/ntext.h"
  727. echo " \${INSTALL} ntext.h \${INSTDIRI}/ntextd.h"
  728. echo " \${INSTALL} ntext.h \${INSTDIRI}/ntextp.h"
  729. echo " \${INSTALL} numb.h \${INSTDIRI}/numb.h"
  730. echo " \${INSTALL} real.h \${INSTDIRI}/real.h"
  731. if ${useldconfig}; then
  732. echo " \${LDCONFIG} \${INSTDIR}"
  733. fi
  734. echo
  735. echo ".PHONY: uninstall"
  736. echo "uninstall:"
  737. echo " \${DEL} \${INSTDIR}/\${alib}"
  738. echo " \${DEL} \${INSTDIR}/\${solib}"
  739. echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
  740. echo " \${DEL} \${INSTDIRI}/aengine.h"
  741. echo " \${DEL} \${INSTDIRI}/charbuf.h"
  742. echo " \${DEL} \${INSTDIRI}/cplex.h"
  743. echo " \${DEL} \${INSTDIRI}/integer.h"
  744. echo " \${DEL} \${INSTDIRI}/nnumb.h"
  745. echo " \${DEL} \${INSTDIRI}/ntext.h"
  746. echo " \${DEL} \${INSTDIRI}/numb.h"
  747. echo " \${DEL} \${INSTDIRI}/real.h"
  748. if ${useldconfig}; then
  749. echo " \${LDCONFIG}"
  750. fi
  751. echo
  752. echo "clean:"
  753. echo " \${DEL} static/\${alib} \${solib} ${files} ${files2}"
  754. echo
  755. echo "very-clean: clean"
  756. echo " \${DEL} doxygen.warn"
  757. echo " \${RMDIR} man"
  758. echo " \${RMDIR} static"
  759. echo " \${RMDIR} shared"
  760. echo
  761. } > src/lib/Makefile
  762. #########################################################################
  763. ############################### C Library ###############################
  764. {
  765. echo "CC = ${crosscompile}${ccompiler}"
  766. echo "CFLAGS = -std=c9x ${libop}${options} ${cflags}-I. -I.. -Wall"
  767. echo "AR = ${crosscompile}ar"
  768. echo "RANLIB = ${crosscompile}ranlib"
  769. echo "MKDIR = mkdir -p"
  770. echo "RMDIR = rm -Rf"
  771. echo "DEL = rm -f"
  772. echo "INSTALL = install -m 0644"
  773. echo "LDCONFIG = ldconfig"
  774. echo "DOXYGEN = doxygen"
  775. echo "PREFIX = ${prefix}"
  776. echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
  777. echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
  778. echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
  779. echo "INSTDIRM = \${DESTDIR}\${PREFIX}/${mandir}/man3"
  780. echo "alib = lib${amathc}.a"
  781. echo "solib = lib${amathc}.so"
  782. echo "pkgconfig = amathc.pc"
  783. echo "manpage = amathc.3"
  784. echo
  785. echo "all: static shared"
  786. echo
  787. echo "static: \${alib}"
  788. echo
  789. echo "shared: \${solib}"
  790. echo
  791. libc=""
  792. libcs=""
  793. for f in ${LIBC1SRCS}
  794. do
  795. b=`basename $f .c`
  796. echo "static/${b}.o: ${f}"
  797. echo " \${CC} \${CFLAGS}${fPIC} -fno-builtin -c ${f} -o static/${b}.o"
  798. echo
  799. echo "shared/${b}.o: ${f}"
  800. echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
  801. echo
  802. libc="${libc} static/${b}.o"
  803. libcs="${libcs} shared/${b}.o"
  804. done
  805. echo ".PHONY: build"
  806. echo "build:"
  807. echo " \${MKDIR} static"
  808. echo " \${MKDIR} shared"
  809. echo
  810. echo "\${solib}: build ${libcs}"
  811. echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${libcs} ${libc}"
  812. echo
  813. echo "\${alib}: build ${libc}"
  814. echo " \${AR} rcs static/\${alib} ${libc}"
  815. echo " \${RANLIB} static/\${alib}"
  816. echo
  817. echo ".PHONY: doc"
  818. echo "doc:"
  819. echo " \${DOXYGEN} amathc.dox"
  820. echo
  821. echo ".PHONY: install"
  822. echo "install: \${alib} \${solib}"
  823. echo " \${MKDIR} \${INSTDIR}"
  824. echo " \${MKDIR} \${INSTDIRPC}"
  825. echo " \${MKDIR} \${INSTDIRI}"
  826. echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
  827. echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
  828. echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
  829. echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
  830. echo " \${INSTALL} ../amath.h \${INSTDIRI}"
  831. echo " \${INSTALL} ../amathc.h \${INSTDIRI}"
  832. if ${useldconfig}; then
  833. echo " \${LDCONFIG} \${INSTDIR}"
  834. fi
  835. echo
  836. echo ".PHONY: uninstall"
  837. echo "uninstall:"
  838. echo " \${DEL} \${INSTDIR}/\${alib}"
  839. echo " \${DEL} \${INSTDIR}/\${solib}"
  840. echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
  841. echo " \${DEL} \${INSTDIRM}/\${manpage}"
  842. echo " \${DEL} \${INSTDIRI}/amath.h"
  843. echo " \${DEL} \${INSTDIRI}/amathc.h"
  844. if ${useldconfig}; then
  845. echo " \${LDCONFIG}"
  846. fi
  847. echo
  848. echo "clean:"
  849. echo " \${DEL} static/\${alib} \${solib} ${libc} ${libcs}"
  850. echo
  851. echo "very-clean: clean"
  852. echo " \${DEL} doxygen.warn"
  853. echo " \${RMDIR} man"
  854. echo " \${RMDIR} static"
  855. echo " \${RMDIR} shared"
  856. echo
  857. } > src/clib/Makefile
  858. #########################################################################
  859. ############################# Real Numbers ##############################
  860. {
  861. echo "CC = ${crosscompile}${ccompiler}"
  862. echo "CFLAGS = -std=c9x ${libop}${options} ${cflags}-I. -I.. -Wall"
  863. echo "AR = ${crosscompile}ar"
  864. echo "RANLIB = ${crosscompile}ranlib"
  865. echo "MKDIR = mkdir -p"
  866. echo "RMDIR = rm -Rf"
  867. echo "DEL = rm -f"
  868. echo "INSTALL = install -m 0644"
  869. echo "LDCONFIG = ldconfig"
  870. echo "DOXYGEN = doxygen"
  871. echo "PREFIX = ${prefix}"
  872. echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
  873. echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
  874. echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
  875. echo "INSTDIRM = \${DESTDIR}\${PREFIX}/${mandir}/man3"
  876. echo "alib = lib${amath}.a"
  877. echo "solib = lib${amath}.so"
  878. echo "pkgconfig = amathr.pc"
  879. echo "manpage = amathr.3"
  880. echo
  881. echo "all: static shared"
  882. echo
  883. echo "static: \${alib}"
  884. echo
  885. echo "shared: \${solib}"
  886. echo
  887. libamath=""
  888. libamaths=""
  889. for f in ${LIBREALSRCS}
  890. do
  891. b=`basename $f .c`
  892. echo "static/${b}.o: ${f}"
  893. echo " \${CC} \${CFLAGS}${fPIC} -fno-builtin -c ${f} -o static/${b}.o"
  894. echo
  895. echo "shared/${b}.o: ${f}"
  896. echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
  897. echo
  898. libamath="${libamath} static/${b}.o"
  899. libamaths="${libamaths} shared/${b}.o"
  900. done
  901. echo ".PHONY: build"
  902. echo "build:"
  903. echo " \${MKDIR} static"
  904. echo " \${MKDIR} shared"
  905. echo
  906. echo "\${solib}: build ${libamaths}"
  907. echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${libamaths}"
  908. echo
  909. echo "\${alib}: build ${libamath}"
  910. echo " \${AR} rcs static/\${alib} ${libamath}"
  911. echo " \${RANLIB} static/\${alib}"
  912. echo
  913. echo ".PHONY: doc"
  914. echo "doc:"
  915. echo " \${DOXYGEN} amathr.dox"
  916. echo
  917. echo ".PHONY: install"
  918. echo "install: \${alib} \${solib}"
  919. echo " \${MKDIR} \${INSTDIR}"
  920. echo " \${MKDIR} \${INSTDIRPC}"
  921. echo " \${MKDIR} \${INSTDIRI}"
  922. echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
  923. echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
  924. echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
  925. echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
  926. echo " \${INSTALL} ../mathr.h \${INSTDIRI}/mathr.h"
  927. if ${useldconfig}; then
  928. echo " \${LDCONFIG} \${INSTDIR}"
  929. fi
  930. echo
  931. echo ".PHONY: uninstall"
  932. echo "uninstall:"
  933. echo " \${DEL} \${INSTDIR}/\${alib}"
  934. echo " \${DEL} \${INSTDIR}/\${solib}"
  935. echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
  936. echo " \${DEL} \${INSTDIRM}/\${manpage}"
  937. echo " \${DEL} \${INSTDIRI}/mathr.h"
  938. if ${useldconfig}; then
  939. echo " \${LDCONFIG}"
  940. fi
  941. echo
  942. echo "clean:"
  943. echo " \${DEL} static/\${alib} \${solib} ${libamath} ${libamaths}"
  944. echo
  945. echo "very-clean: clean"
  946. echo " \${DEL} doxygen.warn"
  947. echo " \${RMDIR} man"
  948. echo " \${RMDIR} static"
  949. echo " \${RMDIR} shared"
  950. echo
  951. } > src/real/Makefile
  952. #########################################################################
  953. ############################ Complex Numbers ############################
  954. {
  955. echo "CC = ${crosscompile}${ccompiler}"
  956. echo "CFLAGS = -std=c9x ${libop}${options} ${cxxflags}-I. -I.. -Wall"
  957. echo "AR = ${crosscompile}ar"
  958. echo "RANLIB = ${crosscompile}ranlib"
  959. echo "MKDIR = mkdir -p"
  960. echo "RMDIR = rm -Rf"
  961. echo "DEL = rm -f"
  962. echo "INSTALL = install -m 0644"
  963. echo "LDCONFIG = ldconfig"
  964. echo "DOXYGEN = doxygen"
  965. echo "PREFIX = ${prefix}"
  966. echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
  967. echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
  968. echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
  969. echo "INSTDIRM = \${DESTDIR}\${PREFIX}/${mandir}/man3"
  970. echo "alib = lib${amathcplex}.a"
  971. echo "solib = lib${amathcplex}.so"
  972. echo "pkgconfig = amathi.pc"
  973. echo "manpage = amathi.3"
  974. echo
  975. echo "all: static shared"
  976. echo
  977. echo "static: \${alib}"
  978. echo
  979. echo "shared: \${solib}"
  980. echo
  981. libcomplex=""
  982. libcomplexs=""
  983. for f in ${LIBCPLEXSRCS}
  984. do
  985. b=`basename $f .c`
  986. echo "static/${b}.o: ${f}"
  987. echo " \${CC} \${CFLAGS}${fPIC} -fno-builtin -c ${f} -o static/${b}.o"
  988. echo
  989. echo "shared/${b}.o: ${f}"
  990. echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
  991. echo
  992. libcomplex="${libcomplex} static/${b}.o"
  993. libcomplexs="${libcomplexs} shared/${b}.o"
  994. done
  995. echo ".PHONY: build"
  996. echo "build:"
  997. echo " \${MKDIR} static"
  998. echo " \${MKDIR} shared"
  999. echo
  1000. echo "\${solib}: build ${libcomplexs}"
  1001. echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${libcomplexs}"
  1002. echo
  1003. echo "\${alib}: build ${libcomplex}"
  1004. echo " \${AR} rcs static/\${alib} ${libcomplex}"
  1005. echo " \${RANLIB} static/\${alib}"
  1006. echo
  1007. echo ".PHONY: doc"
  1008. echo "doc:"
  1009. echo " \${DOXYGEN} amathi.dox"
  1010. echo
  1011. echo ".PHONY: install"
  1012. echo "install: \${alib} \${solib}"
  1013. echo " \${MKDIR} \${INSTDIR}"
  1014. echo " \${MKDIR} \${INSTDIRPC}"
  1015. echo " \${MKDIR} \${INSTDIRI}"
  1016. echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
  1017. echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
  1018. echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
  1019. echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
  1020. echo " \${INSTALL} ../mathi.h \${INSTDIRI}/mathi.h"
  1021. if ${useldconfig}; then
  1022. echo " \${LDCONFIG} \${INSTDIR}"
  1023. fi
  1024. echo
  1025. echo ".PHONY: uninstall"
  1026. echo "uninstall:"
  1027. echo " \${DEL} \${INSTDIR}/\${alib}"
  1028. echo " \${DEL} \${INSTDIR}/\${solib}"
  1029. echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
  1030. echo " \${DEL} \${INSTDIRM}/\${manpage}"
  1031. echo " \${DEL} \${INSTDIRPC}/amathi.pc"
  1032. echo " \${DEL} \${INSTDIRI}/mathi.h"
  1033. if ${useldconfig}; then
  1034. echo " \${LDCONFIG}"
  1035. fi
  1036. echo
  1037. echo "clean:"
  1038. echo " \${DEL} static/\${alib} \${solib} ${libcomplex} ${libcomplexs}"
  1039. echo
  1040. echo "very-clean: clean"
  1041. echo " \${DEL} doxygen.warn"
  1042. echo " \${RMDIR} man"
  1043. echo " \${RMDIR} static"
  1044. echo " \${RMDIR} shared"
  1045. echo
  1046. } > src/cplex/Makefile
  1047. #########################################################################
  1048. ################################# Main ##################################
  1049. {
  1050. echo
  1051. echo "CC = ${crosscompile}${ccompiler}"
  1052. echo "CXX = ${crosscompile}${cxxcompiler}"
  1053. echo "CFLAGS = ${appop}${options} ${cflags}-Wall -Isrc -Isrc/main"
  1054. echo "CXXFLAGS = ${appop}${options} ${cxxflags}-Wall -Isrc -Isrc/main"
  1055. echo "AR = ${crosscompile}ar"
  1056. echo "RANLIB = ${crosscompile}ranlib"
  1057. echo "LFLAGS = ${ldflags}${ldsysflags}${ldlibflags}"
  1058. echo "LPATH = -Lsrc/lib -Lsrc/clib -Lsrc/real -Lsrc/cplex -Lsrc/main/function -Lsrc/main/statement -Lsrc/main -Lsrc/system"
  1059. echo "LPATHS = -Lsrc/lib/static -Lsrc/clib/static -Lsrc/real/static -Lsrc/cplex/static -Lsrc/main/function -Lsrc/main/statement -Lsrc/main -Lsrc/system"
  1060. echo "FLXCAT = build/flexcat/flexcat"
  1061. echo "MKDIR = mkdir -p"
  1062. echo "DEL = rm -f"
  1063. echo "INSTALLP = install -m 0755"
  1064. echo "INSTALLM = install -m 0644"
  1065. echo "PREFIX = ${prefix}"
  1066. echo "INSTDIRP = \${DESTDIR}\${PREFIX}/bin"
  1067. echo "INSTDIRM = \${DESTDIR}\${PREFIX}/${mandir}/man1"
  1068. echo
  1069. echo "all: shared-libs static-libs static-app"
  1070. echo "amath: shared-libs static-libs shared-app"
  1071. echo "static: static-app"
  1072. echo "app: ${appmain} ${appfunction} ${appstatement} ${appsystem}"
  1073. echo "libs: ${amathapp} ${amath} ${amathc} ${amathcplex}"
  1074. echo
  1075. echo "${program}.o: ${program}.cpp"
  1076. echo " \${CXX} \${CXXFLAGS} -c ${program}.cpp -o ${program}.o"
  1077. echo
  1078. echo "${appmain}:"
  1079. echo " cd src/main && \${MAKE}"
  1080. echo
  1081. echo "${appsystem}:"
  1082. echo " cd src/system && \${MAKE}"
  1083. echo
  1084. echo "${appfunction}:"
  1085. echo " cd src/main/function && \${MAKE}"
  1086. echo
  1087. echo "${appstatement}:"
  1088. echo " cd src/main/statement && \${MAKE}"
  1089. echo
  1090. echo "${amathapp}:"
  1091. echo " cd src/lib && \${MAKE}"
  1092. echo
  1093. echo "${amath}:"
  1094. echo " cd src/real && \${MAKE}"
  1095. echo
  1096. echo "${amathc}:"
  1097. echo " cd src/clib && \${MAKE}"
  1098. echo
  1099. echo "${amathcplex}:"
  1100. echo " cd src/cplex && \${MAKE}"
  1101. echo
  1102. echo "locale:"
  1103. echo " cd build/flexcat && \${MAKE}"
  1104. echo " \${FLXCAT} text/keyword.cd src/loc/kword.h=text/keyword.sd"
  1105. echo " \${FLXCAT} text/help.cd src/loc/help.h=text/help.sd"
  1106. echo " \${FLXCAT} text/ident.cd src/loc/ident.h=text/ident.sd"
  1107. echo " \${FLXCAT} text/text.cd src/loc/text.h=text/text.sd"
  1108. echo
  1109. echo "doc:"
  1110. echo " cd src/clib && \${MAKE} doc"
  1111. echo " cd src/real && \${MAKE} doc"
  1112. echo " cd src/cplex && \${MAKE} doc"
  1113. echo
  1114. echo "catalogs:"
  1115. echo " cd build/flexcat && \${MAKE}"
  1116. echo " \${MKDIR} dist/catalog/english"
  1117. echo " \${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG dist/catalog/english/amath-help.catalog"
  1118. echo " \${FLXCAT} text/ident.cd catalog/english/amath-ident.ct CATALOG dist/catalog/english/amath-ident.catalog"
  1119. echo " \${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG dist/catalog/english/amath-text.catalog"
  1120. echo
  1121. echo "shared-libs:"
  1122. echo " cd src/lib && \${MAKE} shared"
  1123. echo " cd src/clib && \${MAKE} shared"
  1124. echo " cd src/real && \${MAKE} shared"
  1125. echo " cd src/cplex && \${MAKE} shared"
  1126. echo
  1127. echo "static-libs:"
  1128. echo " cd src/lib && \${MAKE} static"
  1129. echo " cd src/clib && \${MAKE} static"
  1130. echo " cd src/real && \${MAKE} static"
  1131. echo " cd src/cplex && \${MAKE} static"
  1132. echo
  1133. echo "shared-app: app shared-libs ${program}.o"
  1134. echo " \${CC} \${CFLAGS} ${exestrip} ${program}.o -o amath \${LPATH} \${LFLAGS}"
  1135. echo
  1136. echo "static-app: app static-libs ${program}.o"
  1137. echo " \${CC} \${CFLAGS} ${exestrip} ${program}.o -o amath \${LPATHS} \${LFLAGS}"
  1138. echo
  1139. echo ".PHONY: test"
  1140. echo "test: amath"
  1141. echo " LD_LIBRARY_PATH=src/clib/:src/lib:src/cplex:scr/real"
  1142. echo " ./amath test"
  1143. echo
  1144. echo ".PHONY: install"
  1145. echo "install:"
  1146. echo " cd src/lib && \${MAKE} install"
  1147. echo " cd src/clib && \${MAKE} install"
  1148. echo " cd src/real && \${MAKE} install"
  1149. echo " cd src/cplex && \${MAKE} install"
  1150. echo " \${INSTALLP} amath \${INSTDIRP}/amath"
  1151. echo " \${INSTALLM} amath.1 \${INSTDIRM}/amath.1"
  1152. echo
  1153. echo ".PHONY: uninstall"
  1154. echo "uninstall:"
  1155. echo " cd src/lib && \${MAKE} uninstall"
  1156. echo " cd src/clib && \${MAKE} uninstall"
  1157. echo " cd src/real && \${MAKE} uninstall"
  1158. echo " cd src/cplex && \${MAKE} uninstall"
  1159. echo " \${DEL} \${INSTDIRP}/amath"
  1160. echo " \${DEL} \${INSTDIRM}/amath.1"
  1161. echo
  1162. echo ".PHONY: clean"
  1163. echo "clean:"
  1164. echo " cd src/lib && \${MAKE} clean"
  1165. echo " cd src/clib && \${MAKE} clean"
  1166. echo " cd src/real && \${MAKE} clean"
  1167. echo " cd src/cplex && \${MAKE} clean"
  1168. echo " cd src/main && \${MAKE} clean"
  1169. echo " cd src/system && \${MAKE} clean"
  1170. echo " cd src/main/function && \${MAKE} clean"
  1171. echo " cd src/main/statement && \${MAKE} clean"
  1172. echo " cd build/flexcat && \${MAKE} clean"
  1173. echo " \${DEL} ${program}.o amath"
  1174. echo
  1175. echo ".PHONY: very-clean"
  1176. echo "very-clean: clean"
  1177. echo " cd src/lib && \${MAKE} very-clean"
  1178. echo " cd src/clib && \${MAKE} very-clean"
  1179. echo " cd src/real && \${MAKE} very-clean"
  1180. echo " cd src/cplex && \${MAKE} very-clean"
  1181. echo
  1182. } > Makefile
  1183. #########################################################################
  1184. ################################ Flexcat ################################
  1185. {
  1186. echo 'all: flexcat'
  1187. echo ''
  1188. echo "CFLAGS += -I. -Wall"
  1189. echo ''
  1190. l=""
  1191. for f in ${FLXSRCS}
  1192. do
  1193. b=`basename $f .c`
  1194. echo "${b}.o: ${f}"
  1195. echo " \${CC} \${CFLAGS} -c ${f}"
  1196. echo
  1197. l="${l} ${b}.o"
  1198. done
  1199. echo
  1200. echo "flexcat: ${l}"
  1201. echo " \${CC} \${CFLAGS} -o flexcat ${l} -lm"
  1202. echo
  1203. echo "clean:"
  1204. echo " rm -f ${l} flexcat"
  1205. echo
  1206. } > build/flexcat/Makefile
  1207. #########################################################################
  1208. echo "Makefile generated"