From 0a9be50b38fc44100d727a60ab487b46f44b605a Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 1 Sep 2015 10:05:43 +0200 Subject: Implement basic gresource usage --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 744ede8..61cf3e6 100644 --- a/Makefile +++ b/Makefile @@ -27,8 +27,8 @@ RCC_CFLAGS = ${GENERIC_CFLAGS} ${EXTRA_CFLAGS} $(shell pkg-config --cflags ${RCC RCC_LDFLAGS = ${GENERIC_LDFLAGS} ${EXTRA_LDFLAGS} $(shell pkg-config --libs ${RCC_PACKAGES}) RCC_COMPILE = $(CC) $(RCC_CFLAGS) RCC_LINK = $(CC) $(RCC_CFLAGS) $(RCC_LDFLAGS) -RCC_OBJECTS = rcm-client-main.o rcm-client-hardware-list.o rcm-client-receive.o rcm-client-advanced.o generated.o shared.o -RCC_HEADERS = rcm-client-main.h rcm-client-hardware-list.h rcm-client-receive.h rcm-client-advanced.h generated.h $(COMMON_HEADERS) +RCC_OBJECTS = rcm-client-main.o rcm-client-hardware-list.o rcm-client-receive.o rcm-client-advanced.o rcm-client-resources.o generated.o shared.o +RCC_HEADERS = rcm-client-main.h rcm-client-hardware-list.h rcm-client-receive.h rcm-client-advanced.h rcm-client-resources.h generated.h $(COMMON_HEADERS) INSTALL = install -c INSTALL_PROGRAM = ${INSTALL} @@ -54,6 +54,12 @@ shared.o: shared.c shared.h linux-input-keycodes.o: linux-input-keycodes.c $(COMMON_HEADERS) $(CC) $(GENERIC_CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $< +rcm-client-resources.c: rcm-client.gresource.xml $(shell glib-compile-resources --generate-dependencies rcm-client.gresource.xml) + glib-compile-resources --target=$@ --generate-source --c-name rcm rcm-client.gresource.xml + +rcm-client-resources.h: rcm-client.gresource.xml $(shell glib-compile-resources --generate-dependencies rcm-client.gresource.xml) + glib-compile-resources --target=$@ --generate-header --c-name rcm rcm-client.gresource.xml + rcm-client-%.o: rcm-client-%.c $(RCC_HEADERS) $(RCC_COMPILE) -o $@ -c $< -- cgit v1.2.3