Skip to content

Instantly share code, notes, and snippets.

@NicolasEhrhardt
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NicolasEhrhardt/cf1c963f0dbdcb8a9a0e to your computer and use it in GitHub Desktop.
Save NicolasEhrhardt/cf1c963f0dbdcb8a9a0e to your computer and use it in GitHub Desktop.
Makefile of pidgin-xmpp-ignore-groups
CC ?= gcc
PLUGINDIR ?= $(shell pkg-config --variable=plugindir purple)
CFLAGS += -Wall -fPIC
LDFLAGS += -L$(PLUGINDIR) -ljabber -shared
CPPFLAGS += $(shell pkg-config --cflags glib-2.0 purple)
LIBS += $(shell pkg-config --libs glib-2.0 purple)
TARGET = libxmpp-ignore-groups.so
OBJS = xmpp-ignore-groups.o
%.o: %.c %.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c
$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
install: $(TARGET)
@install -Dm755 $(TARGET) "$(DESTDIR)$(PLUGINDIR)/$(TARGET)"
uninstall:
@rm -f "$(DESTDIR)$(PLUGINDIR)/$(TARGET)"
clean:
@rm -f $(OBJS) $(TARGET)
.PHONY: uninstall clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment