fix gtk Makefile

This commit is contained in:
O_WRONLY 2025-12-23 23:58:22 +09:00 committed by Hojun-Cho
parent cc157c0b3c
commit 6b3c1cea8e

View File

@ -1,6 +1,6 @@
CFLAGS = -Wall -O2 -I.. `pkg-config --cflags gtk+-3.0` CFLAGS = -Wall -O2 -I.. `pkg-config --cflags gtk+-3.0`
LDFLAGS = `pkg-config --libs gtk+-3.0` LDFLAGS = `pkg-config --libs gtk+-3.0`
DSTDIR = /usr/lib64/gtk-3.0/3.0.0/immodules DSTDIR ?= $(shell find /usr/lib* -type d -path "*/gtk-3.0/*/immodules" 2>/dev/null | head -1)
im-strans.so: main.c im-strans.so: main.c
$(CC) -shared -fPIC $(CFLAGS) -o $@ $< $(LDFLAGS) $(CC) -shared -fPIC $(CFLAGS) -o $@ $< $(LDFLAGS)
@ -10,6 +10,7 @@ docker: main.c Dockerfile
docker run --rm -v $(CURDIR)/..:/src -w /src/gtk strans-gtk make im-strans.so docker run --rm -v $(CURDIR)/..:/src -w /src/gtk strans-gtk make im-strans.so
install: install:
mkdir -p $(DSTDIR)
cp im-strans.so $(DSTDIR)/ cp im-strans.so $(DSTDIR)/
gtk-query-immodules-3.0 --update-cache gtk-query-immodules-3.0 --update-cache