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 ################################################################
12 # Nothing much configurable below
14 INCLUDES = -I .. -I ../glib -I .
15 DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"GLib-GObject\" -DG_ENABLE_DEBUG
20 libgobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a \
41 libgobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a : $(srcdir)/stamp-gmarshal.h gmarshal.c $(gobject_OBJECTS) gobject.def
42 $(BUILD_DLL) gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ @LT_CURRENT@:@LT_REVISION@:@LT_AGE@ gobject.def $(gobject_OBJECTS) -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
44 glib-genmarshal.exe : glib-genmarshal.c
45 $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
47 testgobject.exe: libgobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a testgobject.o
48 $(CC) $(CFLAGS) -o testgobject.exe testgobject.o -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ $(LFLAGS)
50 # Copied from Makefile.am:
51 # initial creation of the real stamp-* files
52 gmarshal.h: # never add deps here
53 test -f "$(srcdir)/$@" || touch $(srcdir)/$@
54 # normal autogeneration rules
55 # all autogenerated files need to be generated in the srcdir,
56 # so old versions get remade and are not confused with newer
57 # versions in the build dir. thus a development setup requires
58 # srcdir to be writable, passing --disable-rebuilds to
59 # ../configure will supress all autogeneration rules.
60 $(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal.exe
61 echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
62 && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
63 && PATH=../glib:$$PATH ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
64 && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
65 && (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
66 && rm -f xgen-gmh xgen-gmh~ \
67 && echo timestamp > $@
68 $(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
69 PATH=../glib:$$PATH ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
70 && cp xgen-gmc $(srcdir)/gmarshal.c \
71 && rm -f xgen-gmc xgen-gmc~
72 $(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
73 grep '^[A-Z]' $(srcdir)/gmarshal.list \
74 | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
75 && cp xgen-gms $(srcdir)/gmarshal.strings \
76 && rm -f xgen-gms xgen-gms~
77 glib-genmarshal.o: gmarshal.strings
80 -rm gmarshal.h gmarshal.c stamp-gmarshal.h