mirror of https://github.com/bqv/weechat-xmpp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
987 B
Makefile
43 lines
987 B
Makefile
7 years ago
|
CC=clang
|
||
|
CXX=clang++
|
||
|
RM=rm -f
|
||
|
CFLAGS=-fPIC -std=gnu99 -g -Wall -Wextra -Werror-implicit-function-declaration -I libwebsockets/include -I json-c
|
||
|
LDFLAGS=-shared -g
|
||
|
LDLIBS=-lssl
|
||
|
|
||
|
SRCS=slack.c \
|
||
|
slack-config.c \
|
||
|
slack-command.c \
|
||
|
slack-oauth.c \
|
||
|
slack-workspace.c
|
||
|
OBJS=$(subst .c,.o,$(SRCS)) libwebsockets/lib/libwebsockets.a json-c/libjson-c.a
|
||
|
|
||
|
all: weechat-slack
|
||
|
|
||
|
weechat-slack: $(OBJS)
|
||
|
$(CC) $(LDFLAGS) -o slack.so $(OBJS) $(LDLIBS)
|
||
|
|
||
|
libwebsockets/lib/libwebsockets.a:
|
||
|
cd libwebsockets && cmake -DLWS_STATIC_PIC=ON -DLWS_WITH_SHARED=OFF -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITH_LIBEV=OFF -DLWS_WITH_LIBUV=OFF -DLWS_WITH_LIBEVENT=OFF .
|
||
|
$(MAKE) -C libwebsockets
|
||
|
|
||
|
json-c/libjson-c.a:
|
||
|
cd json-c && cmake -DCMAKE_C_FLAGS=-fPIC .
|
||
|
$(MAKE) -C json-c json-c-static
|
||
|
|
||
|
depend: .depend
|
||
|
|
||
|
.depend: $(SRCS)
|
||
|
$(RM) ./.depend
|
||
|
$(CC) $(CFLAGS) -MM $^>>./.depend;
|
||
|
|
||
|
clean:
|
||
|
$(RM) $(OBJS)
|
||
|
$(MAKE) -C libwebsockets clean
|
||
|
$(MAKE) -C json-c clean
|
||
|
|
||
|
distclean: clean
|
||
|
$(RM) *~ .depend
|
||
|
|
||
|
include .depend
|