diff options
| author | Nakidai <nakidai@disroot.org> | 2026-02-19 00:00:52 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2026-02-19 00:07:40 +0300 |
| commit | fb6f0fd115fec4a7c3490d0a3091b81af5ba6378 (patch) | |
| tree | 532a16cc552d636810f05935caba99c87efdf075 | |
| parent | cf618cc741269fa1917840345bb3fae133007b6d (diff) | |
| download | ngircd-fb6f0fd115fec4a7c3490d0a3091b81af5ba6378.tar.gz ngircd-fb6f0fd115fec4a7c3490d0a3091b81af5ba6378.zip | |
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
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | src/Makefile | 7 | ||||
| -rw-r--r-- | src/ipaddr/Makefile | 4 | ||||
| -rw-r--r-- | src/ngircd/Makefile | 7 | ||||
| -rw-r--r-- | src/portab/Makefile | 4 | ||||
| -rw-r--r-- | 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} |