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