1 ## SPDX-License-Identifier: GPL-2.0-only
3 PROJECT_NAME
:= intelp2m
4 THIS_FILE
:= $(lastword
$(MAKEFILE_LIST
))
5 THIS_DIR
:= $(abspath
$(dir $(THIS_FILE
)))
6 SCRIPTS_DIR
:= $(THIS_DIR
)/scripts
/linux
8 OUTPUT_DIR
:= $(THIS_DIR
)/generate
9 VERSION ?
= $(shell $(SCRIPTS_DIR
)/version.sh
)
10 LDFLAGS
= "-X main.Version=$(VERSION)"
14 go build
-ldflags=$(LDFLAGS
) -v
17 go
test .
/...
-v
-count
=1
20 rm -Rf
$(THIS_DIR
)/$(PROJECT_NAME
) $(OUTPUT_DIR
)