Makefile 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185
  1. #
  2. # Makefile generated by fpcmake v0.99.13 [2000/01/28]
  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. # Base dir
  54. ifdef PWD
  55. BASEDIR:=$(shell $(PWD))
  56. else
  57. BASEDIR=.
  58. endif
  59. #####################################################################
  60. # FPC version/target Detection
  61. #####################################################################
  62. # What compiler to use ?
  63. ifndef FPC
  64. # Compatibility with old makefiles
  65. ifdef PP
  66. FPC=$(PP)
  67. else
  68. ifdef inOS2
  69. FPC=ppos2
  70. else
  71. FPC=ppc386
  72. endif
  73. endif
  74. endif
  75. override FPC:=$(subst $(EXEEXT),,$(FPC))
  76. override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
  77. # Target OS
  78. ifndef OS_TARGET
  79. OS_TARGET:=$(shell $(FPC) -iTO)
  80. endif
  81. # Source OS
  82. ifndef OS_SOURCE
  83. OS_SOURCE:=$(shell $(FPC) -iSO)
  84. endif
  85. # Target CPU
  86. ifndef CPU_TARGET
  87. CPU_TARGET:=$(shell $(FPC) -iTP)
  88. endif
  89. # Source CPU
  90. ifndef CPU_SOURCE
  91. CPU_SOURCE:=$(shell $(FPC) -iSP)
  92. endif
  93. # FPC version
  94. ifndef FPC_VERSION
  95. FPC_VERSION:=$(shell $(FPC) -iV)
  96. endif
  97. export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
  98. #####################################################################
  99. # FPCDIR Setting
  100. #####################################################################
  101. # Test FPCDIR to look if the RTL dir exists
  102. ifdef FPCDIR
  103. override FPCDIR:=$(subst \,/,$(FPCDIR))
  104. ifeq ($(wildcard $(FPCDIR)/rtl),)
  105. ifeq ($(wildcard $(FPCDIR)/units),)
  106. override FPCDIR=wrong
  107. endif
  108. endif
  109. else
  110. override FPCDIR=wrong
  111. endif
  112. # Default FPCDIR
  113. ifeq ($(FPCDIR),wrong)
  114. override FPCDIR=$(BASEDIR)
  115. ifeq ($(wildcard $(FPCDIR)/rtl),)
  116. ifeq ($(wildcard $(FPCDIR)/units),)
  117. override FPCDIR=wrong
  118. endif
  119. endif
  120. endif
  121. # Detect FPCDIR
  122. ifeq ($(FPCDIR),wrong)
  123. ifdef inlinux
  124. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  125. ifeq ($(wildcard $(FPCDIR)/units),)
  126. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  127. endif
  128. else
  129. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  130. override FPCDIR:=$(FPCDIR)/..
  131. ifeq ($(wildcard $(FPCDIR)/rtl),)
  132. ifeq ($(wildcard $(FPCDIR)/units),)
  133. override FPCDIR:=$(FPCDIR)/..
  134. ifeq ($(wildcard $(FPCDIR)/rtl),)
  135. ifeq ($(wildcard $(FPCDIR)/units),)
  136. override FPCDIR=c:/pp
  137. endif
  138. endif
  139. endif
  140. endif
  141. endif
  142. endif
  143. #####################################################################
  144. # User Settings
  145. #####################################################################
  146. # Targets
  147. override DIROBJECTS+=$(wildcard compiler rtl utils fcl api fv packages ide)
  148. # Clean
  149. # Install
  150. ZIPTARGET=install
  151. # Defaults
  152. # Directories
  153. # Packages
  154. # Libraries
  155. #####################################################################
  156. # Post Settings
  157. #####################################################################
  158. export RELEASE=1
  159. #####################################################################
  160. # Shell tools
  161. #####################################################################
  162. # echo
  163. ifndef ECHO
  164. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
  165. ifeq ($(ECHO),)
  166. ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
  167. ifeq ($(ECHO),)
  168. ECHO:=echo
  169. ECHOE:=echo
  170. else
  171. ECHO:=$(firstword $(ECHO))
  172. ECHOE=$(ECHO) -E
  173. endif
  174. else
  175. ECHO:=$(firstword $(ECHO))
  176. ECHOE=$(ECHO) -E
  177. endif
  178. endif
  179. # To copy pograms
  180. ifndef COPY
  181. COPY:=cp -fp
  182. endif
  183. # Copy a whole tree
  184. ifndef COPYTREE
  185. COPYTREE:=cp -rfp
  186. endif
  187. # To move pograms
  188. ifndef MOVE
  189. MOVE:=mv -f
  190. endif
  191. # Check delete program
  192. ifndef DEL
  193. DEL:=rm -f
  194. endif
  195. # Check deltree program
  196. ifndef DELTREE
  197. DELTREE:=rm -rf
  198. endif
  199. # To install files
  200. ifndef INSTALL
  201. ifdef inlinux
  202. INSTALL:=install -m 644
  203. else
  204. INSTALL:=$(COPY)
  205. endif
  206. endif
  207. # To install programs
  208. ifndef INSTALLEXE
  209. ifdef inlinux
  210. INSTALLEXE:=install -m 755
  211. else
  212. INSTALLEXE:=$(COPY)
  213. endif
  214. endif
  215. # To make a directory.
  216. ifndef MKDIR
  217. ifdef inlinux
  218. MKDIR:=install -m 755 -d
  219. else
  220. MKDIR:=ginstall -m 755 -d
  221. endif
  222. endif
  223. export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  224. #####################################################################
  225. # Default Tools
  226. #####################################################################
  227. # assembler, redefine it if cross compiling
  228. ifndef AS
  229. AS=as
  230. endif
  231. # linker, but probably not used
  232. ifndef LD
  233. LD=ld
  234. endif
  235. # ppas.bat / ppas.sh
  236. ifdef inlinux
  237. PPAS=ppas.sh
  238. else
  239. ifdef inOS2
  240. PPAS=ppas.cmd
  241. else
  242. PPAS=ppas.bat
  243. endif
  244. endif
  245. # ldconfig to rebuild .so cache
  246. ifdef inlinux
  247. LDCONFIG=ldconfig
  248. else
  249. LDCONFIG=
  250. endif
  251. # ZipProg, you can't use Zip as the var name (PFV)
  252. ifndef ZIPPROG
  253. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
  254. ifeq ($(ZIPPROG),)
  255. ZIPPROG=
  256. else
  257. ZIPPROG:=$(firstword $(ZIPPROG))
  258. endif
  259. endif
  260. export ZIPPROG
  261. ZIPOPT=-9
  262. ZIPEXT=.zip
  263. # Tar
  264. ifndef TARPROG
  265. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
  266. ifeq ($(TARPROG),)
  267. TARPROG=
  268. else
  269. TARPROG:=$(firstword $(TARPROG))
  270. endif
  271. endif
  272. export TARPROG
  273. ifeq ($(USETAR),bz2)
  274. TAROPT=vI
  275. TAREXT=.tar.bz2
  276. else
  277. TAROPT=vz
  278. TAREXT=.tar.gz
  279. endif
  280. #####################################################################
  281. # Default extensions
  282. #####################################################################
  283. # Default needed extensions (Go32v2,Linux)
  284. LOADEREXT=.as
  285. PPLEXT=.ppl
  286. PPUEXT=.ppu
  287. OEXT=.o
  288. ASMEXT=.s
  289. SMARTEXT=.sl
  290. STATICLIBEXT=.a
  291. SHAREDLIBEXT=.so
  292. RSTEXT=.rst
  293. FPCMADE=fpcmade
  294. # Go32v1
  295. ifeq ($(OS_TARGET),go32v1)
  296. PPUEXT=.pp1
  297. OEXT=.o1
  298. ASMEXT=.s1
  299. SMARTEXT=.sl1
  300. STATICLIBEXT=.a1
  301. SHAREDLIBEXT=.so1
  302. FPCMADE=fpcmade.v1
  303. endif
  304. # Go32v2
  305. ifeq ($(OS_TARGET),go32v2)
  306. FPCMADE=fpcmade.dos
  307. endif
  308. # Linux
  309. ifeq ($(OS_TARGET),linux)
  310. FPCMADE=fpcmade.lnx
  311. endif
  312. # Win32
  313. ifeq ($(OS_TARGET),win32)
  314. PPUEXT=.ppw
  315. OEXT=.ow
  316. ASMEXT=.sw
  317. SMARTEXT=.slw
  318. STATICLIBEXT=.aw
  319. SHAREDLIBEXT=.dll
  320. FPCMADE=fpcmade.w32
  321. endif
  322. # OS/2
  323. ifeq ($(OS_TARGET),os2)
  324. PPUEXT=.ppo
  325. ASMEXT=.so2
  326. OEXT=.oo2
  327. SMARTEXT=.so
  328. STATICLIBEXT=.ao2
  329. SHAREDLIBEXT=.dll
  330. FPCMADE=fpcmade.os2
  331. endif
  332. # library prefix
  333. LIBPREFIX=lib
  334. ifeq ($(OS_TARGET),go32v2)
  335. LIBPREFIX=
  336. endif
  337. ifeq ($(OS_TARGET),go32v1)
  338. LIBPREFIX=
  339. endif
  340. # determine which .pas extension is used
  341. ifndef PASEXT
  342. ifdef EXEOBJECTS
  343. override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
  344. else
  345. override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
  346. endif
  347. ifeq ($(TESTPAS),)
  348. PASEXT=.pp
  349. else
  350. PASEXT=.pas
  351. endif
  352. endif
  353. #####################################################################
  354. # Default Directories
  355. #####################################################################
  356. # set the prefix directory where to install everything
  357. ifndef PREFIXINSTALLDIR
  358. ifdef inlinux
  359. PREFIXINSTALLDIR=/usr
  360. else
  361. PREFIXINSTALLDIR=/pp
  362. endif
  363. endif
  364. export PREFIXINSTALLDIR
  365. # Where to place the resulting zip files
  366. ifndef DESTZIPDIR
  367. DESTZIPDIR:=$(BASEDIR)
  368. endif
  369. export DESTZIPDIR
  370. #####################################################################
  371. # Install Directories
  372. #####################################################################
  373. # set the base directory where to install everything
  374. ifndef BASEINSTALLDIR
  375. ifdef inlinux
  376. BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
  377. else
  378. BASEINSTALLDIR=$(PREFIXINSTALLDIR)
  379. endif
  380. endif
  381. # set the directory where to install the binaries
  382. ifndef BININSTALLDIR
  383. ifdef inlinux
  384. BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
  385. else
  386. BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
  387. endif
  388. endif
  389. # set the directory where to install the units.
  390. ifndef UNITINSTALLDIR
  391. UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
  392. ifdef UNITSUBDIR
  393. UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
  394. endif
  395. endif
  396. # Where to install shared libraries
  397. ifndef LIBINSTALLDIR
  398. ifdef inlinux
  399. LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
  400. else
  401. LIBINSTALLDIR=$(UNITINSTALLDIR)
  402. endif
  403. endif
  404. # Where the source files will be stored
  405. ifndef SOURCEINSTALLDIR
  406. ifdef inlinux
  407. SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
  408. else
  409. SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
  410. endif
  411. ifdef SOURCESUBDIR
  412. SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
  413. endif
  414. endif
  415. # Where the doc files will be stored
  416. ifndef DOCINSTALLDIR
  417. ifdef inlinux
  418. DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
  419. else
  420. DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
  421. endif
  422. endif
  423. # Where the some extra (data)files will be stored
  424. ifndef DATAINSTALLDIR
  425. DATAINSTALLDIR=$(BASEINSTALLDIR)
  426. endif
  427. #####################################################################
  428. # Redirection
  429. #####################################################################
  430. ifndef REDIRFILE
  431. REDIRFILE=log
  432. endif
  433. ifdef REDIR
  434. ifndef inlinux
  435. override FPC=redir -eo $(FPC)
  436. endif
  437. # set the verbosity to max
  438. override FPCOPT+=-va
  439. override REDIR:= >> $(REDIRFILE)
  440. endif
  441. #####################################################################
  442. # Standard rules
  443. #####################################################################
  444. all: $(addsuffix _all,$(DIROBJECTS))
  445. debug: $(addsuffix _debug,$(DIROBJECTS))
  446. examples: $(addsuffix _examples,$(DIROBJECTS))
  447. test: $(addsuffix _test,$(DIROBJECTS))
  448. smart: $(addsuffix _smart,$(DIROBJECTS))
  449. shared: $(addsuffix _shared,$(DIROBJECTS))
  450. showinstall: $(addsuffix _showinstall,$(DIROBJECTS))
  451. install: $(addsuffix _install,$(DIROBJECTS))
  452. sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
  453. zipinstall: fpc_zipinstall
  454. zipsourceinstall: fpc_zipsourceinstall
  455. clean: $(addsuffix _clean,$(DIROBJECTS))
  456. distclean: $(addsuffix _distclean,$(DIROBJECTS))
  457. cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
  458. require: $(addsuffix _require,$(DIROBJECTS))
  459. .PHONY: all debug examples test smart shared showinstall install sourceinstall zipinstall zipsourceinstall clean distclean cleanall require
  460. #####################################################################
  461. # Zip
  462. #####################################################################
  463. .PHONY: fpc_zipinstall
  464. # Create suffix to add
  465. ifndef PACKAGESUFFIX
  466. PACKAGESUFFIX=$(OS_TARGET)
  467. ifeq ($(OS_TARGET),go32v2)
  468. PACKAGESUFFIX=go32
  469. endif
  470. ifeq ($(OS_TARGET),win32)
  471. PACKAGESUFFIX=w32
  472. endif
  473. endif
  474. # Temporary path to pack a file
  475. ifndef PACKDIR
  476. ifndef inlinux
  477. PACKDIR=$(BASEDIR)/pack_tmp
  478. else
  479. PACKDIR=/tmp/fpc-pack
  480. endif
  481. endif
  482. # Maybe create default zipname from packagename
  483. ifndef ZIPNAME
  484. ifdef PACKAGENAME
  485. ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
  486. endif
  487. endif
  488. # Use tar by default under linux
  489. ifndef USEZIP
  490. ifdef inlinux
  491. USETAR=1
  492. endif
  493. endif
  494. fpc_zipinstall:
  495. ifndef ZIPNAME
  496. @$(ECHO) "Please specify ZIPNAME!"
  497. @exit 1
  498. else
  499. $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
  500. ifdef USETAR
  501. $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
  502. cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
  503. else
  504. $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
  505. cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
  506. endif
  507. $(DELTREE) $(PACKDIR)
  508. endif
  509. #####################################################################
  510. # Directories
  511. #####################################################################
  512. OBJECTDIRCOMPILER=1
  513. OBJECTDIRRTL=1
  514. OBJECTDIRUTILS=1
  515. OBJECTDIRFCL=1
  516. OBJECTDIRAPI=1
  517. OBJECTDIRFV=1
  518. OBJECTDIRPACKAGES=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_zipsourceinstall compiler_clean compiler_distclean 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_zipsourceinstall:
  544. $(MAKE) -C compiler zipsourceinstall
  545. compiler_clean:
  546. $(MAKE) -C compiler clean
  547. compiler_distclean:
  548. $(MAKE) -C compiler distclean
  549. compiler_cleanall:
  550. $(MAKE) -C compiler cleanall
  551. compiler_require:
  552. $(MAKE) -C compiler require
  553. compiler_info:
  554. $(MAKE) -C compiler info
  555. endif
  556. # Dir rtl
  557. ifdef OBJECTDIRRTL
  558. .PHONY: rtl_all rtl_debug rtl_examples rtl_test rtl_smart rtl_shared rtl_showinstall rtl_install rtl_sourceinstall rtl_zipinstall rtl_zipsourceinstall rtl_clean rtl_distclean rtl_cleanall rtl_require rtl_info
  559. rtl_all:
  560. $(MAKE) -C rtl all
  561. rtl_debug:
  562. $(MAKE) -C rtl debug
  563. rtl_examples:
  564. $(MAKE) -C rtl examples
  565. rtl_test:
  566. $(MAKE) -C rtl test
  567. rtl_smart:
  568. $(MAKE) -C rtl smart
  569. rtl_shared:
  570. $(MAKE) -C rtl shared
  571. rtl_showinstall:
  572. $(MAKE) -C rtl showinstall
  573. rtl_install:
  574. $(MAKE) -C rtl install
  575. rtl_sourceinstall:
  576. $(MAKE) -C rtl sourceinstall
  577. rtl_zipinstall:
  578. $(MAKE) -C rtl zipinstall
  579. rtl_zipsourceinstall:
  580. $(MAKE) -C rtl zipsourceinstall
  581. rtl_clean:
  582. $(MAKE) -C rtl clean
  583. rtl_distclean:
  584. $(MAKE) -C rtl distclean
  585. rtl_cleanall:
  586. $(MAKE) -C rtl cleanall
  587. rtl_require:
  588. $(MAKE) -C rtl require
  589. rtl_info:
  590. $(MAKE) -C rtl info
  591. endif
  592. # Dir utils
  593. ifdef OBJECTDIRUTILS
  594. .PHONY: utils_all utils_debug utils_examples utils_test utils_smart utils_shared utils_showinstall utils_install utils_sourceinstall utils_zipinstall utils_zipsourceinstall utils_clean utils_distclean utils_cleanall utils_require utils_info
  595. utils_all:
  596. $(MAKE) -C utils all
  597. utils_debug:
  598. $(MAKE) -C utils debug
  599. utils_examples:
  600. $(MAKE) -C utils examples
  601. utils_test:
  602. $(MAKE) -C utils test
  603. utils_smart:
  604. $(MAKE) -C utils smart
  605. utils_shared:
  606. $(MAKE) -C utils shared
  607. utils_showinstall:
  608. $(MAKE) -C utils showinstall
  609. utils_install:
  610. $(MAKE) -C utils install
  611. utils_sourceinstall:
  612. $(MAKE) -C utils sourceinstall
  613. utils_zipinstall:
  614. $(MAKE) -C utils zipinstall
  615. utils_zipsourceinstall:
  616. $(MAKE) -C utils zipsourceinstall
  617. utils_clean:
  618. $(MAKE) -C utils clean
  619. utils_distclean:
  620. $(MAKE) -C utils distclean
  621. utils_cleanall:
  622. $(MAKE) -C utils cleanall
  623. utils_require:
  624. $(MAKE) -C utils require
  625. utils_info:
  626. $(MAKE) -C utils info
  627. endif
  628. # Dir fcl
  629. ifdef OBJECTDIRFCL
  630. .PHONY: fcl_all fcl_debug fcl_examples fcl_test fcl_smart fcl_shared fcl_showinstall fcl_install fcl_sourceinstall fcl_zipinstall fcl_zipsourceinstall fcl_clean fcl_distclean fcl_cleanall fcl_require fcl_info
  631. fcl_all:
  632. $(MAKE) -C fcl all
  633. fcl_debug:
  634. $(MAKE) -C fcl debug
  635. fcl_examples:
  636. $(MAKE) -C fcl examples
  637. fcl_test:
  638. $(MAKE) -C fcl test
  639. fcl_smart:
  640. $(MAKE) -C fcl smart
  641. fcl_shared:
  642. $(MAKE) -C fcl shared
  643. fcl_showinstall:
  644. $(MAKE) -C fcl showinstall
  645. fcl_install:
  646. $(MAKE) -C fcl install
  647. fcl_sourceinstall:
  648. $(MAKE) -C fcl sourceinstall
  649. fcl_zipinstall:
  650. $(MAKE) -C fcl zipinstall
  651. fcl_zipsourceinstall:
  652. $(MAKE) -C fcl zipsourceinstall
  653. fcl_clean:
  654. $(MAKE) -C fcl clean
  655. fcl_distclean:
  656. $(MAKE) -C fcl distclean
  657. fcl_cleanall:
  658. $(MAKE) -C fcl cleanall
  659. fcl_require:
  660. $(MAKE) -C fcl require
  661. fcl_info:
  662. $(MAKE) -C fcl info
  663. endif
  664. # Dir api
  665. ifdef OBJECTDIRAPI
  666. .PHONY: api_all api_debug api_examples api_test api_smart api_shared api_showinstall api_install api_sourceinstall api_zipinstall api_zipsourceinstall api_clean api_distclean api_cleanall api_require api_info
  667. api_all:
  668. $(MAKE) -C api all
  669. api_debug:
  670. $(MAKE) -C api debug
  671. api_examples:
  672. $(MAKE) -C api examples
  673. api_test:
  674. $(MAKE) -C api test
  675. api_smart:
  676. $(MAKE) -C api smart
  677. api_shared:
  678. $(MAKE) -C api shared
  679. api_showinstall:
  680. $(MAKE) -C api showinstall
  681. api_install:
  682. $(MAKE) -C api install
  683. api_sourceinstall:
  684. $(MAKE) -C api sourceinstall
  685. api_zipinstall:
  686. $(MAKE) -C api zipinstall
  687. api_zipsourceinstall:
  688. $(MAKE) -C api zipsourceinstall
  689. api_clean:
  690. $(MAKE) -C api clean
  691. api_distclean:
  692. $(MAKE) -C api distclean
  693. api_cleanall:
  694. $(MAKE) -C api cleanall
  695. api_require:
  696. $(MAKE) -C api require
  697. api_info:
  698. $(MAKE) -C api info
  699. endif
  700. # Dir fv
  701. ifdef OBJECTDIRFV
  702. .PHONY: fv_all fv_debug fv_examples fv_test fv_smart fv_shared fv_showinstall fv_install fv_sourceinstall fv_zipinstall fv_zipsourceinstall fv_clean fv_distclean fv_cleanall fv_require fv_info
  703. fv_all:
  704. $(MAKE) -C fv all
  705. fv_debug:
  706. $(MAKE) -C fv debug
  707. fv_examples:
  708. $(MAKE) -C fv examples
  709. fv_test:
  710. $(MAKE) -C fv test
  711. fv_smart:
  712. $(MAKE) -C fv smart
  713. fv_shared:
  714. $(MAKE) -C fv shared
  715. fv_showinstall:
  716. $(MAKE) -C fv showinstall
  717. fv_install:
  718. $(MAKE) -C fv install
  719. fv_sourceinstall:
  720. $(MAKE) -C fv sourceinstall
  721. fv_zipinstall:
  722. $(MAKE) -C fv zipinstall
  723. fv_zipsourceinstall:
  724. $(MAKE) -C fv zipsourceinstall
  725. fv_clean:
  726. $(MAKE) -C fv clean
  727. fv_distclean:
  728. $(MAKE) -C fv distclean
  729. fv_cleanall:
  730. $(MAKE) -C fv cleanall
  731. fv_require:
  732. $(MAKE) -C fv require
  733. fv_info:
  734. $(MAKE) -C fv info
  735. endif
  736. # Dir packages
  737. ifdef OBJECTDIRPACKAGES
  738. .PHONY: packages_all packages_debug packages_examples packages_test packages_smart packages_shared packages_showinstall packages_install packages_sourceinstall packages_zipinstall packages_zipsourceinstall packages_clean packages_distclean packages_cleanall packages_require packages_info
  739. packages_all:
  740. $(MAKE) -C packages all
  741. packages_debug:
  742. $(MAKE) -C packages debug
  743. packages_examples:
  744. $(MAKE) -C packages examples
  745. packages_test:
  746. $(MAKE) -C packages test
  747. packages_smart:
  748. $(MAKE) -C packages smart
  749. packages_shared:
  750. $(MAKE) -C packages shared
  751. packages_showinstall:
  752. $(MAKE) -C packages showinstall
  753. packages_install:
  754. $(MAKE) -C packages install
  755. packages_sourceinstall:
  756. $(MAKE) -C packages sourceinstall
  757. packages_zipinstall:
  758. $(MAKE) -C packages zipinstall
  759. packages_zipsourceinstall:
  760. $(MAKE) -C packages zipsourceinstall
  761. packages_clean:
  762. $(MAKE) -C packages clean
  763. packages_distclean:
  764. $(MAKE) -C packages distclean
  765. packages_cleanall:
  766. $(MAKE) -C packages cleanall
  767. packages_require:
  768. $(MAKE) -C packages require
  769. packages_info:
  770. $(MAKE) -C packages info
  771. endif
  772. # Dir ide
  773. ifdef OBJECTDIRIDE
  774. .PHONY: ide_all ide_debug ide_examples ide_test ide_smart ide_shared ide_showinstall ide_install ide_sourceinstall ide_zipinstall ide_zipsourceinstall ide_clean ide_distclean ide_cleanall ide_require ide_info
  775. ide_all:
  776. $(MAKE) -C ide all
  777. ide_debug:
  778. $(MAKE) -C ide debug
  779. ide_examples:
  780. $(MAKE) -C ide examples
  781. ide_test:
  782. $(MAKE) -C ide test
  783. ide_smart:
  784. $(MAKE) -C ide smart
  785. ide_shared:
  786. $(MAKE) -C ide shared
  787. ide_showinstall:
  788. $(MAKE) -C ide showinstall
  789. ide_install:
  790. $(MAKE) -C ide install
  791. ide_sourceinstall:
  792. $(MAKE) -C ide sourceinstall
  793. ide_zipinstall:
  794. $(MAKE) -C ide zipinstall
  795. ide_zipsourceinstall:
  796. $(MAKE) -C ide zipsourceinstall
  797. ide_clean:
  798. $(MAKE) -C ide clean
  799. ide_distclean:
  800. $(MAKE) -C ide distclean
  801. ide_cleanall:
  802. $(MAKE) -C ide cleanall
  803. ide_require:
  804. $(MAKE) -C ide require
  805. ide_info:
  806. $(MAKE) -C ide info
  807. endif
  808. #####################################################################
  809. # Local Makefile
  810. #####################################################################
  811. ifneq ($(wildcard fpcmake.loc),)
  812. include fpcmake.loc
  813. endif
  814. #####################################################################
  815. # Users rules
  816. #####################################################################
  817. #####################################################################
  818. # Main targets
  819. #####################################################################
  820. .PHONY: compiler_cycle \
  821. idezips ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip \
  822. fclzip gtkzip fvzip compilerzip utilszip
  823. info:
  824. @echo
  825. @echo Please use one of the following targets:
  826. @echo
  827. @echo $(DIROBJECTS)
  828. @echo
  829. @echo All targets can follow after a _ with:
  830. @echo all,clean,install,staticinstall,sharedinstall
  831. @echo
  832. @echo example: make api_staticinstall
  833. @exit
  834. #####################################################################
  835. # Dependencies
  836. #####################################################################
  837. #######################################
  838. # Compiler
  839. #######################################
  840. compiler_cycle:
  841. $(MAKE) -C compiler cycle
  842. #######################################
  843. # IDE
  844. #######################################
  845. ide_gdb:
  846. $(MAKE) -C ide gdb
  847. ide_full:
  848. $(MAKE) -C ide full
  849. ide_fullgdb:
  850. $(MAKE) -C ide fullgdb
  851. #######################################
  852. # Install targets
  853. #######################################
  854. demo_install:
  855. $(MAKE) -C demo installexamples
  856. man_install:
  857. $(MAKE) -C man installman
  858. doc_install:
  859. $(MAKE) -C doc installdoc
  860. #######################################
  861. # Packaging targets
  862. #######################################
  863. ifndef DESTZIPDIR
  864. export DESTZIPDIR:=$(BASEDIR)
  865. endif
  866. idezips: clean ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip
  867. ide_allzip:
  868. $(MAKE) ide_clean
  869. $(MAKE) ide_all
  870. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-fake-$(PACKAGESUFFIX)
  871. ide_gdbzip:
  872. $(MAKE) ide_clean
  873. $(MAKE) ide_gdb
  874. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-gdb-$(PACKAGESUFFIX)
  875. ide_fullzip:
  876. $(MAKE) compiler_clean
  877. $(MAKE) ide_clean
  878. $(MAKE) ide_full
  879. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-comp-$(PACKAGESUFFIX)
  880. ide_fullgdbzip:
  881. $(MAKE) ide_clean
  882. $(MAKE) ide_fullgdb
  883. $(MAKE) -C ide/text zipinstall ZIPNAME=ide-full-$(PACKAGESUFFIX)
  884. fvzip: rtl_clean
  885. $(MAKE) api_clean
  886. $(MAKE) fv_clean
  887. $(MAKE) fv_all
  888. $(MAKE) zipinstall ZIPTARGET='api_install fv_install' ZIPNAME=fv-$(PACKAGESUFFIX)
  889. gtkzip: rtl_clean
  890. $(MAKE) -C packages gtk_clean
  891. $(MAKE) -C packages gtk_all
  892. $(MAKE) -C packages gtk_zipinstall ZIPNAME=gtk-$(PACKAGESUFFIX)
  893. compilerzip:
  894. # compiler_clean rtl_clean
  895. $(MAKE) rtl_all
  896. $(MAKE) compiler_all
  897. $(MAKE) zipinstall ZIPTARGET='compiler_install rtl_install' ZIPNAME=compiler-$(PACKAGESUFFIX)
  898. fclzip: rtl_clean fcl_clean
  899. $(MAKE) fcl_all
  900. $(MAKE) fcl_zipinstall ZIPNAME=fcl-$(PACKAGESUFFIX)
  901. utilszip: utils_clean rtl_clean fcl_clean
  902. $(MAKE) utils_all
  903. $(MAKE) utils_zipinstall ZIPNAME=utils-$(PACKAGESUFFIX)