make: only compile used file, else unused are linked

This commit is contained in:
King Kévin 2021-08-23 17:35:43 +02:00
parent b895c75621
commit f94f1bd065
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ CC := sdcc
CFLAGS := -mstm8 --std-c99 --opt-code-size --Werror
LDFLAGS = -mstm8 --out-fmt-ihx -lstm8
FIRMWARE := main
SRC_FILES := $(wildcard *.c)
SRC_FILES := main.c softi2c_master.c eeprom_blockprog.c
OBJ_FILES := $(patsubst %.c,%.rel,$(SRC_FILES))
all: $(FIRMWARE).ihx