Files
strans/gtk/Makefile

27 lines
719 B
Makefile

PROG = im-strans.so
CFLAGS = -Wall -O2 -I.. $(shell pkg-config --cflags gtk+-3.0)
LDFLAGS = $(shell pkg-config --libs gtk+-3.0)
LIBDIR ?= /usr/lib
GTK_MODULE_DIR = $(LIBDIR)/gtk-3.0/3.0.0/immodules
all: $(PROG)
$(PROG): main.c ../ipc.c ../ipc.h
$(CC) -shared -fPIC $(CFLAGS) -o $@ main.c ../ipc.c $(LDFLAGS)
install: $(PROG)
test -n "$(LIBDIR)"
mkdir -p "$(DESTDIR)$(GTK_MODULE_DIR)"
cp $(PROG) "$(DESTDIR)$(GTK_MODULE_DIR)/"
if test -z "$(DESTDIR)"; then gtk-query-immodules-3.0 --update-cache; fi
uninstall:
test -n "$(LIBDIR)"
rm -f "$(DESTDIR)$(GTK_MODULE_DIR)/$(PROG)"
if test -z "$(DESTDIR)"; then gtk-query-immodules-3.0 --update-cache; fi
clean:
rm -f $(PROG)
.PHONY: all install uninstall clean