30 lines
937 B
Makefile
30 lines
937 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)
|
|
GTK_LIBDIR ?= $(shell pkg-config --variable=libdir gtk+-3.0)
|
|
GTK_BINARY_VERSION ?= $(shell pkg-config --variable=gtk_binary_version gtk+-3.0)
|
|
GTK_MODULE_DIR ?= $(GTK_LIBDIR)/gtk-3.0/$(GTK_BINARY_VERSION)/immodules
|
|
|
|
all: $(PROG)
|
|
|
|
$(PROG): main.c ../ipc.c ../ipc.h
|
|
$(CC) -shared -fPIC $(CFLAGS) -o $@ main.c ../ipc.c $(LDFLAGS)
|
|
|
|
install: $(PROG)
|
|
test -n "$(GTK_LIBDIR)"
|
|
test -n "$(GTK_BINARY_VERSION)"
|
|
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 "$(GTK_LIBDIR)"
|
|
test -n "$(GTK_BINARY_VERSION)"
|
|
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
|