- Split the parser code into several packages to make its testing of its functions more convenient and detailed. This also makes embedding the parser in third-party applications more flexible - there is no need to use all the functionality of the parser. - Clean up code and remove unnecessary objects to make intelp2m simpler and more readable. - Change the common macro format to be consistent with the new parser. - Rename the results directory containing gpio.h to output to avoid confusion with the generator package directory. - At the moment there is no mechanism for setting the Ownership flag. This will be added in later versions. Tests: - make test = PASS - gpio.h for Apollo Lake before and after the patch is the same Change-Id: I9a29322dd31faf9ae100165f08f207360cbf9f80 Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70543 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
23 lines
496 B
Makefile
23 lines
496 B
Makefile
## SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
PROJECT_NAME := intelp2m
|
|
THIS_FILE := $(lastword $(MAKEFILE_LIST))
|
|
THIS_DIR := $(abspath $(dir $(THIS_FILE)))
|
|
SCRIPTS_DIR := $(THIS_DIR)/scripts/linux
|
|
|
|
OUTPUT_DIR := $(THIS_DIR)/output
|
|
VERSION ?= $(shell $(SCRIPTS_DIR)/version.sh)
|
|
LDFLAGS = "-X main.Version=$(VERSION)"
|
|
|
|
default: version
|
|
go version
|
|
go build -ldflags=$(LDFLAGS) -v
|
|
|
|
test:
|
|
go test ./... -v -count=1
|
|
|
|
clean:
|
|
rm -Rf $(THIS_DIR)/$(PROJECT_NAME) $(OUTPUT_DIR)
|
|
|
|
version:
|
|
@echo $(VERSION)
|