author | Olivier Brunel
<jjk@jjacky.com> 2023-03-21 09:59:17 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2023-03-21 21:21:02 UTC |
parent | 7d0e8f335968f3bf25a8071aa68d3be5fa1c56d5 |
common.mk | +4 | -1 |
diff --git a/common.mk b/common.mk index a2dfae2..45780a8 100644 --- a/common.mk +++ b/common.mk @@ -19,7 +19,7 @@ SRCS = $(wildcard src/*.c src/*/*.c) ASMS = $(wildcard src/*.S src/*/*.S) OBJS = $(SRCS:src/%.c=obj/%.o) $(ASMS:src/%.S=obj/%.o) OBJS += $(SRCS:src/%.c=obj/%.lo) -DEPS = $(SRCS:src/%.c=obj/%.d) $(ASMS:src/%.S=obj/%.d) +DEPS = $(OBJS:%=%.d) BINS = LIBS = TOOLS = @@ -37,12 +37,15 @@ obj: comain obj/%.o: src/%.c Makefile common.mk config.mk project.mk | obj $(_CC) $(COMMON_CPPFLAGS) $(CPPFLAGS) $(COMMON_CFLAGS) $(CFLAGS_$(<:src/%.c=%)) $(CFLAGS) -o $@ -c $< + @mv $(@:%.o=%.d) $(@:%.o=%.o.d) obj/%.o: src/%.S Makefile common.mk config.mk project.mk | obj $(_CC) $(COMMON_CPPFLAGS) $(CPPFLAGS) $(COMMON_CFLAGS) $(CFLAGS_$(<:src/%.c=%)) $(CFLAGS) -o $@ -c $< + @mv $(@:%.o=%.d) $(@:%.o=%.o.d) obj/%.lo: src/%.c Makefile common.mk config.mk project.mk | obj $(_CC) $(COMMON_CPPFLAGS) $(CPPFLAGS) $(COMMON_CFLAGS) $(CFLAGS_$(<:src/%.c=%)) $(CFLAGS) $(CFLAGS_SHARED) -o $@ -c $< + @mv $(@:%.lo=%.d) $(@:%.lo=%.lo.d) lib%.a: $(_AR) $(AR) rc $@ $^