Makefile 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
  1. #
  2. # Makefile generated by fpcmake v0.99.13 [2000/01/04]
  3. #
  4. defaultrule: info
  5. #####################################################################
  6. # Autodetect OS (Linux or Dos or Windows NT)
  7. # define inlinux when running under linux
  8. # define inWinNT when running under WinNT
  9. #####################################################################
  10. # We need only / in the path
  11. override PATH:=$(subst \,/,$(PATH))
  12. # Search for PWD and determine also if we are under linux
  13. PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
  14. ifeq ($(PWD),)
  15. PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
  16. ifeq ($(PWD),)
  17. nopwd:
  18. @echo You need the GNU utils package to use this Makefile!
  19. @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
  20. @exit
  21. else
  22. inlinux=1
  23. endif
  24. else
  25. PWD:=$(firstword $(PWD))
  26. endif
  27. # Detect NT - NT sets OS to Windows_NT
  28. ifndef inlinux
  29. ifeq ($(OS),Windows_NT)
  30. inWinNT=1
  31. endif
  32. endif
  33. # Detect OS/2 - OS/2 has OS2_SHELL defined
  34. ifndef inlinux
  35. ifndef inWinNT
  36. ifdef OS2_SHELL
  37. inOS2=1
  38. endif
  39. endif
  40. endif
  41. # The extension of executables
  42. ifdef inlinux
  43. EXEEXT=
  44. else
  45. EXEEXT=.exe
  46. endif
  47. # The path which is searched separated by spaces
  48. ifdef inlinux
  49. SEARCHPATH=$(subst :, ,$(PATH))
  50. else
  51. SEARCHPATH=$(subst ;, ,$(PATH))
  52. endif
  53. #####################################################################
  54. # FPC version/target Detection
  55. #####################################################################
  56. # What compiler to use ?
  57. ifndef FPC
  58. # Compatibility with old makefiles
  59. ifdef PP
  60. FPC=$(PP)
  61. else
  62. ifdef inOS2
  63. FPC=ppos2$(EXEEXT)
  64. else
  65. FPC=ppc386$(EXEEXT)
  66. endif
  67. endif
  68. endif
  69. # Target OS
  70. ifndef OS_TARGET
  71. OS_TARGET:=$(shell $(FPC) -iTO)
  72. endif
  73. # Source OS
  74. ifndef OS_SOURCE
  75. OS_SOURCE:=$(shell $(FPC) -iSO)
  76. endif
  77. # Target CPU
  78. ifndef CPU_TARGET
  79. CPU_TARGET:=$(shell $(FPC) -iTP)
  80. endif
  81. # Source CPU
  82. ifndef CPU_SOURCE
  83. CPU_SOURCE:=$(shell $(FPC) -iSP)
  84. endif
  85. # FPC version
  86. ifndef FPC_VERSION
  87. FPC_VERSION:=$(shell $(FPC) -iV)
  88. endif
  89. export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
  90. # Default FPCDIR
  91. ifndef FPCDIR
  92. FPCDIR=$(BASEDIR)
  93. endif
  94. # Test FPCDIR to look if the RTL dir exists
  95. ifdef FPCDIR
  96. override FPCDIR:=$(subst \,/,$(FPCDIR))
  97. ifeq ($(wildcard $(FPCDIR)/rtl),)
  98. override FPCDIR=
  99. endif
  100. else
  101. override FPCDIR=
  102. endif
  103. # Detect FPCDIR
  104. ifeq ($(FPCDIR),)
  105. ifdef inlinux
  106. FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  107. else
  108. FPCDIR:=$(subst /$(FPC)$(EXEEXT),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC)$(EXEEXT),$(SEARCHPATH))))))
  109. endif
  110. endif
  111. #####################################################################
  112. # Default Settings
  113. #####################################################################
  114. # Release ? Then force OPT and don't use extra opts via commandline
  115. ifndef REDIRFILE
  116. REDIRFILE=log
  117. endif
  118. ifdef REDIR
  119. ifndef inlinux
  120. override FPC=redir -eo $(FPC)
  121. endif
  122. # set the verbosity to max
  123. override OPT+=-va
  124. override REDIR:= >> $(REDIRFILE)
  125. endif
  126. #####################################################################
  127. # User Settings
  128. #####################################################################
  129. # Targets
  130. override DIROBJECTS+=$(wildcard compiler rtl utils packages ide)
  131. # Clean
  132. # Install
  133. ZIPTARGET=install
  134. # Defaults
  135. # Directories
  136. ifndef PACKAGEDIR
  137. ifneq ($(wildcard $(FPCDIR)/packages),)
  138. PACKAGEDIR=$(FPCDIR)/packages
  139. else
  140. PACKAGEDIR=$(FPCDIR)/units/$(OS_TARGET)
  141. endif
  142. endif
  143. ifndef COMPONENTDIR
  144. COMPONENTDIR=$(FPCDIR)/components
  145. endif
  146. # Packages
  147. override PACKAGES=rtl
  148. PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
  149. # Libraries
  150. # Post Settings
  151. export RELEASE=1
  152. #####################################################################
  153. # Default Directories
  154. #####################################################################
  155. # Base dir
  156. ifdef PWD
  157. BASEDIR:=$(shell $(PWD))
  158. else
  159. BASEDIR=.
  160. endif
  161. # this can be set to 'rtl' when the RTL units are installed
  162. ifndef UNITPREFIX
  163. UNITPREFIX=units
  164. endif
  165. # set the prefix directory where to install everything
  166. ifndef PREFIXINSTALLDIR
  167. ifdef inlinux
  168. PREFIXINSTALLDIR=/usr
  169. else
  170. PREFIXINSTALLDIR=/pp
  171. endif
  172. endif
  173. export PREFIXINSTALLDIR
  174. # Create rtl,fcl,units dir
  175. ifneq ($(FPCDIR),.)
  176. override RTLDIR=$(FPCDIR)/rtl/$(OS_TARGET)
  177. override UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
  178. endif
  179. #####################################################################
  180. # Install Directories
  181. #####################################################################
  182. # set the base directory where to install everything
  183. ifndef BASEINSTALLDIR
  184. ifdef inlinux
  185. BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
  186. else
  187. BASEINSTALLDIR=$(PREFIXINSTALLDIR)
  188. endif
  189. endif
  190. # set the directory where to install the binaries
  191. ifndef BININSTALLDIR
  192. ifdef inlinux
  193. BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
  194. else
  195. BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
  196. endif
  197. endif
  198. # set the directory where to install the units.
  199. ifndef UNITINSTALLDIR
  200. UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
  201. ifdef UNITSUBDIR
  202. UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
  203. endif
  204. endif
  205. # Where to install shared libraries
  206. ifndef LIBINSTALLDIR
  207. ifdef inlinux
  208. LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
  209. else
  210. LIBINSTALLDIR=$(UNITINSTALLDIR)
  211. endif
  212. endif
  213. # Where the source files will be stored
  214. ifndef SOURCEINSTALLDIR
  215. ifdef inlinux
  216. SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
  217. else
  218. SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
  219. endif
  220. endif
  221. # Where the doc files will be stored
  222. ifndef DOCINSTALLDIR
  223. ifdef inlinux
  224. DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(FPC_VERSION)
  225. else
  226. DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
  227. endif
  228. endif
  229. # Where the some extra (data)files will be stored
  230. ifndef EXTRAINSTALLDIR
  231. EXTRAINSTALLDIR=$(BASEINSTALLDIR)
  232. endif
  233. #####################################################################
  234. # Shell tools
  235. #####################################################################
  236. # To copy pograms
  237. ifndef COPY
  238. COPY:=cp -fp
  239. endif
  240. # Copy a whole tree
  241. ifndef COPYTREE
  242. COPYTREE:=cp -rfp
  243. endif
  244. # To move pograms
  245. ifndef MOVE
  246. MOVE:=mv -f
  247. endif
  248. # Check delete program
  249. ifndef DEL
  250. DEL:=rm -f
  251. endif
  252. # Check deltree program
  253. ifndef DELTREE
  254. DELTREE:=rm -rf
  255. endif
  256. # To install files
  257. ifndef INSTALL
  258. ifdef inlinux
  259. INSTALL:=install -m 644
  260. else
  261. INSTALL:=$(COPY)
  262. endif
  263. endif
  264. # To install programs
  265. ifndef INSTALLEXE
  266. ifdef inlinux
  267. INSTALLEXE:=install -m 755
  268. else
  269. INSTALLEXE:=$(COPY)
  270. endif
  271. endif
  272. # To make a directory.
  273. ifndef MKDIR
  274. ifdef inlinux
  275. MKDIR:=install -m 755 -d
  276. else
  277. MKDIR:=ginstall -m 755 -d
  278. endif
  279. endif
  280. export COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  281. #####################################################################
  282. # Default Tools
  283. #####################################################################
  284. # assembler, redefine it if cross compiling
  285. ifndef AS
  286. AS=as
  287. endif
  288. # linker, but probably not used
  289. ifndef LD
  290. LD=ld
  291. endif
  292. # ppas.bat / ppas.sh
  293. ifdef inlinux
  294. PPAS=ppas.sh
  295. else
  296. ifdef inOS2
  297. PPAS=ppas.cmd
  298. else
  299. PPAS=ppas.bat
  300. endif
  301. endif
  302. # also call ppas if with command option -s
  303. ifeq (,$(findstring -s ,$(COMPILER)))
  304. EXECPPAS=
  305. else
  306. EXECPPAS:=@$(PPAS)
  307. endif
  308. # ldconfig to rebuild .so cache
  309. ifdef inlinux
  310. LDCONFIG=ldconfig
  311. else
  312. LDCONFIG=
  313. endif
  314. # echo
  315. ifndef ECHO
  316. ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
  317. ifeq ($(ECHO),)
  318. ECHO:=echo
  319. else
  320. ECHO:=$(firstword $(ECHO))
  321. endif
  322. endif
  323. export ECHO
  324. # ppdep
  325. ifndef PPDEP
  326. PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
  327. ifeq ($(PPDEP),)
  328. PPDEP=
  329. else
  330. PPDEP:=$(firstword $(PPDEP))
  331. endif
  332. endif
  333. export PPDEP
  334. # ppumove
  335. ifndef PPUMOVE
  336. PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
  337. ifeq ($(PPUMOVE),)
  338. PPUMOVE=
  339. else
  340. PPUMOVE:=$(firstword $(PPUMOVE))
  341. endif
  342. endif
  343. export PPUMOVE
  344. # ppufiles
  345. ifndef PPUFILES
  346. PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
  347. ifeq ($(PPUFILES),)
  348. PPUFILES=
  349. else
  350. PPUFILES:=$(firstword $(PPUFILES))
  351. endif
  352. endif
  353. export PPUFILES
  354. # Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
  355. # upx uses that one itself (PFV)
  356. ifndef UPXPROG
  357. ifeq ($(OS_TARGET),go32v2)
  358. UPXPROG:=1
  359. endif
  360. ifeq ($(OS_TARGET),win32)
  361. UPXPROG:=1
  362. endif
  363. ifdef UPXPROG
  364. UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
  365. ifeq ($(UPXPROG),)
  366. UPXPROG=
  367. else
  368. UPXPROG:=$(firstword $(UPXPROG))
  369. endif
  370. else
  371. UPXPROG=
  372. endif
  373. endif
  374. export UPXPROG
  375. # gdate/date
  376. ifndef DATE
  377. DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
  378. ifeq ($(DATE),)
  379. DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
  380. ifeq ($(DATE),)
  381. DATE=
  382. else
  383. DATE:=$(firstword $(DATE))
  384. endif
  385. else
  386. DATE:=$(firstword $(DATE))
  387. endif
  388. endif
  389. export DATE
  390. ifdef DATE
  391. DATESTR:=$(shell $(DATE) +%Y%m%d)
  392. else
  393. DATESTR=
  394. endif
  395. # ZipProg, you can't use Zip as the var name (PFV)
  396. ifndef ZIPPROG
  397. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
  398. ifeq ($(ZIPPROG),)
  399. ZIPPROG=
  400. else
  401. ZIPPROG:=$(firstword $(ZIPPROG)) -D9 -r
  402. endif
  403. endif
  404. export ZIPPROG
  405. ifndef ZIPEXT
  406. ZIPEXT=.zip
  407. endif
  408. #####################################################################
  409. # Default extensions
  410. #####################################################################
  411. # Default needed extensions (Go32v2,Linux)
  412. LOADEREXT=.as
  413. PPLEXT=.ppl
  414. PPUEXT=.ppu
  415. OEXT=.o
  416. ASMEXT=.s
  417. SMARTEXT=.sl
  418. STATICLIBEXT=.a
  419. SHAREDLIBEXT=.so
  420. RSTEXT=.rst
  421. PACKAGESUFFIX=
  422. FPCMADE=fpcmade
  423. # Go32v1
  424. ifeq ($(OS_TARGET),go32v1)
  425. PPUEXT=.pp1
  426. OEXT=.o1
  427. ASMEXT=.s1
  428. SMARTEXT=.sl1
  429. STATICLIBEXT=.a1
  430. SHAREDLIBEXT=.so1
  431. PACKAGESUFFIX=v1
  432. FPCMADE=fpcmade.v1
  433. endif
  434. # Go32v2
  435. ifeq ($(OS_TARGET),go32v2)
  436. PACKAGESUFFIX=go32
  437. FPCMADE=fpcmade.dos
  438. endif
  439. # Linux
  440. ifeq ($(OS_TARGET),linux)
  441. PACKAGESUFFIX=linux
  442. FPCMADE=fpcmade.lnx
  443. endif
  444. # Win32
  445. ifeq ($(OS_TARGET),win32)
  446. PPUEXT=.ppw
  447. OEXT=.ow
  448. ASMEXT=.sw
  449. SMARTEXT=.slw
  450. STATICLIBEXT=.aw
  451. SHAREDLIBEXT=.dll
  452. PACKAGESUFFIX=win32
  453. FPCMADE=fpcmade.w32
  454. endif
  455. # OS/2
  456. ifeq ($(OS_TARGET),os2)
  457. PPUEXT=.ppo
  458. ASMEXT=.so2
  459. OEXT=.oo2
  460. SMARTEXT=.so
  461. STATICLIBEXT=.ao2
  462. SHAREDLIBEXT=.dll
  463. PACKAGESUFFIX=os2
  464. FPCMADE=fpcmade.os2
  465. endif
  466. # library prefix
  467. LIBPREFIX=lib
  468. ifeq ($(OS_TARGET),go32v2)
  469. LIBPREFIX=
  470. endif
  471. ifeq ($(OS_TARGET),go32v1)
  472. LIBPREFIX=
  473. endif
  474. # determine which .pas extension is used
  475. ifndef PASEXT
  476. ifdef EXEOBJECTS
  477. override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
  478. else
  479. override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
  480. endif
  481. ifeq ($(TESTPAS),)
  482. PASEXT=.pp
  483. else
  484. PASEXT=.pas
  485. endif
  486. endif
  487. #####################################################################
  488. # Standard rules
  489. #####################################################################
  490. all: $(addsuffix _all,$(DIROBJECTS))
  491. debug: $(addsuffix _debug,$(DIROBJECTS))
  492. examples: $(addsuffix _examples,$(DIROBJECTS))
  493. test: $(addsuffix _test,$(DIROBJECTS))
  494. smart: $(addsuffix _smart,$(DIROBJECTS))
  495. shared: $(addsuffix _shared,$(DIROBJECTS))
  496. showinstall: $(addsuffix _showinstall,$(DIROBJECTS))
  497. install: $(addsuffix _install,$(DIROBJECTS))
  498. sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
  499. clean: $(addsuffix _clean,$(DIROBJECTS))
  500. cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
  501. require: $(addsuffix _require,$(DIROBJECTS))
  502. .PHONY: all debug examples test smart shared showinstall install sourceinstall clean cleanall require
  503. ifdef PACKAGERTL
  504. ifneq ($(wildcard $(PACKAGEDIR_RTL)),)
  505. ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
  506. override COMPILEPACKAGES+=rtl
  507. rtl_package:
  508. $(MAKE) -C $(PACKAGEDIR_RTL) all
  509. endif
  510. endif
  511. endif
  512. .PHONY: rtl_package
  513. # Target Dirs
  514. OBJECTDIRCOMPILER=1
  515. OBJECTDIRRTL=1
  516. OBJECTDIRUTILS=1
  517. OBJECTDIRPACKAGES=1
  518. OBJECTDIRFCL=1
  519. OBJECTDIRIDE=1
  520. # Dir compiler
  521. ifdef OBJECTDIRCOMPILER
  522. .PHONY: compiler_all compiler_debug compiler_examples compiler_test compiler_smart compiler_shared compiler_showinstall compiler_install compiler_sourceinstall compiler_zipinstall compiler_zipinstalladd compiler_clean compiler_cleanall compiler_require compiler_info
  523. compiler_all:
  524. $(MAKE) -C compiler all
  525. compiler_debug:
  526. $(MAKE) -C compiler debug
  527. compiler_examples:
  528. $(MAKE) -C compiler examples
  529. compiler_test:
  530. $(MAKE) -C compiler test
  531. compiler_smart:
  532. $(MAKE) -C compiler smart
  533. compiler_shared:
  534. $(MAKE) -C compiler shared
  535. compiler_showinstall:
  536. $(MAKE) -C compiler showinstall
  537. compiler_install:
  538. $(MAKE) -C compiler install
  539. compiler_sourceinstall:
  540. $(MAKE) -C compiler sourceinstall
  541. compiler_zipinstall:
  542. $(MAKE) -C compiler zipinstall
  543. compiler_zipinstalladd:
  544. $(MAKE) -C compiler zipinstalladd
  545. compiler_clean:
  546. $(MAKE) -C compiler clean
  547. compiler_cleanall:
  548. $(MAKE) -C compiler cleanall
  549. compiler_require:
  550. $(MAKE) -C compiler require
  551. compiler_info:
  552. $(MAKE) -C compiler info
  553. endif
  554. # Dir rtl
  555. ifdef OBJECTDIRRTL
  556. .PHONY: rtl_all rtl_debug rtl_examples rtl_test rtl_smart rtl_shared rtl_showinstall rtl_install rtl_sourceinstall rtl_zipinstall rtl_zipinstalladd rtl_clean rtl_cleanall rtl_require rtl_info
  557. rtl_all:
  558. $(MAKE) -C rtl all
  559. rtl_debug:
  560. $(MAKE) -C rtl debug
  561. rtl_examples:
  562. $(MAKE) -C rtl examples
  563. rtl_test:
  564. $(MAKE) -C rtl test
  565. rtl_smart:
  566. $(MAKE) -C rtl smart
  567. rtl_shared:
  568. $(MAKE) -C rtl shared
  569. rtl_showinstall:
  570. $(MAKE) -C rtl showinstall
  571. rtl_install:
  572. $(MAKE) -C rtl install
  573. rtl_sourceinstall:
  574. $(MAKE) -C rtl sourceinstall
  575. rtl_zipinstall:
  576. $(MAKE) -C rtl zipinstall
  577. rtl_zipinstalladd:
  578. $(MAKE) -C rtl zipinstalladd
  579. rtl_clean:
  580. $(MAKE) -C rtl clean
  581. rtl_cleanall:
  582. $(MAKE) -C rtl cleanall
  583. rtl_require:
  584. $(MAKE) -C rtl require
  585. rtl_info:
  586. $(MAKE) -C rtl info
  587. endif
  588. # Dir utils
  589. ifdef OBJECTDIRUTILS
  590. .PHONY: utils_all utils_debug utils_examples utils_test utils_smart utils_shared utils_showinstall utils_install utils_sourceinstall utils_zipinstall utils_zipinstalladd utils_clean utils_cleanall utils_require utils_info
  591. utils_all:
  592. $(MAKE) -C utils all
  593. utils_debug:
  594. $(MAKE) -C utils debug
  595. utils_examples:
  596. $(MAKE) -C utils examples
  597. utils_test:
  598. $(MAKE) -C utils test
  599. utils_smart:
  600. $(MAKE) -C utils smart
  601. utils_shared:
  602. $(MAKE) -C utils shared
  603. utils_showinstall:
  604. $(MAKE) -C utils showinstall
  605. utils_install:
  606. $(MAKE) -C utils install
  607. utils_sourceinstall:
  608. $(MAKE) -C utils sourceinstall
  609. utils_zipinstall:
  610. $(MAKE) -C utils zipinstall
  611. utils_zipinstalladd:
  612. $(MAKE) -C utils zipinstalladd
  613. utils_clean:
  614. $(MAKE) -C utils clean
  615. utils_cleanall:
  616. $(MAKE) -C utils cleanall
  617. utils_require:
  618. $(MAKE) -C utils require
  619. utils_info:
  620. $(MAKE) -C utils info
  621. endif
  622. # Dir packages
  623. ifdef OBJECTDIRPACKAGES
  624. .PHONY: packages_all packages_debug packages_examples packages_test packages_smart packages_shared packages_showinstall packages_install packages_sourceinstall packages_zipinstall packages_zipinstalladd packages_clean packages_cleanall packages_require packages_info
  625. packages_all:
  626. $(MAKE) -C packages all
  627. packages_debug:
  628. $(MAKE) -C packages debug
  629. packages_examples:
  630. $(MAKE) -C packages examples
  631. packages_test:
  632. $(MAKE) -C packages test
  633. packages_smart:
  634. $(MAKE) -C packages smart
  635. packages_shared:
  636. $(MAKE) -C packages shared
  637. packages_showinstall:
  638. $(MAKE) -C packages showinstall
  639. packages_install:
  640. $(MAKE) -C packages install
  641. packages_sourceinstall:
  642. $(MAKE) -C packages sourceinstall
  643. packages_zipinstall:
  644. $(MAKE) -C packages zipinstall
  645. packages_zipinstalladd:
  646. $(MAKE) -C packages zipinstalladd
  647. packages_clean:
  648. $(MAKE) -C packages clean
  649. packages_cleanall:
  650. $(MAKE) -C packages cleanall
  651. packages_require:
  652. $(MAKE) -C packages require
  653. packages_info:
  654. $(MAKE) -C packages info
  655. endif
  656. # Dir fcl
  657. ifdef OBJECTDIRFCL
  658. .PHONY: fcl_all fcl_debug fcl_examples fcl_test fcl_smart fcl_shared fcl_showinstall fcl_install fcl_sourceinstall fcl_zipinstall fcl_zipinstalladd fcl_clean fcl_cleanall fcl_require fcl_info
  659. fcl_all:
  660. $(MAKE) -C fcl all
  661. fcl_debug:
  662. $(MAKE) -C fcl debug
  663. fcl_examples:
  664. $(MAKE) -C fcl examples
  665. fcl_test:
  666. $(MAKE) -C fcl test
  667. fcl_smart:
  668. $(MAKE) -C fcl smart
  669. fcl_shared:
  670. $(MAKE) -C fcl shared
  671. fcl_showinstall:
  672. $(MAKE) -C fcl showinstall
  673. fcl_install:
  674. $(MAKE) -C fcl install
  675. fcl_sourceinstall:
  676. $(MAKE) -C fcl sourceinstall
  677. fcl_zipinstall:
  678. $(MAKE) -C fcl zipinstall
  679. fcl_zipinstalladd:
  680. $(MAKE) -C fcl zipinstalladd
  681. fcl_clean:
  682. $(MAKE) -C fcl clean
  683. fcl_cleanall:
  684. $(MAKE) -C fcl cleanall
  685. fcl_require:
  686. $(MAKE) -C fcl require
  687. fcl_info:
  688. $(MAKE) -C fcl info
  689. endif
  690. # Dir ide
  691. ifdef OBJECTDIRIDE
  692. .PHONY: ide_all ide_debug ide_examples ide_test ide_smart ide_shared ide_showinstall ide_install ide_sourceinstall ide_zipinstall ide_zipinstalladd ide_clean ide_cleanall ide_require ide_info
  693. ide_all:
  694. $(MAKE) -C ide all
  695. ide_debug:
  696. $(MAKE) -C ide debug
  697. ide_examples:
  698. $(MAKE) -C ide examples
  699. ide_test:
  700. $(MAKE) -C ide test
  701. ide_smart:
  702. $(MAKE) -C ide smart
  703. ide_shared:
  704. $(MAKE) -C ide shared
  705. ide_showinstall:
  706. $(MAKE) -C ide showinstall
  707. ide_install:
  708. $(MAKE) -C ide install
  709. ide_sourceinstall:
  710. $(MAKE) -C ide sourceinstall
  711. ide_zipinstall:
  712. $(MAKE) -C ide zipinstall
  713. ide_zipinstalladd:
  714. $(MAKE) -C ide zipinstalladd
  715. ide_clean:
  716. $(MAKE) -C ide clean
  717. ide_cleanall:
  718. $(MAKE) -C ide cleanall
  719. ide_require:
  720. $(MAKE) -C ide require
  721. ide_info:
  722. $(MAKE) -C ide info
  723. endif
  724. #####################################################################
  725. # Users rules
  726. #####################################################################
  727. #####################################################################
  728. # Main targets
  729. #####################################################################
  730. .PHONY: compiler_cycle \
  731. idezips ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip \
  732. fclzip gtkzip fvzip compilerzip utilszip
  733. info:
  734. @echo
  735. @echo Please use one of the following targets:
  736. @echo
  737. @echo $(DIROBJECTS)
  738. @echo
  739. @echo All targets can follow after a _ with:
  740. @echo all,clean,install,staticinstall,sharedinstall
  741. @echo
  742. @echo example: make api_staticinstall
  743. @exit
  744. #####################################################################
  745. # Dependencies
  746. #####################################################################
  747. #######################################
  748. # Compiler
  749. #######################################
  750. compiler_cycle:
  751. $(MAKE) -C compiler cycle
  752. #######################################
  753. # IDE
  754. #######################################
  755. ide_gdb:
  756. $(MAKE) -C ide gdb
  757. ide_full:
  758. $(MAKE) -C ide full
  759. ide_fullgdb:
  760. $(MAKE) -C ide fullgdb
  761. #######################################
  762. # Install targets
  763. #######################################
  764. demo_install:
  765. $(MAKE) -C demo installdemo
  766. man_install:
  767. $(MAKE) -C man installman
  768. #######################################
  769. # Packaging targets
  770. #######################################
  771. export DESTZIPDIR:=$(BASEDIR)
  772. idezips: clean ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip
  773. ide_allzip:
  774. $(MAKE) ide_clean
  775. $(MAKE) ide_all
  776. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-fake-$(PACKAGESUFFIX)
  777. ide_gdbzip:
  778. $(MAKE) ide_clean
  779. $(MAKE) ide_gdb
  780. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-gdb-$(PACKAGESUFFIX)
  781. ide_fullzip:
  782. $(MAKE) compiler_clean
  783. $(MAKE) ide_clean
  784. $(MAKE) ide_full
  785. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-comp-$(PACKAGESUFFIX)
  786. ide_fullgdbzip:
  787. $(MAKE) ide_clean
  788. $(MAKE) ide_fullgdb
  789. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-full-$(PACKAGESUFFIX)
  790. fvzip: rtl_clean
  791. $(MAKE) -C packages api_clean
  792. $(MAKE) -C packages fv_clean
  793. $(MAKE) -C packages fv_all
  794. $(MAKE) -C packages api_zipinstall ZIPNAME=fv-$(PACKAGESUFFIX)
  795. $(MAKE) -C packages fv_zipinstalladd ZIPNAME=fv-$(PACKAGESUFFIX)
  796. gtkzip: rtl_clean
  797. $(MAKE) -C packages gtk_clean
  798. $(MAKE) -C packages gtk_all
  799. $(MAKE) -C packages gtk_zipinstall ZIPNAME=gtk-$(PACKAGESUFFIX)
  800. compilerzip: compiler_clean rtl_clean
  801. $(MAKE) rtl_all
  802. $(MAKE) compiler_all
  803. $(MAKE) compiler_zipinstall ZIPTARGET=quickinstall ZIPNAME=compiler-$(PACKAGESUFFIX)
  804. $(MAKE) rtl_zipinstalladd ZIPNAME=compiler-$(PACKAGESUFFIX)
  805. fclzip: rtl_clean fcl_clean
  806. $(MAKE) fcl_all
  807. $(MAKE) fcl_zipinstall ZIPNAME=fcl-$(PACKAGESUFFIX)
  808. utilszip: utils_clean rtl_clean fcl_clean
  809. $(MAKE) utils_all
  810. $(MAKE) utils_zipinstall ZIPNAME=utils-$(PACKAGESUFFIX)