Fixed makefile from spilling object files in the wrong place
This commit is contained in:
parent
b74590b99f
commit
2e91369e2c
|
@ -14,7 +14,8 @@ OBJCOPY = avr-objcopy
|
|||
OBJDUMP = avr-objdump
|
||||
SIZE = avr-size
|
||||
|
||||
OBJ = $(SRC:%.c=$(OBJDIR)/$(AVRMCU)/%.o)
|
||||
SRC_TMP = $(subst ../,,$(SRC))
|
||||
OBJ = $(SRC_TMP:%.c=$(OBJDIR)/$(AVRMCU)/%.o)
|
||||
|
||||
CFLAGS = -I ../sss7core/ -Os -Wall -Wstrict-prototypes
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
|
@ -36,6 +37,10 @@ $(OBJDIR)/$(AVRMCU)/%.o : %.c $(HEADERS) Makefile
|
|||
@mkdir -p $$(dirname $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/$(AVRMCU)/sss7core/%.o : ../sss7core/%.c $(HEADERS) Makefile
|
||||
@mkdir -p $$(dirname $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/$(AVRMCU)/$(TARGET).elf : $(OBJ)
|
||||
$(CC) $(LDFLAGS) $+ -o $@
|
||||
|
||||
|
|
Loading…
Reference in New Issue