Channel autoconnect, installable using make and some fixes.
This commit is contained in:
parent
817ca368c7
commit
3cae7a8242
4 changed files with 66 additions and 8 deletions
21
Makefile
21
Makefile
|
|
@ -1,6 +1,10 @@
|
|||
CC ?= cc
|
||||
CFLAGS ?= -O2
|
||||
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)
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR = $(PREFIX)/bin
|
||||
MANDIR ?= $(PREFIX)/share/man
|
||||
|
||||
HAVE_OPENSSL := $(shell pkg-config --exists openssl && echo yes)
|
||||
ifeq ($(HAVE_OPENSSL),yes)
|
||||
|
|
@ -8,10 +12,23 @@ CFLAGS += -DUSE_OPENSSL $(shell pkg-config --cflags openssl)
|
|||
LDLIBS += $(shell pkg-config --libs openssl)
|
||||
endif
|
||||
|
||||
ifeq ($(AUTOJOIN),1)
|
||||
CPPFLAGS += -DUSE_AUTOJOIN
|
||||
endif
|
||||
|
||||
irc9: irc9.c
|
||||
$(CC) $(CFLAGS) -D_DARWIN_C_SOURCE -o $@ $< $(LDLIBS)
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -D_DARWIN_C_SOURCE -o $@ $< $(LDLIBS)
|
||||
|
||||
install: irc9
|
||||
install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(MANDIR)/man1"
|
||||
install -m 755 irc9 "$(DESTDIR)$(BINDIR)/irc9"
|
||||
# install -m 644 irc9.1 "$(DESTDIR)$(MANDIR)/man1/irc9.1"
|
||||
|
||||
uninstall:
|
||||
rm -f "$(DESTDIR)$(BINDIR)/irc9"
|
||||
# rm -f "$(DESTDIR)$(MANDIR)/man1/irc9.1"
|
||||
|
||||
clean:
|
||||
rm -f irc9
|
||||
|
||||
.PHONY: clean
|
||||
.PHONY: clean install uninstall
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue