17 lines
508 B
Makefile
17 lines
508 B
Makefile
CC ?= cc
|
|
CFLAGS ?= -O2 -Wall -Wextra -Wpedantic -pthread $(shell pkg-config --cflags ncurses 2>/dev/null)
|
|
LDLIBS ?= -pthread $(shell pkg-config --libs ncurses 2>/dev/null || echo -lncurses)
|
|
|
|
HAVE_OPENSSL := $(shell pkg-config --exists openssl && echo yes)
|
|
ifeq ($(HAVE_OPENSSL),yes)
|
|
CFLAGS += -DUSE_OPENSSL $(shell pkg-config --cflags openssl)
|
|
LDLIBS += $(shell pkg-config --libs openssl)
|
|
endif
|
|
|
|
irc9: irc9.c
|
|
$(CC) $(CFLAGS) -D_DARWIN_C_SOURCE -o $@ $< $(LDLIBS)
|
|
|
|
clean:
|
|
rm -f irc9
|
|
|
|
.PHONY: clean
|