gtk2/gtk/native/Makefile.am
Jehan 4376b4f705 Fix the build of the native gtk-update-icon-cache when cross-compiling.
As a noinst_PROGRAMS, the libtool generated for cross-compiling will be
used, which will mess up the linking. Create a all-local target instead.
Also ensure that building uses always a native version of the tool by
specifying a GTK_UPDATE_ICON_CACHE automake variable.
Finally "config.h" has been created to work for the target platform and
causes problem when cross-compiling. So we temporarily generate a basic
config.h which contains only the strict minimum.
2014-08-13 21:06:51 +00:00

23 lines
822 B
Makefile

CC = @CC_FOR_BUILD@
AM_CFLAGS = @CFLAGS_FOR_BUILD@
CPP = @CPP_FOR_BUILD@
AM_CPPFLAGS = @CPPFLAGS_FOR_BUILD@
AM_LDFLAGS = @LDFLAGS_FOR_BUILD@
native-update-icon-cache$(BUILD_EXEEXT): $(srcdir)/../updateiconcache.c
echo '#define GETTEXT_PACKAGE "gtk30"' > $(srcdir)/config.h
$(AM_V_CCLD)$(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) -I. -I$(srcdir)/../.. $(NATIVE_GDKPIXBUF_CFLAGS) $(CFLAGS_FOR_BUILD) $^ $(LDFLAGS_FOR_BUILD) $(NATIVE_GDKPIXBUF_LIBS) $(LIBS_FOR_BUILD) -o $@
rm -f $(srcdir)/config.h
if CROSS_COMPILING
if !USE_EXTERNAL_ICON_CACHE
all-local: native-update-icon-cache$(BUILD_EXEEXT)
native_update_icon_cache_CFLAGS = $(NATIVE_GDKPIXBUF_CFLAGS)
native_update_icon_cache_LDADD = $(NATIVE_GDKPIXBUF_LIBS)
native_update_icon_cache_SOURCES = $(srcdir)/../updateiconcache.c
endif
endif
-include $(top_srcdir)/git.mk