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