From fb6f0fd115fec4a7c3490d0a3091b81af5ba6378 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Thu, 19 Feb 2026 00:00:52 +0300 Subject: Declare *{FLAGS,LIBS} once Well, since this is actually one big Makefile concatenated of smaller ones, all the *CFLAGS are global and therefore should be set once --- Makefile | 1 - src/Makefile | 7 +++++++ src/ipaddr/Makefile | 4 ---- src/ngircd/Makefile | 7 ------- src/portab/Makefile | 4 ---- src/tool/Makefile | 4 ---- 6 files changed, 7 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 2ede9526..b8800555 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ all: src/ngircd/ngircd .c.o: - # ${CC} ${CFLAGS} ${CPPFLAGS} -c -o "`echo $< | sed 's/.$$//'`o" $< ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $< include src/Makefile diff --git a/src/Makefile b/src/Makefile index 28633a05..07adc0cb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,6 +3,13 @@ include src/ngircd/Makefile include src/portab/Makefile include src/tool/Makefile +LDFLAGS += -Lsrc/portab -Lsrc/tool -Lsrc/ipaddr +LDLIBS += -lngportab -lngtool -lngipaddr -lz + +CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"' +CFLAGS += -DHAVE_CONFIG_H +CFLAGS += -Isrc -Isrc/portab -Isrc/ipaddr -Isrc/tool + clean: rm -f src/ngircd/ngircd find . \( -name '*\.o' -o -name '*\.a' \) -exec rm {} \; diff --git a/src/ipaddr/Makefile b/src/ipaddr/Makefile index 67400636..e40388bb 100644 --- a/src/ipaddr/Makefile +++ b/src/ipaddr/Makefile @@ -1,7 +1,3 @@ -CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"' -CFLAGS += -DHAVE_CONFIG_H -CFLAGS += -Isrc -Isrc/portab -Isrc/ipaddr -Isrc/tool - OBJS.ipaddr += src/ipaddr/ng_ipaddr.o src/ipaddr/libngipaddr.a: ${OBJS.ipaddr} diff --git a/src/ngircd/Makefile b/src/ngircd/Makefile index 8a23c1b4..57d48936 100644 --- a/src/ngircd/Makefile +++ b/src/ngircd/Makefile @@ -1,10 +1,3 @@ -LDFLAGS += -Lsrc/portab -Lsrc/tool -Lsrc/ipaddr -LDLIBS += -lngportab -lngtool -lngipaddr -lz - -CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"' -CFLAGS += -DHAVE_CONFIG_H -CFLAGS += -Isrc -Isrc/portab -Isrc/ipaddr -Isrc/tool - OBJS.ngircd += src/ngircd/array.o OBJS.ngircd += src/ngircd/channel.o OBJS.ngircd += src/ngircd/class.o diff --git a/src/portab/Makefile b/src/portab/Makefile index ee81e677..a184ead2 100644 --- a/src/portab/Makefile +++ b/src/portab/Makefile @@ -1,7 +1,3 @@ -CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"' -CFLAGS += -DHAVE_CONFIG_H -CFLAGS += -Isrc -Isrc/portab -Isrc/ipaddr -Isrc/tool - OBJS.portab += src/portab/ansi2knr.o OBJS.portab += src/portab/portabtest.o OBJS.portab += src/portab/strdup.o diff --git a/src/tool/Makefile b/src/tool/Makefile index 964e9d52..a60eceee 100644 --- a/src/tool/Makefile +++ b/src/tool/Makefile @@ -1,7 +1,3 @@ -CFLAGS += -DDOCDIR='"/usr/local/share/doc/ngircd"' -CFLAGS += -DHAVE_CONFIG_H -CFLAGS += -Isrc -Isrc/portab -Isrc/ipaddr -Isrc/tool - OBJS.tool += src/tool/tool.o src/tool/libngtool.a: ${OBJS.tool} -- cgit 1.4.1