From 2a91235b23deadf0258d30925b4bdb86d4caa7b6 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 13 May 2012 16:26:12 +0000 Subject: clean up at makefile git-svn-id: https://svn.spreadspace.org/avr/trunk@6 aa12f405-d877-488e-9caf-2d797e2a1cc7 --- include.mk | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'include.mk') diff --git a/include.mk b/include.mk index 62a5ab3..64f86a6 100644 --- a/include.mk +++ b/include.mk @@ -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 -- cgit v1.2.3