First version getting ready to release
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# SPPro - portable C parser for Selectronic SP PRO serial data.
|
||||
|
||||
CC ?= cc
|
||||
CFLAGS ?= -std=c99 -Wall -Wextra -Wpedantic -O2
|
||||
LDFLAGS ?=
|
||||
|
||||
SRC := src/sppro.c src/md5.c
|
||||
HDR := src/sppro.h src/md5.h
|
||||
|
||||
BUILD := build
|
||||
|
||||
.PHONY: all test host clean
|
||||
|
||||
all: test host
|
||||
|
||||
# Host unit tests (no hardware required).
|
||||
$(BUILD)/test_sppro: tests/test_sppro.c $(SRC) $(HDR) | $(BUILD)
|
||||
$(CC) $(CFLAGS) -o $@ tests/test_sppro.c $(SRC) -lm
|
||||
|
||||
test: $(BUILD)/test_sppro
|
||||
./$(BUILD)/test_sppro
|
||||
|
||||
# Linux serial-console dashboard demo.
|
||||
$(BUILD)/sppro-console: host/main.c $(SRC) $(HDR) | $(BUILD)
|
||||
$(CC) $(CFLAGS) -o $@ host/main.c $(SRC) -lm
|
||||
|
||||
host: $(BUILD)/sppro-console
|
||||
|
||||
$(BUILD):
|
||||
mkdir -p $(BUILD)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD)
|
||||
Reference in New Issue
Block a user