Personal copy of mcabber
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

118 lines
4.3 KiB

VERSION = "1.1.3"
PREFIX ?= ~/.local
DOCDIR = ${PREFIX}/share/mcabber
CFLAGS = -Wall -Wextra -Wno-unused-parameter -pedantic -std=gnu99 -O2
LDFLAGS = `pkg-config --libs glib-2.0 loudmouth-1.0` \
-lncurses -lncursesw -lpanelw
CPPFLAGS = -I.. `pkg-config --cflags glib-2.0 loudmouth-1.0` \
-DLOUDMOUTH_USES_SHA256 -D_GNU_SOURCE -DUSE_SIGWINCH \
-DDATA_DIR=\"${PREFIX}/share\" -DMCABBER_VERSION=\"${VERSION}\"
SRC = main.c roster.c events.c commands.c compl.c hbuf.c screen.c settings.c \
hooks.c utf8.c histolog.c utils.c pgp.c xmpp.c xmpp_helper.c xmpp_iq.c \
xmpp_iqrequest.c xmpp_muc.c xmpp_s10n.c caps.c help.c carbons.c \
fifo_internal.c
OBJ = ${SRC:.c=.o}
.ifdef OTR
CPPFLAGS += -DHAVE_LIBOTR
LDFLAGS += -lotr
SRC += otr.c nohtml.c
.endif
.ifdef GPGME
CPPFLAGS += -DHAVE_GPGME
LDFLAGS += -lgpgme
.endif
.ifdef UNICODE
CPPFLAGS += -DHAVE_UNICODE -DHAVE_WCHAR_H -DHAVE_WCTYPE_H
.endif
.ifdef DEGUG
CPPFLAGS += -DENABLE_DEBUG
CFLAGS += -g
.endif
mcabber: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
main.o: main.h caps.h screen.h settings.h roster.h commands.h histolog.h \
hooks.h utils.h pgp.h otr.h xmpp.h help.h events.h compl.h
${CC} -c ${CFLAGS} ${CPPFLAGS} main.c
roster.o: roster.h utils.h hooks.h
${CC} -c ${CFLAGS} ${CPPFLAGS} roster.c
events.o: events.h screen.h
${CC} -c ${CFLAGS} ${CPPFLAGS} events.c
commands.o: commands.h help.h roster.h screen.h compl.h hooks.h hbuf.h utils.h \
settings.h events.h otr.h carbons.h utf8.h xmpp.h main.h
${CC} -c ${CFLAGS} ${CPPFLAGS} commands.c
compl.o: compl.h utf8.h roster.h events.h settings.h logprint.h
${CC} -c ${CFLAGS} ${CPPFLAGS} compl.c
hbuf.o: hbuf.h utils.h utf8.h screen.h
${CC} -c ${CFLAGS} ${CPPFLAGS} hbuf.c
screen.o: screen.h utf8.h hbuf.h commands.h compl.h roster.h histolog.h \
settings.h utils.h xmpp.h main.h
${CC} -c ${CFLAGS} ${CPPFLAGS} screen.c
settings.o: settings.h commands.h logprint.h otr.h utils.h xmpp.h main.h
${CC} -c ${CFLAGS} ${CPPFLAGS} settings.c
hooks.o: hooks.h screen.h roster.h histolog.h hbuf.h settings.h utils.h utf8.h \
commands.h main.h
${CC} -c ${CFLAGS} ${CPPFLAGS} hooks.c
utf8.o: utf8.h
${CC} -c ${CFLAGS} ${CPPFLAGS} utf8.c
histolog.o: histolog.h hbuf.h utils.h screen.h settings.h utils.h roster.h \
xmpp.h
${CC} -c ${CFLAGS} ${CPPFLAGS} histolog.c
utils.o: utils.h logprint.h settings.h main.h screen.h
${CC} -c ${CFLAGS} ${CPPFLAGS} utils.c
pgp.o: pgp.h settings.h utils.h logprint.h
${CC} -c ${CFLAGS} ${CPPFLAGS} pgp.c
xmpp.o: xmpp.h xmpp_helper.h xmpp_iq.h xmpp_iqrequest.h xmpp_muc.h xmpp_s10n.h \
caps.h events.h histolog.h hooks.h otr.h roster.h screen.h settings.h \
utils.h main.h carbons.h
${CC} -c ${CFLAGS} ${CPPFLAGS} xmpp.c
xmpp_helper.o: xmpp_helper.h settings.h utils.h caps.h logprint.h
${CC} -c ${CFLAGS} ${CPPFLAGS} xmpp_helper.c
xmpp_iq.o: xmpp_helper.h commands.h screen.h utils.h logprint.h settings.h \
caps.h main.h
${CC} -c ${CFLAGS} ${CPPFLAGS} xmpp_iq.c
xmpp_iqrequest.o: xmpp_helper.h xmpp_iq.h screen.h utils.h settings.h hooks.h \
hbuf.h carbons.h
${CC} -c ${CFLAGS} ${CPPFLAGS} xmpp_iqrequest.c
xmpp_muc.o: xmpp_helper.h xmpp_iq.h xmpp_muc.h events.h hooks.h screen.h \
hbuf.h roster.h commands.h settings.h utils.h histolog.h
${CC} -c ${CFLAGS} ${CPPFLAGS} xmpp_muc.c
xmpp_s10n.o: xmpp_helper.h events.h screen.h hbuf.h settings.h
${CC} -c ${CFLAGS} ${CPPFLAGS} xmpp_s10n.c
caps.o: settings.h utils.h
${CC} -c ${CFLAGS} ${CPPFLAGS} caps.c
help.o: logprint.h screen.h hbuf.h settings.h utils.h
${CC} -c ${CFLAGS} ${CPPFLAGS} help.c
carbons.o: carbons.h settings.h xmpp_helper.h xmpp_defines.h logprint.h xmpp.h
${CC} -c ${CFLAGS} ${CPPFLAGS} carbons.c
fifo_internal.o: commands.h logprint.h utils.h settings.h main.h
${CC} -c ${CFLAGS} ${CPPFLAGS} fifo_internal.c
otr.o: hbuf.h logprint.h nohtml.h otr.h roster.h screen.h settings.h utils.h \
xmpp.h
${CC} -c ${CFLAGS} ${CPPFLAGS} otr.c
nohtml.o:
${CC} -c ${CFLAGS} ${CPPFLAGS} nohtml.c
clean:
rm -f mcabber ${OBJ}
install: mcabber docs
install -Dm755 mcabber ${DESTDIR}${PREFIX}/bin/mcabber
docs:
mkdir -p ${DESTDIR}${DOCDIR}/help
for lang in en cs de fr it nl pl ru uk; do \
install -d ${DESTDIR}${DOCDIR}/help/$$lang; \
install -m 0644 doc/help/$$lang/* \
${DESTDIR}${DOCDIR}/help/$$lang; \
done
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/mcabber
rm -fr ${DESTDIR}${DOCDIR}