vger/Makefile

34 lines
678 B
Makefile
Raw Permalink Normal View History

include config.mk
PREFIX?=/usr/local/
CFLAGS += -pedantic -Wall -Wextra -Wmissing-prototypes \
-Wstrict-prototypes -Wwrite-strings ${EXTRAFLAGS}
.SUFFIXES: .c .o
.c.o:
${CC} ${CFLAGS} -c $<
2020-12-01 22:39:05 +00:00
all: vger
clean:
find . \( -name vger -o \
2022-07-04 19:52:20 +00:00
-name unit_test -o \
-name "*.o" -o \
-name "*.core" \) \
-delete
2020-12-04 18:29:44 +00:00
2022-07-04 19:52:45 +00:00
vger: main.c vger.c mimes.o utils.o opts.h
${CC} ${CFLAGS} -o $@ main.c mimes.o utils.o
2020-12-04 18:29:44 +00:00
install: vger
install -o root -g wheel vger ${PREFIX}/bin/
2020-12-03 20:40:16 +00:00
install -o root -g wheel vger.8 ${PREFIX}/man/man8/
2020-12-01 22:39:05 +00:00
2022-07-04 19:52:20 +00:00
unit_test: tests.c vger.o
${CC} ${CFLAGS} -o $@ vger.o tests.c mimes.o utils.o
test: vger unit_test
./unit_test
2020-12-01 22:39:05 +00:00
cd tests && sh test.sh