CC = gcc TARGET = weechat-chatwork.so PREFIX = /usr LIBDIR = $(PREFIX)/lib/weechat/plugins DEBUG = -Wall -g CFLAGS = -fPIC -I$(PREFIX)/include/weechat LDFLAGS = -shared -lcurl -lcjson all: $(TARGET) $(TARGET): main.c $(CC) $(DEBUG) $(CFLAGS) $(LDFLAGS) -o $@ $< install: install -d $(LIBDIR) install -m 755 $(TARGET) $(LIBDIR) clean: rm -f $(TARGET)