diff options
| author | Nakidai <nakidai@disroot.org> | 2026-02-19 00:54:17 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2026-02-19 00:54:17 +0300 |
| commit | 18375860d92de2fa3a58defee0e099f777fd3d30 (patch) | |
| tree | 1bba58e4aa0c7aef6cd9cc56556965d486d3f02e | |
| parent | e4fcf7471a1319fee99d68de729aaacfeb044d01 (diff) | |
| download | ngircd-master.tar.gz ngircd-master.zip | |
Now build system will handle header file changes correctly as well
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | src/build.mk | 3 | ||||
| -rw-r--r-- | src/ipaddr/build.mk | 3 | ||||
| -rw-r--r-- | src/ngircd/build.mk | 3 | ||||
| -rw-r--r-- | src/portab/build.mk | 3 | ||||
| -rw-r--r-- | src/tool/build.mk | 3 |
7 files changed, 17 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index 2fbe3362..8841399f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.exe *.log *.o +*.d *~ Makefile.in aclocal.m4 diff --git a/Makefile b/Makefile index 602d9575..6282ef84 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,6 @@ all: src/ngircd/ngircd .c.o: - ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $< + ${CC} ${CFLAGS} ${CPPFLAGS} -MMD -MP -c -o $@ $< include src/build.mk diff --git a/src/build.mk b/src/build.mk index ab9f0a39..8e8641fd 100644 --- a/src/build.mk +++ b/src/build.mk @@ -13,3 +13,6 @@ CFLAGS += -Isrc -Isrc/portab -Isrc/ipaddr -Isrc/tool clean: rm -f src/ngircd/ngircd find . \( -name '*\.o' -o -name '*\.a' \) -exec rm {} \; + +cleandeps: + find . -name '*\.d' -exec rm {} \; diff --git a/src/ipaddr/build.mk b/src/ipaddr/build.mk index e40388bb..eb0a7cca 100644 --- a/src/ipaddr/build.mk +++ b/src/ipaddr/build.mk @@ -1,4 +1,7 @@ OBJS.ipaddr += src/ipaddr/ng_ipaddr.o +DEPS := ${OBJS.ipaddr:.o=.d} +-include ${DEPS} + src/ipaddr/libngipaddr.a: ${OBJS.ipaddr} ar rcs src/ipaddr/libngipaddr.a ${OBJS.ipaddr} diff --git a/src/ngircd/build.mk b/src/ngircd/build.mk index 57d48936..80383001 100644 --- a/src/ngircd/build.mk +++ b/src/ngircd/build.mk @@ -36,5 +36,8 @@ OBJS.ngircd += src/ngircd/proc.o OBJS.ngircd += src/ngircd/resolve.o OBJS.ngircd += src/ngircd/sighandlers.o +DEPS := ${OBJS.ngircd:.o=.d} +-include ${DEPS} + src/ngircd/ngircd: src/portab/libngportab.a src/ipaddr/libngipaddr.a src/tool/libngtool.a ${OBJS.ngircd} cc -o src/ngircd/ngircd ${LDFLAGS} ${OBJS.ngircd} ${LDLIBS} diff --git a/src/portab/build.mk b/src/portab/build.mk index a184ead2..5e87a165 100644 --- a/src/portab/build.mk +++ b/src/portab/build.mk @@ -7,5 +7,8 @@ OBJS.portab += src/portab/strtok_r.o OBJS.portab += src/portab/vsnprintf.o OBJS.portab += src/portab/waitpid.o +DEPS := ${OBJS.portab:.o=.d} +-include ${DEPS} + src/portab/libngportab.a: ${OBJS.portab} ar rcs src/portab/libngportab.a ${OBJS.portab} diff --git a/src/tool/build.mk b/src/tool/build.mk index a60eceee..82d70ad1 100644 --- a/src/tool/build.mk +++ b/src/tool/build.mk @@ -1,4 +1,7 @@ OBJS.tool += src/tool/tool.o +DEPS := ${OBJS.tool:.o=.d} +-include ${DEPS} + src/tool/libngtool.a: ${OBJS.tool} ar rcs src/tool/libngtool.a ${OBJS.tool} |