Repository navigation
Expand file tree
/
Copy pathmakefile
More file actions
52 lines (43 loc) · 1.39 KB
/
Copy pathmakefile
File metadata and controls
52 lines (43 loc) · 1.39 KB
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
# Lazarus build tool
LAZBUILD = lazbuild
# Main project file
PROJECT = pobatch.lpi
# Build mode
BUILD_MODE = Release
# Additional options (e.g. --cpu=i386 for 32-bit)
LAZBUILD_OPTS =
# Dependency LPK packages to build first
DEP_LPKS = \
libs/synapse/laz_synapse.lpk \
libs/darkmode/darkmode.lpk \
libs/helpers/helpers.lpk \
libs/toolkit/toolkit.lpk \
libs/richmemo/richmemopackage.lpk \
libs/richmemo/ide/richmemo_design.lpk \
libs/richkit/richkit.lpk \
libs/translator/translator.lpk \
libs/designkit/designkit.lpk
# Default target: get submodules, build dependencies then the project
all: submodules deps
@echo "Building main project..."
$(LAZBUILD) --build-mode=$(BUILD_MODE) $(LAZBUILD_OPTS) $(PROJECT)
# Get submodules at the versions recorded by the repository
submodules:
@if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then \
git submodule update --init --recursive || true; \
fi
# Build all dependency packages
deps:
@for lpk in $(DEP_LPKS); do \
if [ -f "$$lpk" ]; then \
echo "Building $$lpk"; \
$(LAZBUILD) $$lpk $(LAZBUILD_OPTS) -q || echo "WARNING: Failed to build $$lpk, skipping"; \
else \
echo "WARNING: $$lpk not found, skipping"; \
fi; \
done
# Remove compiled units and the final binary
clean:
find . -type f \( -name "*.o" -o -name "*.ppu" -o -name "*.compiled" \) -delete
rm -f pobatch
.PHONY: all submodules deps clean