opensnitch/daemon/Makefile
Gustavo Iñiguez Goia 8c3fa40cf4
Some checks failed
CI - build eBPF modules / build (6.0, 1.5.0) (push) Has been cancelled
CI - build eBPF modules / build (6.0, master) (push) Has been cancelled
Test resources validation / Install tools (push) Has been cancelled
Build status / Build (push) Has been cancelled
distribute default rules with the pkgs
- distribute daemon/data/rules/ with the daemon packages.
 - added a new system fw rule to allow localhost connections (disabled
   by default).

Closes: #965.
2025-08-08 13:45:26 +02:00

29 lines
761 B
Makefile

#SRC contains all *.go *.c *.h files in daemon/ and its subfolders
SRC := $(shell find . -type f -name '*.go' -o -name '*.h' -o -name '*.c')
PREFIX?=/usr/local
all: opensnitchd
install:
@mkdir -p $(DESTDIR)/etc/opensnitchd/rules
@install -Dm755 opensnitchd \
-t $(DESTDIR)$(PREFIX)/bin/
@install -Dm644 opensnitchd.service \
-t $(DESTDIR)/etc/systemd/system/
@install -Dm644 default-config.json \
-t $(DESTDIR)/etc/opensnitchd/
@install -Dm644 system-fw.json \
-t $(DESTDIR)/etc/opensnitchd/
@install -Dm644 network_aliases.json \
-t $(DESTDIR)/etc/opensnitchd/
@install -Dm600 data/rules/* $(DESTDIR)/etc/opensnitchd/rules/
@systemctl daemon-reload
opensnitchd: $(SRC)
@go get
@go build -o opensnitchd .
clean:
@rm -rf opensnitchd