-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (53 loc) · 1.89 KB
/
Copy pathMakefile
File metadata and controls
63 lines (53 loc) · 1.89 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
53
54
55
56
57
58
59
60
61
62
63
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Soft: The main goal of gtp-guard is to provide robust and secure
# extensions to GTP protocol (GPRS Tunneling Procol). GTP is
# widely used for data-plane in mobile core-network. gtp-guard
# implements a set of 3 main frameworks:
# A Proxy feature for data-plane tweaking, a Routing facility
# to inter-connect and a Firewall feature for filtering,
# rewriting and redirecting.
#
# Authors: Alexandre Cassen, <acassen@gmail.com>
# Olivier Gournet, <ogournet@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public
# License Version 3.0 as published by the Free Software Foundation;
# either version 3.0 of the License, or (at your option) any later
# version.
#
# Copyright (C) 2023-2025 Alexandre Cassen, <acassen@gmail.com>
#
EXEC = gtp-guard
BIN = bin
BUILDDIR ?= build
V ?= 0
ifeq ($V,1)
ninja_opts = --verbose
Q =
else
Q = @
endif
all: $(BUILDDIR)/build.ninja
$Q ninja -C $(BUILDDIR) $(ninja_opts)
$Q ln -f $(BUILDDIR)/$(EXEC) $(BIN)/$(EXEC)
$Q export BPFS=$(BUILDDIR)/src/bpf/*.bpf; \
for f in $$BPFS; do ln -f "$$f" $(BIN); done
$(BUILDDIR)/build.ninja:
meson setup $(BUILDDIR) $(MESON_OPTS)
clean: $(BUILDDIR)/build.ninja
$Q ninja -C $(BUILDDIR) clean $(ninja_opts)
$Q rm -f $(BIN)/*
install: $(BUILDDIR)/build.ninja
$Q meson install -C $(BUILDDIR)
uninstall: $(BUILDDIR)/build.ninja
$Q ninja -C $(BUILDDIR) $(ninja_opts)
test:
$Q meson test -C $(BUILDDIR) $(TEST)
tarball: $(BUILDDIR)/build.ninja
$Q meson dist -C $(BUILDDIR) --no-test --allow-dirty >/dev/null
$Q export TAR=$(BUILDDIR)/meson-dist/*.xz; \
cp "$$TAR" .; \
echo `basename "$$TAR"`
.PHONY: all clean install uninstall tarball test