forked from lxc/lxc
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 940 Bytes
/
Makefile
File metadata and controls
43 lines (33 loc) · 940 Bytes
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
# SPDX-License-Identifier: LGPL-2.1+
MESON ?= meson
NINJA ?= ninja
BUILDDIR := build
DISTDIR := $(BUILDDIR)/meson-dist
.PHONY: all meson dist install clean rebuild help
help:
@echo "Available commands:"
@echo " all - Build the project"
@echo " meson - Configure or reconfigure the project with Meson"
@echo " dist - Create the distribution package"
@echo " install - Install the project"
@echo " clean - Remove generated files"
@echo " rebuild - Clean and rebuild everything"
@echo " help - Show this message"
all: meson
$(NINJA) -C $(BUILDDIR)
meson:
@if [ ! -d $(BUILDDIR) ]; then \
$(MESON) setup $(BUILDDIR); \
else \
$(MESON) setup --reconfigure $(BUILDDIR); \
fi
dist: meson
$(MESON) dist -C $(BUILDDIR) --formats=gztar
cp $(DISTDIR)/*.tar.gz .
install:
DESTDIR=$(DESTDIR) $(NINJA) -C $(BUILDDIR) install
clean:
rm -rf $(BUILDDIR) *.tar.gz
rebuild:
$(MAKE) clean
$(MAKE) all