# HG changeset patch # User Josef 'Jeff' Sipek # Date 1721044179 14400 # Mon Jul 15 07:49:39 2024 -0400 # Node ID e968936fb567c970ce1f9338f3e9217dc612463c # Parent 50a3b04d5000a18c566e599864b68b2da4e7e6ea build: clean known object files If there was an object file in a subdirectory, it didn't get cleaned prior to this change. Signed-off-by: Josef 'Jeff' Sipek diff --git a/build.mk b/build.mk --- a/build.mk +++ b/build.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2022-2023 Josef 'Jeff' Sipek +# Copyright (c) 2022-2024 Josef 'Jeff' Sipek # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -46,8 +46,8 @@ ${SIZE} ${ELFS} .PHONY: clean -clean: - rm -f ${ELFS} ${BINS} ${HEXS} ivec.*.S *.o +clean: ${MCUS:C/^/clean_/} + rm -f ${ELFS} ${BINS} ${HEXS} .for mcu in ${MCUS} OBJS_${mcu}=\ @@ -95,4 +95,8 @@ ${NAME}-${mcu}.ihex: ${NAME}-${mcu}.elf ${OBJCOPY} -O ihex ${.ALLSRC} ${.TARGET} + +clean_${mcu}: + rm -f ivec.${mcu}.S ${OBJS_${mcu}} + .endfor