diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/configure.ac | 20 | ||||
-rw-r--r-- | gtk/module.defs | 30 | ||||
-rw-r--r-- | gtk/module.rules | 28 | ||||
-rw-r--r-- | gtk/src/Makefile.am | 13 |
4 files changed, 37 insertions, 54 deletions
diff --git a/gtk/configure.ac b/gtk/configure.ac index 63a8a75ba..bda4d371f 100644 --- a/gtk/configure.ac +++ b/gtk/configure.ac @@ -13,6 +13,16 @@ AC_PROG_CXX AM_PROG_CC_STDC AC_HEADER_STDC +if test x"$CC_FOR_BUILD" = x; then + if test x"$cross_compiling" = x"yes"; then + AC_CHECK_PROGS(CC_FOR_BUILD, gcc, cc) + else + CC_FOR_BUILD="$CC" + fi +fi + +AC_SUBST(CC_FOR_BUILD) + # introduce the optional configure parameter for the path of libXXX.a AC_ARG_WITH(hb, AC_HELP_STRING( @@ -116,6 +126,14 @@ AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"]) PKG_CHECK_MODULES(GHB, [$GHB_PACKAGES]) +AC_PATH_PROG(BUILD_PKG_CONFIG, pkg-config, no) +if test x"$BUILD_PKG_CONFIG" = x"no"; then + AC_MSG_ERROR([You need to install pkg-config]) +fi + +GHB_TOOLS_CFLAGS=`$BUILD_PKG_CONFIG --cflags glib-2.0 gdk-pixbuf-2.0` +GHB_TOOLS_LIBS=`$BUILD_PKG_CONFIG --libs glib-2.0 gdk-pixbuf-2.0` + case $host in *-*-mingw*) if test "x$use_libdl" = "xyes" ; then @@ -124,6 +142,8 @@ case $host in ;; esac +AC_SUBST(GHB_TOOLS_CFLAGS) +AC_SUBST(GHB_TOOLS_LIBS) AC_SUBST(GHB_CFLAGS) AC_SUBST(GHB_LIBS) diff --git a/gtk/module.defs b/gtk/module.defs index 55f5d9acc..cc20a18ef 100644 --- a/gtk/module.defs +++ b/gtk/module.defs @@ -25,33 +25,3 @@ ifeq (0,$(FEATURE.gtk.update.checks)) GTK.CONFIGURE.extra += --disable-update-checks endif -############################################################################### -############################################################################### -$(eval $(call import.MODULE.defs,HGTK,hgtk)) -$(eval $(call import.GCC,HGTK)) - -HGTK.GCC.gcc = gcc -HGTK.GCC.args.extra = $(shell pkg-config --cflags glib-2.0) -HGTK.GCC.args.extra += $(shell pkg-config --cflags gdk-pixbuf-2.0) -HGTK.GCC.args.extra += $(shell pkg-config --libs glib-2.0) -HGTK.GCC.args.extra += $(shell pkg-config --libs gdk-pixbuf-2.0) - -HGTK.src/ = $(SRC/)gtk/src/ -HGTK.build/ = $(BUILD/)gtk/src/ - -HGTKCOMMON.c = \ - $(HGTK.src/)plist.c \ - $(HGTK.src/)values.c - -CREATE_RES.c = \ - $(HGTK.src/)create_resources.c - -CREATE_RES.c.o = $(patsubst $(SRC/)%.c,$(BUILD/)%-native.o,$(CREATE_RES.c)) -CREATE_RES.c.o += $(patsubst $(SRC/)%.c,$(BUILD/)%-native.o,$(HGTKCOMMON.c)) -CREATE_RES.exe = $(HGTK.build/)create_resources - -HGTK.out += $(HGTKCOMMON.c.o) -HGTK.out += $(CREATE_RES.exe) -HGTK.out += $(CREATE_RES.c.o) - -BUILD.out += $(HGTK.out) diff --git a/gtk/module.rules b/gtk/module.rules index 09a8c34c7..a1c1eb76f 100644 --- a/gtk/module.rules +++ b/gtk/module.rules @@ -1,10 +1,10 @@ $(eval $(call import.MODULE.rules,GTK)) -build: hgtk.build gtk.build +build: gtk.build install: gtk.install install-strip: gtk.install-strip uninstall: gtk.uninstall -clean: hgtk.clean gtk.clean +clean: gtk.clean xclean: gtk.xclean gtk.configure: $(GTK.CONFIGURE.stamp) @@ -35,31 +35,11 @@ gtk.install: gtk.uninstall: $(MAKE) -C $(GTK.build/) uninstall -gtk.clean: hgtk.clean +gtk.clean: $(MAKE) -C $(GTK.build/) clean -gtk.xclean: hgtk.clean +gtk.xclean: $(MAKE) -C $(GTK.build/) distclean $(RM.exe) -f $(GTK.out) $(RM.exe) -fr $(GTK.build/) -############################################################################### -############################################################################### -$(eval $(call import.MODULE.rules,HGTK)) - -hgtk.build: $(CREATE_RES.exe) - -$(CREATE_RES.exe): | $(dir $(CREATE_RES.exe)) -$(CREATE_RES.exe): $(CREATE_RES.c.o) $(HGTKCOMMON.c.o) - $(call HGTK.GCC.EXE,$@,$^) - -$(HGTKCOMMON.c.o): | $(dir $(HGTKCOMMON.c.o)) -$(HGTKCOMMON.c.o): $(BUILD/)%-native.o: $(SRC/)%.c - $(call HGTK.GCC.C_O,$@,$<) - -$(CREATE_RES.c.o): | $(dir $(CREATE_RES.c.o)) -$(CREATE_RES.c.o): $(BUILD/)%-native.o: $(SRC/)%.c - $(call HGTK.GCC.C_O,$@,$<) - -hgtk.clean: - $(RM.exe) -f $(HGTK.out) diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am index da44339c8..12d23b11e 100644 --- a/gtk/src/Makefile.am +++ b/gtk/src/Makefile.am @@ -127,6 +127,19 @@ widget.deps: makedeps.py resources.plist: create_resources resources.list $(icons_dep) internal_defaults.xml standard_presets.xml ghb.ui widget.deps widget_reverse.deps ./create_resources -I$(srcdir) $(srcdir)/resources.list resources.plist +CREATE_RES.c = \ + create_resources.c \ + plist.c \ + values.c + +CREATE_RES.c.o = $(patsubst %.c,%-native.o,$(CREATE_RES.c)) + +create_resources: $(CREATE_RES.c.o) + $(CC_FOR_BUILD) -o $@ $^ $(GHB_TOOLS_LIBS) + +$(CREATE_RES.c.o): %-native.o: %.c + $(CC_FOR_BUILD) $(GHB_TOOLS_CFLAGS) -c -o $@ $< + ghbcellrenderertext.$(OBJEXT): marshalers.h $(srcdir)/marshalers.h: marshalers.list |