diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-16 16:20:50 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-16 16:20:50 +0200 |
commit | 1acb6e3c8941de5715e7008503a4c8a699873a3b (patch) | |
tree | 2a53d3507cab019494dd407ea18b2eefeb4a78c4 | |
parent | Add KNOWN_ISSUES (diff) | |
download | cg-tools-1.4.1.tar.gz cg-tools-1.4.1.tar.bz2 cg-tools-1.4.1.tar.xz |
Improve makefile and fix bug in cg-limits1.4.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | cg-limits.c | 6 | ||||
-rw-r--r-- | config.mk | 6 |
3 files changed, 9 insertions, 7 deletions
@@ -32,8 +32,8 @@ MAN1 = $(BIN:=.1) MAN7 = cg-tools.7 all: $(XBIN) $(OUT) -$(OBJ): $(@:.o=.c) $(HDR) -$(OUT): $(@:.out=.o) cg-base.o +$(OBJ): $(HDR) +$(OUT): cg-base.o .c.o: $(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS) diff --git a/cg-limits.c b/cg-limits.c index 8f596f2..1048e13 100644 --- a/cg-limits.c +++ b/cg-limits.c @@ -362,13 +362,13 @@ parse_conf_file(const char *restrict pathname, char ***restrict names, *b++ = '\0'; q = strpbrk(r, " \t"); - if (!q) + if (q) *q = '\0'; q = strpbrk(g, " \t"); - if (!q) + if (q) *q = '\0'; q = strpbrk(b, " \t"); - if (!q) + if (q) *q = '\0'; q = strchr(p, '\0'); @@ -1,8 +1,10 @@ -PREFIX = /usr +PREFIX = /usr MANPREFIX = $(PREFIX)/share/man PKGNAME = cg-tools -CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D'PKGNAME="$(PKGNAME)"' +CC = cc + +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D'PKGNAME="$(PKGNAME)"' CFLAGS = -std=c99 -Wall -O2 LDFLAGS = -lcoopgamma -lm -s |