diff --git a/.gitmodules b/.gitmodules index fc93d6e..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "json-c"] - path = json-c - url = https://github.com/json-c/json-c diff --git a/Makefile b/Makefile index 704f6b1..3ef02a1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ ifdef DEBUG endif RM=rm -f FIND=find -INCLUDES=-Ilibstrophe -Ijson-c +INCLUDES=-Ilibstrophe CFLAGS+=$(DBGCFLAGS) -fno-omit-frame-pointer -fPIC -std=gnu99 -g -Wall -Wextra -Werror-implicit-function-declaration -Wno-missing-field-initializers $(INCLUDES) LDFLAGS+=-shared -g $(DBGCFLAGS) $(DBGLDFLAGS) LDLIBS=-lstrophe -lpthread @@ -18,36 +18,7 @@ SRCS=plugin.c \ config.c \ connection.c \ -DEPS=json-c/libjson-c.a -OLDSRCS=slack.c \ - slack-api.c \ - slack-buffer.c \ - slack-channel.c \ - slack-config.c \ - slack-command.c \ - slack-completion.c \ - slack-emoji.c \ - slack-input.c \ - slack-message.c \ - slack-oauth.c \ - slack-request.c \ - slack-teaminfo.c \ - slack-user.c \ - slack-workspace.c \ - api/slack-api-hello.c \ - api/slack-api-error.c \ - api/slack-api-message.c \ - api/slack-api-user-typing.c \ - api/message/slack-api-message-bot-message.c \ - api/message/slack-api-message-slackbot-response.c \ - api/message/slack-api-message-me-message.c \ - api/message/slack-api-message-unimplemented.c \ - request/slack-request-chat-memessage.c \ - request/slack-request-chat-postmessage.c \ - request/slack-request-channels-list.c \ - request/slack-request-conversations-members.c \ - request/slack-request-emoji-list.c \ - request/slack-request-users-list.c +DEPS= OBJS=$(subst .c,.o,$(SRCS)) all: $(DEPS) weechat-xmpp @@ -57,15 +28,9 @@ weechat-xmpp: $(OBJS) which patchelf >/dev/null && \ patchelf --set-rpath $(LIBRARY_PATH):$(shell patchelf --print-rpath xmpp.so) xmpp.so || true -json-c/libjson-c.a: - cd json-c && env CFLAGS= LDFLAGS= \ - cmake -DCMAKE_C_FLAGS=-fPIC . - $(MAKE) -C json-c json-c-static -json-c: json-c/libjson-c.a - depend: .depend -.depend: json-c/libjson-c.a $(SRCS) +.depend: $(SRCS) $(RM) ./.depend $(CC) $(CFLAGS) -MM $^>>./.depend @@ -74,10 +39,6 @@ tidy: clean: $(RM) $(OBJS) - $(MAKE) -C json-c clean || true - git submodule foreach --recursive git clean -xfd || true - git submodule foreach --recursive git reset --hard || true - git submodule update --init --recursive || true distclean: clean $(RM) *~ .depend diff --git a/connection.c b/connection.c index 6ac95a2..77ed274 100644 --- a/connection.c +++ b/connection.c @@ -2,7 +2,6 @@ // License, version 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -#include #include #include #include @@ -260,7 +259,7 @@ int xmpp_connection_check_events(const void *pointer, void *data, int remaining_ } int xmpp_connection_route_message(xmpp_conn_t *workspace, - const char *type, json_object *message) + const char *type, void *message) { //struct stringcase key; //key.string = type; diff --git a/connection.h b/connection.h index d2f3448..9507803 100644 --- a/connection.h +++ b/connection.h @@ -16,6 +16,6 @@ void xmpp_connection_connect(const char* jid, const char* password); int xmpp_connection_check_events(const void *pointer, void *data, int remaining_calls); int xmpp_connection_route_message(xmpp_conn_t *connection, - const char *type, json_object *message); + const char *type, void *message); #endif /*WEECHAT_XMPP_CONNECTION_H*/ diff --git a/json-c b/json-c deleted file mode 160000 index 75bf657..0000000 --- a/json-c +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 75bf657cc285c1b726492ed6af3645ea95fe17ac diff --git a/plugin.c b/plugin.c index 1381694..582a524 100644 --- a/plugin.c +++ b/plugin.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include "plugin.h"