Skip to content

Commit

Permalink
Rename binary to match project name
Browse files Browse the repository at this point in the history
  • Loading branch information
infertux committed Jun 28, 2024
1 parent 9a9e2da commit f1eb470
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ LIBS=$(shell pkg-config --libs libbsd libconfig libmodbus libmosquitto) -pthread
SRCS=src/*
TESTS=tests/*.c

all: growatt
all: growatt_exporter

doc: $(SRCS)
doxygen .doxygen

growatt: $(SRCS)
$(CC) -v $(CFLAGS) $(LIBS) -Wall -Werror -O3 -o growatt src/*.c
growatt_exporter: $(SRCS)
$(CC) -v $(CFLAGS) $(LIBS) -Wall -Werror -O3 -o growatt_exporter src/*.c

lint:
clang-format --verbose --Werror -i --style=file $(SRCS) $(TESTS)
clang-tidy --checks='*,-altera-id-dependent-backward-branch,-altera-unroll-loops,-bugprone-assignment-in-if-condition,-cert-err33-c,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-cppcoreguidelines-avoid-magic-numbers,-llvm-header-guard,-llvmlibc-restrict-system-libc-headers,-readability-function-cognitive-complexity' --format-style=llvm $(SRCS) $(TESTS) -- $(CFLAGS)
.PHONY: lint

test: growatt $(TESTS)
test: growatt_exporter $(TESTS)
$(CC) -v $(shell pkg-config --libs --cflags libbsd libmodbus) -Wall -Werror -o tests/mock-server $(TESTS)
timeout 30 mosquitto_sub -h test.mosquitto.org -p 1884 -u rw -P readwrite -t homeassistant/sensor/growatt/state -d &
./tests/mock-server &
./growatt config-example.conf || true
./growatt_exporter config-example.conf || true

clean:
$(RM) growatt tests/mock-server
$(RM) growatt_exporter tests/mock-server
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ make

2. Copy binary:

`cp growatt /opt/growatt-exporter`
`cp growatt_exporter /opt/growatt-exporter`

3. Create config file `/etc/growatt-exporter.conf`:

Expand Down
2 changes: 1 addition & 1 deletion docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euxo pipefail
cd "$(dirname "$0")"

channel="${1:-stable}" # can be overriden with "bullseye" for example
target=growatt
target=growatt_exporter
container=${target}-builder-${channel}
volume=/root/HOST
cc=clang
Expand Down

0 comments on commit f1eb470

Please sign in to comment.