Skip to content

Commit d2a2c01

Browse files
committed
[bl] fix makefile for Studio case
1 parent 13dcceb commit d2a2c01

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

bootloaders/zero/Makefile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,15 @@ ELF=$(NAME).elf
102102
EXECUTABLE=$(NAME).bin
103103

104104
ifneq "test$(AVRSTUDIO_EXE_PATH)" "test"
105-
AS=copy_for_atmel_studio
105+
AS_BUILD=copy_for_atmel_studio
106+
AS_CLEAN=clean_for_atmel_studio
106107
else
107-
AS=
108+
AS_BUILD=
109+
AS_CLEAN=
108110
endif
109111

110112

111-
all: print_info $(SOURCES) $(EXECUTABLE) $(AS)
113+
all: print_info $(SOURCES) $(EXECUTABLE) $(AS_BUILD)
112114

113115
$(ELF): Makefile $(BUILD_PATH) $(OBJECTS)
114116
@echo ----------------------------------------------------------
@@ -149,11 +151,16 @@ copy_for_atmel_studio: $(EXECUTABLE)
149151
@echo Atmel Studio detected, copying ELF to project root for debug
150152
cp $(BUILD_PATH)/$(ELF) .
151153

152-
clean:
154+
clean_for_atmel_studio:
155+
@echo ----------------------------------------------------------
156+
@echo Atmel Studio detected, cleaing ELF from project root
157+
-$(RM) $(BUILD_PATH)/$(ELF) .
158+
159+
clean: $(AS_CLEAN)
153160
@echo ----------------------------------------------------------
154161
@echo Cleaning project
155162
-$(RM) $(EXECUTABLE)
156163
-$(RM) $(BUILD_PATH)/*.*
157164
-rmdir $(BUILD_PATH)
158165

159-
.phony: clean print_info $(BUILD_PATH)
166+
.phony: clean print_info $(BUILD_PATH) $(AS_BUILD) $(AS_CLEAN)

0 commit comments

Comments
 (0)