diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-11-01 09:03:12 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-11-01 09:03:12 +0200 |
commit | 848b3174bbcdb6d21011ed17c1e14751abf9fba3 (patch) | |
tree | bb07452b0708d321ce37964f4e87da7242edf7a0 /rules.mk | |
parent | add ps2_keyboard driver (diff) | |
download | kernel-848b3174bbcdb6d21011ed17c1e14751abf9fba3.tar.xz |
makefile: clean target shouldn't depend on OBJS
Diffstat (limited to 'rules.mk')
-rw-r--r-- | rules.mk | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,9 +1,9 @@ -# generate ,OBJS variable for each ,SRCS +# for each target,SRCS, generate target,OBJS, target.a and add target,OBJS to all , = , $(foreach V,$(filter %$(,)SRCS, ${.VARIABLES}),\ $(eval $(V:$(,)SRCS=$(,)OBJS) += $(foreach f,$($(V)),$(addsuffix .o,$(basename $(f))))) \ $(eval $(V:$(,)SRCS=.a): $($(V:$(,)SRCS=$(,)OBJS))) \ - $(eval clean: $($(V:$(,)SRCS=$(,)OBJS))) \ + $(eval all: $($(V:$(,)SRCS=$(,)OBJS))) \ ) # Suffix rules @@ -27,4 +27,4 @@ $(foreach V,$(filter %$(,)SRCS, ${.VARIABLES}),\ # clean target .PHONY: clean clean: - @rm -rf $^ + @$(foreach V,$(filter %$(,)OBJS, ${.VARIABLES}), rm -rf $($(V))) |