23 lines
536 B
Makefile
23 lines
536 B
Makefile
PROG = govpp-snmp-agentx
|
|
|
|
.PHONY: build test clean pkg-deb
|
|
|
|
# Build the binary
|
|
build:
|
|
cd src && go build -o ../$(PROG) .
|
|
|
|
# Run all tests
|
|
test:
|
|
cd src && go test ./...
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
rm -f $(PROG)
|
|
[ -d debian/go ] && chmod -R +w debian/go || true
|
|
rm -rf debian/.debhelper debian/.gocache debian/go debian/$(PROG) debian/files debian/*.substvars debian/debhelper-build-stamp
|
|
rm -f ../$(PROG)_*.deb ../$(PROG)_*.changes ../$(PROG)_*.buildinfo
|
|
|
|
# Build Debian package
|
|
pkg-deb:
|
|
fakeroot dpkg-buildpackage -us -uc -b
|