-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
53 lines (48 loc) · 1.84 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# FPC command line options.
# See README.md for justification of using Delphi mode (-Mdelphi).
FPC_COMMAND:=fpc -Mdelphi
# Delphi (dcc) command line options.
# See https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/code/toolcompile.pas#L858
# for how Castle Game Engine build tool invokes dcc for some hints.
# -NS below follows the DPROJ settings generated by Delphi for new projects.
DELPHI_OPTIONS_COMMON:='-NSSystem;Xml;Data;Datasnap;Web;Soap'
DELPHI_WIN32_COMMAND:=dcc32 $(DELPHI_OPTIONS_COMMON)
DELPHI_WIN64_COMMAND:=dcc64 $(DELPHI_OPTIONS_COMMON)
# Compile all examples with FPC.
# Use `find` to find all *.dpr files (including subdirectories)
# and compile them with FPC, in Delphi mode (-Mdelphi,
# see README.md for explanation why we use Delphi mode).
.PHONY: all
all:
find . \
'(' -type d -name '140_forms_etc' -prune ')' -o \
'(' -type d -name '150_data_module_using_components' -prune ')' -o \
'(' -type d -name '310_anonymous' -prune ')' -o \
'(' -type d -name '305_callbacks_assigning' -prune ')' -o \
'(' -type d -name '300_callbacks_events' -prune ')' -o \
'(' -type f -iname *.dpr \
'(' -execdir $(FPC_COMMAND) {} ';' -o -quit ')' \
')'
# If you have FPC 3.3.1, you can use this, to test more examples.
.PHONY: all-fpc331
all-fpc331:
find . \
'(' -type d -name '140_forms_etc' -prune ')' -o \
'(' -type d -name '150_data_module_using_components' -prune ')' -o \
'(' -type f -iname *.dpr \
'(' -execdir $(FPC_COMMAND) {} ';' -o -quit ')' \
')'
# Build with Delphi for Win32.
.PHONY: all-delphi-win32
all-delphi-win32:
find . \
'(' -type f -iname *.dpr \
'(' -execdir $(DELPHI_WIN32_COMMAND) {} ';' -o -quit ')' \
')'
# Build with Delphi for Win64.
.PHONY: all-delphi-win64
all-delphi-win64:
find . \
'(' -type f -iname *.dpr \
'(' -execdir $(DELPHI_WIN64_COMMAND) {} ';' -o -quit ')' \
')'