make: only compile used file, else unused are linked
This commit is contained in:
parent
b895c75621
commit
f94f1bd065
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@ CC := sdcc
|
||||||
CFLAGS := -mstm8 --std-c99 --opt-code-size --Werror
|
CFLAGS := -mstm8 --std-c99 --opt-code-size --Werror
|
||||||
LDFLAGS = -mstm8 --out-fmt-ihx -lstm8
|
LDFLAGS = -mstm8 --out-fmt-ihx -lstm8
|
||||||
FIRMWARE := main
|
FIRMWARE := main
|
||||||
SRC_FILES := $(wildcard *.c)
|
SRC_FILES := main.c softi2c_master.c eeprom_blockprog.c
|
||||||
OBJ_FILES := $(patsubst %.c,%.rel,$(SRC_FILES))
|
OBJ_FILES := $(patsubst %.c,%.rel,$(SRC_FILES))
|
||||||
|
|
||||||
all: $(FIRMWARE).ihx
|
all: $(FIRMWARE).ihx
|
||||||
|
|
Loading…
Reference in New Issue