Make some changes to the way that GMainContext works:
[platform/upstream/glib.git] / gobject / makefile.mingw.in
1 ## Makefile for building the gobject DLL with gcc for mingw. The build
2 ## uses tools running on cygwin, however.
3
4 ## Use: make -f makefile.mingw
5
6 TOP = ../..
7
8 include ../build/win32/make.mingw
9
10 # Possibly override GLib version in build/win32/module.defs
11 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
12
13 ################################################################
14
15 # Nothing much configurable below
16
17 INCLUDES = -I .. -I .
18 DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=g_log_domain_gruntime -DG_ENABLE_DEBUG
19
20 srcdir=.
21
22 BUILD_DLL = ../build-dll
23
24 all : \
25         gobject-$(GLIB_VER).dll \
26         glib-genmarshal.exe
27
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@,,' <$< >$@
33 endif
34
35 gobject_OBJECTS =               \
36         gboxed.o                \
37         gbsearcharray.o         \
38         gclosure.o              \
39         genums.o                \
40         gobject.o               \
41         gparam.o                \
42         gparamspecs.o           \
43         gsignal.o               \
44         gtype.o                 \
45         gtypemodule.o           \
46         gtypeplugin.o           \
47         gvalue.o                \
48         gvaluearray.o           \
49         gvaluetransform.o       \
50         gvaluetypes.o
51
52 gobject-$(GLIB_VER).dll : $(srcdir)/stamp-gmarshal.h gmarshal.c $(gobject_OBJECTS) gobject.def 
53         $(BUILD_DLL) gobject $(GLIB_VER) gobject.def $(gobject_OBJECTS) -L .. -lglib-$(GLIB_VER)
54
55 glib-genmarshal.exe : glib-genmarshal.c
56         $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L .. -lglib-$(GLIB_VER)
57
58 # Copied from Makefile.am:
59 # initial creation of the real stamp-* files
60 gmarshal.h:     # never add deps here
61         test -f "$(srcdir)/$@" || touch $(srcdir)/$@
62 # normal autogeneration rules
63 # all autogenerated files need to be generated in the srcdir,
64 # so old versions get remade and are not confused with newer
65 # versions in the build dir. thus a development setup requires
66 # srcdir to be writable, passing --disable-rebuilds to
67 # ../configure will supress all autogeneration rules.
68 $(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal.exe
69         echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
70         && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
71         && ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
72         && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
73         && (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
74         && rm -f xgen-gmh xgen-gmh~ \
75         && echo timestamp > $@
76 $(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
77         ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
78         && cp xgen-gmc $(srcdir)/gmarshal.c \
79         && rm -f xgen-gmc xgen-gmc~
80 $(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
81         grep '^[A-Z]' $(srcdir)/gmarshal.list \
82         | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
83         && cp xgen-gms $(srcdir)/gmarshal.strings \
84         && rm -f xgen-gms xgen-gms~
85 glib-genmarshal.o: gmarshal.strings
86
87 clean::
88         -rm gmarshal.h gmarshal.c stamp-gmarshal.h