-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmakefile
More file actions
45 lines (36 loc) · 1.14 KB
/
Copy pathmakefile
File metadata and controls
45 lines (36 loc) · 1.14 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
# Lazarus build tool
LAZBUILD = lazbuild
# Main project file
PROJECT = padxml.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/darkmode/darkmode.lpk \
libs/helpers/helpers.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 padxml
.PHONY: all submodules deps clean