forked from mfulz_github/qmk_firmware
Add "mostlyclean" makefile target to the BUILD build system module.
This commit is contained in:
parent
aba33a0334
commit
80fab49e1d
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
LUFA_BUILD_MODULES += BUILD
|
LUFA_BUILD_MODULES += BUILD
|
||||||
LUFA_BUILD_TARGETS += size check-source symbol-sizes all lib elf hex lss clean
|
LUFA_BUILD_TARGETS += size check-source symbol-sizes all lib elf hex lss clean mostlyclean
|
||||||
LUFA_BUILD_MANDATORY_VARS += TARGET ARCH MCU SRC F_USB LUFA_PATH
|
LUFA_BUILD_MANDATORY_VARS += TARGET ARCH MCU SRC F_USB LUFA_PATH
|
||||||
LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR
|
LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS OBJDIR
|
||||||
LUFA_BUILD_PROVIDED_VARS +=
|
LUFA_BUILD_PROVIDED_VARS +=
|
||||||
|
@ -32,7 +32,10 @@ LUFA_BUILD_PROVIDED_MACROS +=
|
||||||
# elf - Build application ELF debug object file
|
# elf - Build application ELF debug object file
|
||||||
# hex - Build application HEX object files
|
# hex - Build application HEX object files
|
||||||
# lss - Build application LSS assembly listing file
|
# lss - Build application LSS assembly listing file
|
||||||
# clean - Remove output files
|
# clean - Remove all project intermediatary and binary
|
||||||
|
# output files
|
||||||
|
# mostlyclean - Remove intermediatary output files, but
|
||||||
|
# preserve binaries
|
||||||
#
|
#
|
||||||
# MANDATORY PARAMETERS:
|
# MANDATORY PARAMETERS:
|
||||||
#
|
#
|
||||||
|
@ -211,11 +214,13 @@ symbol-sizes: $(TARGET).elf
|
||||||
@echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes
|
@echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes
|
||||||
$(CROSS)-nm --size-sort --demangle --radix=d $<
|
$(CROSS)-nm --size-sort --demangle --radix=d $<
|
||||||
|
|
||||||
clean:
|
mostlyclean:
|
||||||
@echo $(MSG_REMOVE_CMD) Removing object files of \"$(TARGET)\"
|
@echo $(MSG_REMOVE_CMD) Removing object files of \"$(TARGET)\"
|
||||||
rm -f $(OBJECT_FILES)
|
rm -f $(OBJECT_FILES)
|
||||||
@echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\"
|
@echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\"
|
||||||
rm -f $(DEPENDENCY_FILES)
|
rm -f $(DEPENDENCY_FILES)
|
||||||
|
|
||||||
|
clean: mostlyclean
|
||||||
@echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
|
@echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
|
||||||
rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss $(TARGET).sym $(TARGET).a
|
rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss $(TARGET).sym $(TARGET).a
|
||||||
|
|
||||||
|
@ -271,4 +276,4 @@ $(OBJDIR)/%.o: %.S $(MAKEFILE_LIST)
|
||||||
-include $(DEPENDENCY_FILES)
|
-include $(DEPENDENCY_FILES)
|
||||||
|
|
||||||
# Phony build targets for this module
|
# Phony build targets for this module
|
||||||
.PHONY: build_begin build_end gcc-version check-source size symbol-sizes lib elf hex lss clean
|
.PHONY: build_begin build_end gcc-version check-source size symbol-sizes lib elf hex lss clean mostlyclean
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
* application makefile. The system is written in GNU Make, and each module is independant of
|
* application makefile. The system is written in GNU Make, and each module is independant of
|
||||||
* one-another.
|
* one-another.
|
||||||
*
|
*
|
||||||
|
* For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA
|
||||||
|
* build system, see \ref Sec_Prerequisites.
|
||||||
|
*
|
||||||
* To use a LUFA build system module, simply add an include to your project makefile:
|
* To use a LUFA build system module, simply add an include to your project makefile:
|
||||||
* \code
|
* \code
|
||||||
* include $(LUFA_PATH)/Build/lufa.core.in
|
* include $(LUFA_PATH)/Build/lufa.core.in
|
||||||
|
@ -97,6 +100,10 @@
|
||||||
* <td><tt>clean</tt></td>
|
* <td><tt>clean</tt></td>
|
||||||
* <td>Remove all intermediatary files and binary output files.</td>
|
* <td>Remove all intermediatary files and binary output files.</td>
|
||||||
* </tr>
|
* </tr>
|
||||||
|
* <tr>
|
||||||
|
* <td><tt>mostlyclean</tt></td>
|
||||||
|
* <td>Remove all intermediatary files but preserve any binary output files.</td>
|
||||||
|
* </tr>
|
||||||
* </table>
|
* </table>
|
||||||
*
|
*
|
||||||
* \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters
|
* \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters
|
||||||
|
|
6
makefile
6
makefile
|
@ -9,9 +9,9 @@
|
||||||
# Makefile to build the LUFA library, projects and demos.
|
# Makefile to build the LUFA library, projects and demos.
|
||||||
|
|
||||||
# Call with "make all" to rebuild everything, "make clean" to clean everything,
|
# Call with "make all" to rebuild everything, "make clean" to clean everything,
|
||||||
# "make clean_list" to remove all intermediatary files but preserve any binaries,
|
# "make mostlyclean" to remove all intermediatary files but preserve any binaries,
|
||||||
# "make doxygen" to document everything with Doxygen (if installed) and
|
# "make doxygen" to document everything with Doxygen (if installed). Call
|
||||||
# "make clean_doxygen" to remove generated Doxygen documentation from everything.
|
# "make help" for additional target build information within a specific project.
|
||||||
|
|
||||||
all:
|
all:
|
||||||
%:
|
%:
|
||||||
|
|
Loading…
Reference in New Issue