Skip to content

Commit

Permalink
Make output of Makefile more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKK committed Apr 21, 2014
1 parent a18275b commit 6428e62
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,27 @@ CFLAGS += -I $(PWD)/CORTEX_M4F_STM32_DISCOVERY \
all: $(BIN_IMAGE)

$(BIN_IMAGE): $(EXECUTABLE)
$(OBJCOPY) -O binary $^ $@
$(OBJCOPY) -O ihex $^ $(HEX_IMAGE)
$(OBJDUMP) -h -S -D $(EXECUTABLE) > $(PROJECT).lst
$(SIZE) $(EXECUTABLE)
@echo " OBJCOPY "$(notdir $@)
@$(OBJCOPY) -O binary $^ $@
@$(OBJCOPY) -O ihex $^ $(HEX_IMAGE)
@echo " OBJDUMP "$(notdir $@)
@$(OBJDUMP) -h -S -D $(EXECUTABLE) > $(PROJECT).lst
@echo " SIZE "$(notdir $@)
@$(SIZE) $(EXECUTABLE)

$(EXECUTABLE): $(OBJS)
$(LD) -o $@ $(OBJS) \
@echo " LD "$(notdir $@)
@$(LD) -o $@ $(OBJS) \
--start-group $(LIBS) --end-group \
$(LDFLAGS)

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
@echo " CC "$(notdir $@)
@$(CC) $(CFLAGS) -c $< -o $@

%.o: %.S
$(CC) $(CFLAGS) -c $< -o $@
@echo " CC "$(notdir $@)
@$(CC) $(CFLAGS) -c $< -o $@

flash:
st-flash write $(BIN_IMAGE) 0x8000000
Expand Down

0 comments on commit 6428e62

Please sign in to comment.