When the header files are modified, the compiled object are not going to be recompiled because the header files are not marked as dependency for the objects. Add those header files as dependency so it is safe not to do "make clean" after changing those files. Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@xxxxxxxxxxx> --- src/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index f19d45e..b9428b7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -46,9 +46,16 @@ endif liburing_objs := $(patsubst %.c,%.ol,$(liburing_srcs)) liburing_sobjs := $(patsubst %.c,%.os,$(liburing_srcs)) -$(liburing_srcs): syscall.h lib.h - -$(liburing_objs) $(liburing_sobjs): include/liburing/io_uring.h +$(liburing_objs) $(liburing_sobjs): \ + syscall.h \ + lib.h \ + arch/syscall-defs.h \ + arch/x86/syscall.h \ + arch/x86/lib.h \ + arch/aarch64/syscall.h \ + arch/generic/syscall.h \ + arch/generic/lib.h \ + include/liburing/io_uring.h %.os: %.c $(QUIET_CC)$(CC) $(CPPFLAGS) $(SO_CFLAGS) -c -o $@ $< @@ -78,8 +85,6 @@ ifeq ($(ENABLE_SHARED),1) ln -sf $(relativelibdir)$(libname) $(libdevdir)/liburing.so endif -$(liburing_objs): include/liburing.h - clean: @rm -f $(all_targets) $(liburing_objs) $(liburing_sobjs) $(soname).new @rm -f *.so* *.a *.o -- 2.32.0