Skip to content

Instantly share code, notes, and snippets.

@webpigeon
Created September 30, 2012 11:22
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 webpigeon/3806494 to your computer and use it in GitHub Desktop.
Save webpigeon/3806494 to your computer and use it in GitHub Desktop.
pidgim-opensteamworks makefile by battwa
CC ?= gcc
PLUGINDIR ?= $(shell pkg-config --variable=plugindir purple)
CFLAGS += -Wall -fPIC
LDFLAGS += -shared
CPPFLAGS += $(shell pkg-config --cflags glib-2.0 json-glib-1.0 purple)
LIBS += $(shell pkg-config --libs glib-2.0 json-glib-1.0 purple)
TARGET = libsteam.so
OBJS = libsteam.o steam_connection.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