|
|
@ -14,28 +14,32 @@ LIBDIR ?= $(PREFIX)/lib
|
|
|
|
INSTALL ?= /usr/bin/install
|
|
|
|
INSTALL ?= /usr/bin/install
|
|
|
|
|
|
|
|
|
|
|
|
SRCS=plugin.c \
|
|
|
|
SRCS=plugin.c \
|
|
|
|
account.c \
|
|
|
|
account.c \
|
|
|
|
buffer.c \
|
|
|
|
buffer.c \
|
|
|
|
channel.c \
|
|
|
|
channel.c \
|
|
|
|
command.c \
|
|
|
|
command.c \
|
|
|
|
config.c \
|
|
|
|
config.c \
|
|
|
|
connection.c \
|
|
|
|
connection.c \
|
|
|
|
input.c \
|
|
|
|
input.c \
|
|
|
|
message.c \
|
|
|
|
message.c \
|
|
|
|
user.c \
|
|
|
|
user.c \
|
|
|
|
|
|
|
|
|
|
|
|
DEPS=
|
|
|
|
DEPS=axc/build/libaxc.a
|
|
|
|
OBJS=$(subst .c,.o,$(SRCS))
|
|
|
|
OBJS=$(subst .c,.o,$(SRCS))
|
|
|
|
|
|
|
|
|
|
|
|
all: weechat-xmpp
|
|
|
|
all: weechat-xmpp
|
|
|
|
weechat-xmpp: $(DEPS) xmpp.so
|
|
|
|
weechat-xmpp: $(DEPS) xmpp.so
|
|
|
|
|
|
|
|
|
|
|
|
xmpp.so: $(OBJS)
|
|
|
|
xmpp.so: $(OBJS) $(DEPS)
|
|
|
|
$(CC) $(LDFLAGS) -o xmpp.so $(OBJS) $(LDLIBS)
|
|
|
|
$(CC) $(LDFLAGS) -o xmpp.so $(OBJS) $(DEPS) $(LDLIBS)
|
|
|
|
which patchelf >/dev/null && \
|
|
|
|
which patchelf >/dev/null && \
|
|
|
|
patchelf --set-rpath $(LIBRARY_PATH):$(shell realpath $(shell dirname $(shell gcc --print-libgcc-file-name))/../../../) xmpp.so && \
|
|
|
|
patchelf --set-rpath $(LIBRARY_PATH):$(shell realpath $(shell dirname $(shell gcc --print-libgcc-file-name))/../../../) xmpp.so && \
|
|
|
|
patchelf --shrink-rpath xmpp.so || true
|
|
|
|
patchelf --shrink-rpath xmpp.so || true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axc/build/libaxc.a:
|
|
|
|
|
|
|
|
$(MAKE) -C axc
|
|
|
|
|
|
|
|
axc: axc/build/libaxc.a
|
|
|
|
|
|
|
|
|
|
|
|
test: xmpp.so
|
|
|
|
test: xmpp.so
|
|
|
|
env LD_PRELOAD=$(DEBUG) \
|
|
|
|
env LD_PRELOAD=$(DEBUG) \
|
|
|
|
weechat -a -P 'alias,buflist,irc' -r '/plugin load ./xmpp.so'
|
|
|
|
weechat -a -P 'alias,buflist,irc' -r '/plugin load ./xmpp.so'
|
|
|
@ -55,6 +59,10 @@ tidy:
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJS)
|
|
|
|
$(RM) $(OBJS)
|
|
|
|
|
|
|
|
$(MAKE) -C axc clean
|
|
|
|
|
|
|
|
git submodule foreach --recursive git clean -xfd || true
|
|
|
|
|
|
|
|
git submodule foreach --recursive git reset --hard || true
|
|
|
|
|
|
|
|
git submodule update --init --recursive || true
|
|
|
|
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
distclean: clean
|
|
|
|
$(RM) *~ .depend
|
|
|
|
$(RM) *~ .depend
|
|
|
|