Blame src/api/Makefile

nsz 3c60f4
CFLAGS+=-std=c99 -pedantic-errors -Wall -Werror -Wno-unused -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
nsz f9df5c
#CFLAGS+=-DX_PS -DX_TPS -DX_TYM -DX_RPP_TPP -DX_FMTMSG -DX_NDBM
nsz 9e10bb
LDFLAGS+=-lcrypt -ldl -lm -lpthread -lrt
nsz e19254
nsz 9e10bb
SRC=$(sort $(wildcard *.c))
nsz 9e10bb
ERR=$(SRC:.c=.err)
nsz e19254
nsz 9e10bb
-include ../../config.mak
nsz 9e10bb
nsz 9e10bb
all: all.err
nsz 9e10bb
	cat $<
nsz 9e10bb
nsz 9e10bb
all.err: $(ERR)
nsz 9e10bb
	LC_ALL=C $(CC) $(LDFLAGS) -o main *.o 2>main.err || true
nsz 9e10bb
	cat $(ERR) |\
nsz 9e10bb
		grep -v 'Each undeclared identifier is reported only once' |\
nsz 9e10bb
		grep -v 'for each function it appears in' >$@ || true
nsz e19254
nsz 9e10bb
%.err: %.c
nsz 9e10bb
	LC_ALL=C $(CC) $(CFLAGS) -c $< 2>$@ || true
nsz 9e10bb
nsz 9e10bb
clean:
nsz 9e10bb
	rm -f main *.o *.err