ponymap/Makefile
Přemysl Janouch 38a0077033 Generate a manpage
help2man should be enough so far.
2014-09-20 18:12:55 +02:00

27 lines
709 B
Makefile

SHELL = /bin/sh
CC = clang
# -Wunused-function is pretty annoying here, as everything is static
CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-function -ggdb
# -lpthread is only there for debugging (gdb & errno)
# -lrt is only for glibc < 2.17
LDFLAGS = `pkg-config --libs libssl jansson` -lpthread -lrt -ldl -lcurses
.PHONY: all clean
.SUFFIXES:
targets = ponymap ponymap.1 plugins/http.so plugins/irc.so plugins/ssh.so
all: $(targets)
clean:
rm -f $(targets)
ponymap: ponymap.c utils.c plugin-api.h siphash.c
$(CC) ponymap.c siphash.c -o $@ $(CFLAGS) $(LDFLAGS)
ponymap.1: ponymap
help2man -No $@ ./$<
plugins/%.so: plugins/%.c utils.c plugin-api.h
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS) -shared -fPIC