1 ## Makefile for building the gobject DLL with gcc for mingw. The build
2 ## uses tools running on cygwin, however.
4 ## Use: make -f makefile.mingw
8 include ../build/win32/make.mingw
10 # Possibly override GLib version in build/win32/module.defs
11 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
13 ################################################################
15 # Nothing much configurable below
18 DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=g_log_domain_gruntime -DG_ENABLE_DEBUG
22 BUILD_DLL = ../build-dll
25 gobject-$(GLIB_VER).dll \
28 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
29 makefile.mingw: makefile.mingw.in
30 sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
31 -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' \
32 -e 's,@RE[B]UILD@,,' <$< >$@
50 gobject-$(GLIB_VER).dll : $(gobject_OBJECTS) gobject.def
51 $(BUILD_DLL) gobject $(GLIB_VER) gobject.def $(gobject_OBJECTS) -L .. -lglib-$(GLIB_VER)
53 glib-genmarshal.exe : glib-genmarshal.c
54 $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L .. -lglib-$(GLIB_VER) -L . -lgobject-$(GLIB_VER)
56 # Copied from Makefile.am:
57 # initial creation of the real stamp-* files
58 gmarshal.h: # never add deps here
59 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
60 # normal autogeneration rules
61 # all autogenerated files need to be generated in the srcdir,
62 # so old versions get remade and are not confused with newer
63 # versions in the build dir. thus a development setup requires
64 # srcdir to be writable, passing --disable-rebuilds to
65 # ../configure will supress all autogeneration rules.
66 $(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal.exe
67 echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
68 && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
69 && ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
70 && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
71 && (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
72 && rm -f xgen-gmh xgen-gmh~ \
73 && echo timestamp > $@
74 $(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
75 ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
76 && cp xgen-gmc $(srcdir)/gmarshal.c \
77 && rm -f xgen-gmc xgen-gmc~
78 $(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
79 grep '^[A-Z]' $(srcdir)/gmarshal.list \
80 | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
81 && cp xgen-gms $(srcdir)/gmarshal.strings \
82 && rm -f xgen-gms xgen-gms~
83 glib-genmarshal.o: gmarshal.strings