diff --git a/software/AVR8/Makefile b/software/AVR8/Makefile index e77cded..6c182ac 100644 --- a/software/AVR8/Makefile +++ b/software/AVR8/Makefile @@ -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 $@