compiles, runs, but has malformed JSON when writing to file

This commit is contained in:
2022-04-04 13:59:34 -06:00
parent 87132ca1cd
commit bcca85eb7d
6 changed files with 2155 additions and 0 deletions

View File

@ -0,0 +1,22 @@
STANDARD := gnu99
DEBUG_DIR := build/Debug
BIN_DEBUG_DIR := bin/Debug
RELEASE_DIR := build/Release
BIN_RELEASE_DIR := bin/Release
CFLAGS += $(shell pkg-config --cflags json-c)
LDFLAGS += $(shell pkg-config --libs json-c)
debug:
gcc -Wall -fPIC -pg -g -c src/bme280/bme280.c -o $(DEBUG_DIR)/bme280.o -std=${STANDARD} ${LDFLAGS}
gcc -Wall -fPIC -pg -g -c src/main.c -o $(DEBUG_DIR)/main.o -std=${STANDARD} ${LDFLAGS}
gcc -Wall -fPIC -pg -g -o $(BIN_DEBUG_DIR)/tempRecord $(DEBUG_DIR)/main.o $(DEBUG_DIR)/bme280.o -std=${STANDARD} ${LDFLAGS}
release:
gcc -Wall -fPIC -O2 -c src/bme280/bme280.c -o $(RELEASE_DIR)/bme280.o -std=${STANDARD} ${LDFLAGS}
gcc -Wall -fPIC -O2 -c src/main.c -o $(RELEASE_DIR)/main.o -std=${STANDARD} ${LDFLAGS}
gcc -Wall -fPIC -O2 -o $(BIN_RELEASE_DIR)/tempRecord $(RELEASE_DIR)/main.o $(RELEASE_DIR)/bme280.o -std=${STANDARD} ${LDFLAGS}
.PHONY clean:
rm -rf -v !\(.gitignore\) $(DEBUG_DIR)/*
rm -rf -v !\(.gitignore\) $(RELEASE_DIR)/*