diff options
Diffstat (limited to 'include.mk')
-rw-r--r-- | include.mk | 22 |
1 files changed, 5 insertions, 17 deletions
@@ -40,11 +40,6 @@ FORMAT := ihex CC = avr-gcc OBJCOPY = avr-objcopy -OBJDUMP = avr-objdump -SIZE = avr-size -AR = avr-ar rcs -NM = avr-nm -COPY = cp DFU = dfu-programmer ## Options common to compile, link and assembly rules @@ -68,7 +63,7 @@ LDFLAGS += SRC := $(OBJ:%.o=%.c) -.PHONY: clean cleanall distclean program +.PHONY: clean erase program reset run ELFFILE := $(NAME).elf HEXFILE := $(NAME).hex @@ -85,21 +80,14 @@ ifneq ($(MAKECMDGOALS),distclean) -include $(SRC:%.c=%.d) endif -$(ELFFILE): $(OBJ) - $(CC) $(OBJ) -o $@ $(LDFLAGS) - -$(HEXFILE): $(ELFFILE) - $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $(HEXFILE) - %.o: %.c $(CC) $(CFLAGS) -c $< -strip: $(ELFFILE) - $(STRIP) -s $(ELFFILE) +$(ELFFILE): $(OBJ) + $(CC) $(OBJ) -o $@ $(LDFLAGS) -distclean: cleanall - find . -name *.o -exec rm -f {} \; - find . -name "*.\~*" -exec rm -rf {} \; +$(HEXFILE): $(ELFFILE) + $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@ clean: rm -f *.o |