Makefile 19 KB

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