merge dev-stage1 with basic firmware-manipulation implementation #3

Merged
_N0x merged 7 commits from dev-stage1 into master 2022-02-19 19:39:27 +01:00
2 changed files with 42 additions and 0 deletions
Showing only changes of commit 144cd7031e - Show all commits

5
.gitignore vendored
View File

@ -1,5 +1,10 @@
# exclude project binary
f8prog
# exclude project dirs
build/
firmware/
.ccls-cache/
# ---> C
# Prerequisites

37
Makefile Normal file
View File

@ -0,0 +1,37 @@
## Compiler settings
CC = cc
CFLAGS = -Wall
LDFLAGS =
## Project settings
TARGET = f8prog ## name of the application
## Paths
SRC = $(wildcard src/*.c)
OFILES = $(patsubst src%, build%, $(patsubst src/%.c, build/%.o, $(SRC)))
$(TARGET): ./build $(OFILES)
$(CC) $(CFLAGS) $(OFILES) -o $(TARGET) $(LDFLAGS)
%.o: ../src/%.c
$(CC) $(CFLAGS) -c $^ -o $@
./build:
mkdir -p $@
clean:
rm -rf $(OFILES)
rm -f $(TARGET)
rm -rf ./build
test: $(TARGET)
./$(TARGET)
options:
@echo $(TARGET) build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
.PHONY: options clean test