File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,15 @@ ELF=$(NAME).elf
102
102
EXECUTABLE =$(NAME ) .bin
103
103
104
104
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
106
107
else
107
- AS =
108
+ AS_BUILD =
109
+ AS_CLEAN =
108
110
endif
109
111
110
112
111
- all : print_info $(SOURCES ) $(EXECUTABLE ) $(AS )
113
+ all : print_info $(SOURCES ) $(EXECUTABLE ) $(AS_BUILD )
112
114
113
115
$(ELF ) : Makefile $(BUILD_PATH ) $(OBJECTS )
114
116
@echo ----------------------------------------------------------
@@ -149,11 +151,16 @@ copy_for_atmel_studio: $(EXECUTABLE)
149
151
@echo Atmel Studio detected, copying ELF to project root for debug
150
152
cp $(BUILD_PATH ) /$(ELF ) .
151
153
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 )
153
160
@echo ----------------------------------------------------------
154
161
@echo Cleaning project
155
162
-$(RM ) $(EXECUTABLE )
156
163
-$(RM ) $(BUILD_PATH ) /* .*
157
164
-rmdir $(BUILD_PATH )
158
165
159
- .phony : clean print_info $(BUILD_PATH )
166
+ .phony : clean print_info $(BUILD_PATH ) $( AS_BUILD ) $( AS_CLEAN )
You can’t perform that action at this time.
0 commit comments