Makefile 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917
  1. #
  2. # Makefile generated by fpcmake v1.00 [2000/09/20]
  3. #
  4. defaultrule: all
  5. #####################################################################
  6. # Autodetect OS (Linux or Dos or Windows NT)
  7. # define inUnix when running under Unix (Linux,FreeBSD)
  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. inUnix=1
  23. endif
  24. else
  25. PWD:=$(firstword $(PWD))
  26. endif
  27. # Detect NT - NT sets OS to Windows_NT
  28. # Detect OS/2 - OS/2 has OS2_SHELL defined
  29. ifndef inUnix
  30. ifeq ($(OS),Windows_NT)
  31. inWinNT=1
  32. else
  33. ifdef OS2_SHELL
  34. inOS2=1
  35. endif
  36. endif
  37. endif
  38. # The extension of executables
  39. ifdef inUnix
  40. SRCEXEEXT=
  41. else
  42. SRCEXEEXT=.exe
  43. endif
  44. # The path which is searched separated by spaces
  45. ifdef inUnix
  46. SEARCHPATH=$(subst :, ,$(PATH))
  47. else
  48. SEARCHPATH=$(subst ;, ,$(PATH))
  49. endif
  50. # Base dir
  51. ifdef PWD
  52. BASEDIR:=$(shell $(PWD))
  53. else
  54. BASEDIR=.
  55. endif
  56. #####################################################################
  57. # FPC version/target Detection
  58. #####################################################################
  59. # What compiler to use ?
  60. ifndef FPC
  61. # Compatibility with old makefiles
  62. ifdef PP
  63. FPC=$(PP)
  64. else
  65. FPC=ppc386
  66. endif
  67. endif
  68. override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
  69. override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
  70. # Target OS
  71. ifndef OS_TARGET
  72. OS_TARGET:=$(shell $(FPC) -iTO)
  73. endif
  74. # Source OS
  75. ifndef OS_SOURCE
  76. OS_SOURCE:=$(shell $(FPC) -iSO)
  77. endif
  78. # Target CPU
  79. ifndef CPU_TARGET
  80. CPU_TARGET:=$(shell $(FPC) -iTP)
  81. endif
  82. # Source CPU
  83. ifndef CPU_SOURCE
  84. CPU_SOURCE:=$(shell $(FPC) -iSP)
  85. endif
  86. # FPC version
  87. ifndef FPC_VERSION
  88. FPC_VERSION:=$(shell $(FPC) -iV)
  89. endif
  90. export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
  91. #####################################################################
  92. # FPCDIR Setting
  93. #####################################################################
  94. # Test FPCDIR to look if the RTL dir exists
  95. ifdef FPCDIR
  96. override FPCDIR:=$(subst \,/,$(FPCDIR))
  97. ifeq ($(wildcard $(FPCDIR)/rtl),)
  98. ifeq ($(wildcard $(FPCDIR)/units),)
  99. override FPCDIR=wrong
  100. endif
  101. endif
  102. else
  103. override FPCDIR=wrong
  104. endif
  105. # Detect FPCDIR
  106. ifeq ($(FPCDIR),wrong)
  107. ifdef inUnix
  108. override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
  109. ifeq ($(wildcard $(FPCDIR)/units),)
  110. override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
  111. endif
  112. else
  113. override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
  114. override FPCDIR:=$(FPCDIR)/..
  115. ifeq ($(wildcard $(FPCDIR)/rtl),)
  116. ifeq ($(wildcard $(FPCDIR)/units),)
  117. override FPCDIR:=$(FPCDIR)/..
  118. ifeq ($(wildcard $(FPCDIR)/rtl),)
  119. ifeq ($(wildcard $(FPCDIR)/units),)
  120. override FPCDIR=c:/pp
  121. endif
  122. endif
  123. endif
  124. endif
  125. endif
  126. endif
  127. #####################################################################
  128. # User Settings
  129. #####################################################################
  130. # Targets
  131. override DIROBJECTS+=$(wildcard go32v2 linux win32 os2)
  132. override EXAMPLEDIROBJECTS+=test
  133. # Clean
  134. # Install
  135. EXAMPLESUBDIR=api
  136. PACKAGENAME=api
  137. ZIPTARGET=install
  138. # Defaults
  139. # Directories
  140. # Packages
  141. # Libraries
  142. #####################################################################
  143. # Shell tools
  144. #####################################################################
  145. # echo
  146. ifndef ECHO
  147. ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
  148. ifeq ($(ECHO),)
  149. ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
  150. ifeq ($(ECHO),)
  151. ECHO:=echo
  152. ECHOE:=echo
  153. else
  154. ECHO:=$(firstword $(ECHO))
  155. ECHOE=$(ECHO) -E
  156. endif
  157. else
  158. ECHO:=$(firstword $(ECHO))
  159. ECHOE=$(ECHO) -E
  160. endif
  161. endif
  162. # To copy pograms
  163. ifndef COPY
  164. COPY:=cp -fp
  165. endif
  166. # Copy a whole tree
  167. ifndef COPYTREE
  168. COPYTREE:=cp -rfp
  169. endif
  170. # To move pograms
  171. ifndef MOVE
  172. MOVE:=mv -f
  173. endif
  174. # Check delete program
  175. ifndef DEL
  176. DEL:=rm -f
  177. endif
  178. # Check deltree program
  179. ifndef DELTREE
  180. DELTREE:=rm -rf
  181. endif
  182. # To install files
  183. ifndef INSTALL
  184. ifdef inUnix
  185. INSTALL:=install -m 644
  186. else
  187. INSTALL:=$(COPY)
  188. endif
  189. endif
  190. # To install programs
  191. ifndef INSTALLEXE
  192. ifdef inUnix
  193. INSTALLEXE:=install -m 755
  194. else
  195. INSTALLEXE:=$(COPY)
  196. endif
  197. endif
  198. # To make a directory.
  199. ifndef MKDIR
  200. ifdef inUnix
  201. MKDIR:=install -m 755 -d
  202. else
  203. MKDIR:=ginstall -m 755 -d
  204. endif
  205. endif
  206. export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
  207. #####################################################################
  208. # Default Tools
  209. #####################################################################
  210. # assembler, redefine it if cross compiling
  211. ifndef AS
  212. AS=as
  213. endif
  214. # linker, but probably not used
  215. ifndef LD
  216. LD=ld
  217. endif
  218. # ppas.bat / ppas.sh
  219. ifdef inUnix
  220. PPAS=ppas.sh
  221. else
  222. ifdef inOS2
  223. PPAS=ppas.cmd
  224. else
  225. PPAS=ppas.bat
  226. endif
  227. endif
  228. # ldconfig to rebuild .so cache
  229. ifdef inUnix
  230. LDCONFIG=ldconfig
  231. else
  232. LDCONFIG=
  233. endif
  234. # ZipProg, you can't use Zip as the var name (PFV)
  235. ifndef ZIPPROG
  236. ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
  237. ifeq ($(ZIPPROG),)
  238. ZIPPROG=
  239. else
  240. ZIPPROG:=$(firstword $(ZIPPROG))
  241. endif
  242. endif
  243. export ZIPPROG
  244. ZIPOPT=-9
  245. ZIPEXT=.zip
  246. # Tar
  247. ifndef TARPROG
  248. TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
  249. ifeq ($(TARPROG),)
  250. TARPROG=
  251. else
  252. TARPROG:=$(firstword $(TARPROG))
  253. endif
  254. endif
  255. export TARPROG
  256. ifeq ($(USETAR),bz2)
  257. TAROPT=vI
  258. TAREXT=.tar.bz2
  259. else
  260. TAROPT=vz
  261. TAREXT=.tar.gz
  262. endif
  263. #####################################################################
  264. # Default Directories
  265. #####################################################################
  266. # Linux and freebsd use unix dirs with /usr/bin, /usr/lib
  267. ifeq ($(OS_TARGET),linux)
  268. UNIXINSTALLDIR=1
  269. endif
  270. ifeq ($(OS_TARGET),freebsd)
  271. UNIXINSTALLDIR=1
  272. endif
  273. # set the prefix directory where to install everything
  274. ifndef PREFIXINSTALLDIR
  275. ifdef UNIXINSTALLDIR
  276. PREFIXINSTALLDIR=/usr
  277. else
  278. PREFIXINSTALLDIR=/pp
  279. endif
  280. endif
  281. export PREFIXINSTALLDIR
  282. # Where to place the resulting zip files
  283. ifndef DESTZIPDIR
  284. DESTZIPDIR:=$(BASEDIR)
  285. endif
  286. export DESTZIPDIR
  287. #####################################################################
  288. # Install Directories
  289. #####################################################################
  290. # set the base directory where to install everything
  291. ifndef BASEINSTALLDIR
  292. ifdef UNIXINSTALLDIR
  293. BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
  294. else
  295. BASEINSTALLDIR=$(PREFIXINSTALLDIR)
  296. endif
  297. endif
  298. # set the directory where to install the binaries
  299. ifndef BININSTALLDIR
  300. ifdef UNIXINSTALLDIR
  301. BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
  302. else
  303. BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
  304. endif
  305. endif
  306. # set the directory where to install the units.
  307. ifndef UNITINSTALLDIR
  308. UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
  309. ifdef UNITSUBDIR
  310. UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
  311. endif
  312. endif
  313. # Where to install shared libraries
  314. ifndef LIBINSTALLDIR
  315. ifdef UNIXINSTALLDIR
  316. LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
  317. else
  318. LIBINSTALLDIR=$(UNITINSTALLDIR)
  319. endif
  320. endif
  321. # Where the source files will be stored
  322. ifndef SOURCEINSTALLDIR
  323. ifdef UNIXINSTALLDIR
  324. SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
  325. else
  326. SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
  327. endif
  328. ifdef SOURCESUBDIR
  329. SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
  330. endif
  331. endif
  332. # Where the doc files will be stored
  333. ifndef DOCINSTALLDIR
  334. ifdef UNIXINSTALLDIR
  335. DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
  336. else
  337. DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
  338. endif
  339. endif
  340. # Where to install the examples, under linux we use the doc dir
  341. # because the copytree command will create a subdir itself
  342. ifndef EXAMPLEINSTALLDIR
  343. ifdef UNIXINSTALLDIR
  344. EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
  345. else
  346. EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
  347. endif
  348. ifdef EXAMPLESUBDIR
  349. EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
  350. endif
  351. endif
  352. # Where the some extra (data)files will be stored
  353. ifndef DATAINSTALLDIR
  354. DATAINSTALLDIR=$(BASEINSTALLDIR)
  355. endif
  356. #####################################################################
  357. # Redirection
  358. #####################################################################
  359. ifndef REDIRFILE
  360. REDIRFILE=log
  361. endif
  362. ifdef REDIR
  363. ifndef inUnix
  364. override FPC=redir -eo $(FPC)
  365. endif
  366. # set the verbosity to max
  367. override FPCOPT+=-va
  368. override REDIR:= >> $(REDIRFILE)
  369. endif
  370. #####################################################################
  371. # Standard rules
  372. #####################################################################
  373. all: $(addsuffix _all,$(OS_TARGET))
  374. debug: $(addsuffix _debug,$(OS_TARGET))
  375. examples: fpc_examples
  376. test: fpc_test
  377. smart: $(addsuffix _smart,$(OS_TARGET))
  378. shared: $(addsuffix _shared,$(OS_TARGET))
  379. showinstall: $(addsuffix _showinstall,$(OS_TARGET))
  380. install: $(addsuffix _install,$(OS_TARGET))
  381. sourceinstall: fpc_sourceinstall
  382. exampleinstall: fpc_exampleinstall
  383. zipinstall: fpc_zipinstall
  384. zipsourceinstall: fpc_zipsourceinstall
  385. zipexampleinstall: fpc_zipexampleinstall
  386. clean: $(addsuffix _clean,$(OS_TARGET)) $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
  387. distclean: $(addsuffix _distclean,$(OS_TARGET))
  388. cleanall: $(addsuffix _cleanall,$(OS_TARGET))
  389. require: $(addsuffix _require,$(OS_TARGET))
  390. .PHONY: all debug examples test smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall require
  391. #####################################################################
  392. # Examples
  393. #####################################################################
  394. .PHONY: fpc_examples fpc_test
  395. ifdef EXAMPLEOBJECTS
  396. override EXAMPLESOURCEFILES:=$(addsuffix $(PASEXT),$(EXAMPLEOBJECTS))
  397. override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
  398. override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
  399. override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
  400. endif
  401. fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(EXAMPLEDIROBJECTS))
  402. fpc_test: examples
  403. #####################################################################
  404. # SourceInstall rules
  405. #####################################################################
  406. .PHONY: fpc_sourceinstall
  407. ifndef SOURCETOPDIR
  408. SOURCETOPDIR=$(BASEDIR)
  409. endif
  410. fpc_sourceinstall: clean
  411. $(MKDIR) $(SOURCEINSTALLDIR)
  412. $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
  413. #####################################################################
  414. # exampleinstall rules
  415. #####################################################################
  416. .PHONY: fpc_exampleinstall
  417. fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
  418. ifdef EXAMPLESOURCEFILES
  419. $(MKDIR) $(EXAMPLEINSTALLDIR)
  420. $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
  421. endif
  422. ifdef EXAMPLEDIROBJECTS
  423. ifndef EXAMPLESOURCEFILES
  424. $(MKDIR) $(EXAMPLEINSTALLDIR)
  425. endif
  426. $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
  427. endif
  428. #####################################################################
  429. # Zip
  430. #####################################################################
  431. .PHONY: fpc_zipinstall
  432. # Create suffix to add
  433. ifndef PACKAGESUFFIX
  434. PACKAGESUFFIX=$(OS_TARGET)
  435. ifeq ($(OS_TARGET),go32v2)
  436. PACKAGESUFFIX=go32
  437. endif
  438. ifeq ($(OS_TARGET),win32)
  439. PACKAGESUFFIX=w32
  440. endif
  441. endif
  442. # Temporary path to pack a file
  443. ifndef PACKDIR
  444. ifndef inUnix
  445. PACKDIR=$(BASEDIR)/pack_tmp
  446. else
  447. PACKDIR=/tmp/fpc-pack
  448. endif
  449. endif
  450. # Maybe create default zipname from packagename
  451. ifndef ZIPNAME
  452. ifdef PACKAGENAME
  453. ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
  454. endif
  455. endif
  456. # Use tar by default under linux
  457. ifndef USEZIP
  458. ifdef inUnix
  459. USETAR=1
  460. endif
  461. endif
  462. fpc_zipinstall:
  463. ifndef ZIPNAME
  464. @$(ECHO) "Please specify ZIPNAME!"
  465. @exit 1
  466. else
  467. $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
  468. ifdef USETAR
  469. $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
  470. cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
  471. else
  472. $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
  473. cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
  474. endif
  475. $(DELTREE) $(PACKDIR)
  476. endif
  477. .PHONY: fpc_zipsourceinstall
  478. fpc_zipsourceinstall:
  479. $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
  480. .PHONY: fpc_zipexampleinstall
  481. fpc_zipexampleinstall:
  482. $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
  483. #####################################################################
  484. # Directories
  485. #####################################################################
  486. OBJECTDIRGO32V2=1
  487. OBJECTDIRLINUX=1
  488. OBJECTDIRWIN32=1
  489. OBJECTDIROS2=1
  490. # Dir go32v2
  491. ifdef OBJECTDIRGO32V2
  492. .PHONY: go32v2_all go32v2_debug go32v2_examples go32v2_test go32v2_smart go32v2_shared go32v2_showinstall go32v2_install go32v2_sourceinstall go32v2_exampleinstall go32v2_zipinstall go32v2_zipsourceinstall go32v2_zipexampleinstall go32v2_clean go32v2_distclean go32v2_cleanall go32v2_require go32v2_info
  493. go32v2_all:
  494. $(MAKE) -C go32v2 all
  495. go32v2_debug:
  496. $(MAKE) -C go32v2 debug
  497. go32v2_examples:
  498. $(MAKE) -C go32v2 examples
  499. go32v2_test:
  500. $(MAKE) -C go32v2 test
  501. go32v2_smart:
  502. $(MAKE) -C go32v2 smart
  503. go32v2_shared:
  504. $(MAKE) -C go32v2 shared
  505. go32v2_showinstall:
  506. $(MAKE) -C go32v2 showinstall
  507. go32v2_install:
  508. $(MAKE) -C go32v2 install
  509. go32v2_sourceinstall:
  510. $(MAKE) -C go32v2 sourceinstall
  511. go32v2_exampleinstall:
  512. $(MAKE) -C go32v2 exampleinstall
  513. go32v2_zipinstall:
  514. $(MAKE) -C go32v2 zipinstall
  515. go32v2_zipsourceinstall:
  516. $(MAKE) -C go32v2 zipsourceinstall
  517. go32v2_zipexampleinstall:
  518. $(MAKE) -C go32v2 zipexampleinstall
  519. go32v2_clean:
  520. $(MAKE) -C go32v2 clean
  521. go32v2_distclean:
  522. $(MAKE) -C go32v2 distclean
  523. go32v2_cleanall:
  524. $(MAKE) -C go32v2 cleanall
  525. go32v2_require:
  526. $(MAKE) -C go32v2 require
  527. go32v2_info:
  528. $(MAKE) -C go32v2 info
  529. endif
  530. # Dir linux
  531. ifdef OBJECTDIRLINUX
  532. .PHONY: linux_all linux_debug linux_examples linux_test linux_smart linux_shared linux_showinstall linux_install linux_sourceinstall linux_exampleinstall linux_zipinstall linux_zipsourceinstall linux_zipexampleinstall linux_clean linux_distclean linux_cleanall linux_require linux_info
  533. linux_all:
  534. $(MAKE) -C linux all
  535. linux_debug:
  536. $(MAKE) -C linux debug
  537. linux_examples:
  538. $(MAKE) -C linux examples
  539. linux_test:
  540. $(MAKE) -C linux test
  541. linux_smart:
  542. $(MAKE) -C linux smart
  543. linux_shared:
  544. $(MAKE) -C linux shared
  545. linux_showinstall:
  546. $(MAKE) -C linux showinstall
  547. linux_install:
  548. $(MAKE) -C linux install
  549. linux_sourceinstall:
  550. $(MAKE) -C linux sourceinstall
  551. linux_exampleinstall:
  552. $(MAKE) -C linux exampleinstall
  553. linux_zipinstall:
  554. $(MAKE) -C linux zipinstall
  555. linux_zipsourceinstall:
  556. $(MAKE) -C linux zipsourceinstall
  557. linux_zipexampleinstall:
  558. $(MAKE) -C linux zipexampleinstall
  559. linux_clean:
  560. $(MAKE) -C linux clean
  561. linux_distclean:
  562. $(MAKE) -C linux distclean
  563. linux_cleanall:
  564. $(MAKE) -C linux cleanall
  565. linux_require:
  566. $(MAKE) -C linux require
  567. linux_info:
  568. $(MAKE) -C linux info
  569. endif
  570. # Dir win32
  571. ifdef OBJECTDIRWIN32
  572. .PHONY: win32_all win32_debug win32_examples win32_test win32_smart win32_shared win32_showinstall win32_install win32_sourceinstall win32_exampleinstall win32_zipinstall win32_zipsourceinstall win32_zipexampleinstall win32_clean win32_distclean win32_cleanall win32_require win32_info
  573. win32_all:
  574. $(MAKE) -C win32 all
  575. win32_debug:
  576. $(MAKE) -C win32 debug
  577. win32_examples:
  578. $(MAKE) -C win32 examples
  579. win32_test:
  580. $(MAKE) -C win32 test
  581. win32_smart:
  582. $(MAKE) -C win32 smart
  583. win32_shared:
  584. $(MAKE) -C win32 shared
  585. win32_showinstall:
  586. $(MAKE) -C win32 showinstall
  587. win32_install:
  588. $(MAKE) -C win32 install
  589. win32_sourceinstall:
  590. $(MAKE) -C win32 sourceinstall
  591. win32_exampleinstall:
  592. $(MAKE) -C win32 exampleinstall
  593. win32_zipinstall:
  594. $(MAKE) -C win32 zipinstall
  595. win32_zipsourceinstall:
  596. $(MAKE) -C win32 zipsourceinstall
  597. win32_zipexampleinstall:
  598. $(MAKE) -C win32 zipexampleinstall
  599. win32_clean:
  600. $(MAKE) -C win32 clean
  601. win32_distclean:
  602. $(MAKE) -C win32 distclean
  603. win32_cleanall:
  604. $(MAKE) -C win32 cleanall
  605. win32_require:
  606. $(MAKE) -C win32 require
  607. win32_info:
  608. $(MAKE) -C win32 info
  609. endif
  610. # Dir os2
  611. ifdef OBJECTDIROS2
  612. .PHONY: os2_all os2_debug os2_examples os2_test os2_smart os2_shared os2_showinstall os2_install os2_sourceinstall os2_exampleinstall os2_zipinstall os2_zipsourceinstall os2_zipexampleinstall os2_clean os2_distclean os2_cleanall os2_require os2_info
  613. os2_all:
  614. $(MAKE) -C os2 all
  615. os2_debug:
  616. $(MAKE) -C os2 debug
  617. os2_examples:
  618. $(MAKE) -C os2 examples
  619. os2_test:
  620. $(MAKE) -C os2 test
  621. os2_smart:
  622. $(MAKE) -C os2 smart
  623. os2_shared:
  624. $(MAKE) -C os2 shared
  625. os2_showinstall:
  626. $(MAKE) -C os2 showinstall
  627. os2_install:
  628. $(MAKE) -C os2 install
  629. os2_sourceinstall:
  630. $(MAKE) -C os2 sourceinstall
  631. os2_exampleinstall:
  632. $(MAKE) -C os2 exampleinstall
  633. os2_zipinstall:
  634. $(MAKE) -C os2 zipinstall
  635. os2_zipsourceinstall:
  636. $(MAKE) -C os2 zipsourceinstall
  637. os2_zipexampleinstall:
  638. $(MAKE) -C os2 zipexampleinstall
  639. os2_clean:
  640. $(MAKE) -C os2 clean
  641. os2_distclean:
  642. $(MAKE) -C os2 distclean
  643. os2_cleanall:
  644. $(MAKE) -C os2 cleanall
  645. os2_require:
  646. $(MAKE) -C os2 require
  647. os2_info:
  648. $(MAKE) -C os2 info
  649. endif
  650. EXAMPLEDIRTEST=1
  651. # Dir test
  652. ifdef EXAMPLEDIRTEST
  653. .PHONY: test_all test_debug test_examples test_test test_smart test_shared test_showinstall test_install test_sourceinstall test_exampleinstall test_zipinstall test_zipsourceinstall test_zipexampleinstall test_clean test_distclean test_cleanall test_require test_info
  654. test_all:
  655. $(MAKE) -C test all
  656. test_debug:
  657. $(MAKE) -C test debug
  658. test_examples:
  659. $(MAKE) -C test examples
  660. test_test:
  661. $(MAKE) -C test test
  662. test_smart:
  663. $(MAKE) -C test smart
  664. test_shared:
  665. $(MAKE) -C test shared
  666. test_showinstall:
  667. $(MAKE) -C test showinstall
  668. test_install:
  669. $(MAKE) -C test install
  670. test_sourceinstall:
  671. $(MAKE) -C test sourceinstall
  672. test_exampleinstall:
  673. $(MAKE) -C test exampleinstall
  674. test_zipinstall:
  675. $(MAKE) -C test zipinstall
  676. test_zipsourceinstall:
  677. $(MAKE) -C test zipsourceinstall
  678. test_zipexampleinstall:
  679. $(MAKE) -C test zipexampleinstall
  680. test_clean:
  681. $(MAKE) -C test clean
  682. test_distclean:
  683. $(MAKE) -C test distclean
  684. test_cleanall:
  685. $(MAKE) -C test cleanall
  686. test_require:
  687. $(MAKE) -C test require
  688. test_info:
  689. $(MAKE) -C test info
  690. endif
  691. #####################################################################
  692. # Local Makefile
  693. #####################################################################
  694. ifneq ($(wildcard fpcmake.loc),)
  695. include fpcmake.loc
  696. endif