Clarify docs on the return. Fix a memory leak if a type with a value table
[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 ################################################################
11
12 # Nothing much configurable below
13
14 INCLUDES = -I .. -I ../glib -I .
15 DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"GLib-GObject\" -DG_ENABLE_DEBUG
16
17 srcdir=.
18
19 all : \
20         libgobject-2.0.a \
21         testgobject.exe \
22         glib-genmarshal.exe
23
24 gobject_OBJECTS =               \
25         gboxed.o                \
26         gclosure.o              \
27         genums.o                \
28         gobject.o               \
29         gparam.o                \
30         gparamspecs.o           \
31         gsignal.o               \
32         gsourceclosure.o        \
33         gtype.o                 \
34         gtypemodule.o           \
35         gtypeplugin.o           \
36         gvalue.o                \
37         gvaluearray.o           \
38         gvaluetransform.o       \
39         gvaluetypes.o
40
41 libgobject-2.0.a : $(srcdir)/stamp-gmarshal.h gmarshal.c $(gobject_OBJECTS) gobject.def gobject-2.0.rc
42         $(BUILD_DLL) gobject-2.0 @LT_CURRENT@:@LT_REVISION@:@LT_AGE@ gobject.def $(gobject_OBJECTS) -L ../glib -lglib-2.0
43
44 glib-genmarshal.exe : glib-genmarshal.c
45         $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L ../glib -lglib-2.0
46
47 testgobject.exe: libgobject-2.0.a testgobject.o
48         $(CC) $(CFLAGS) -o testgobject.exe testgobject.o -L ../glib -lglib-2.0 -L . -lgobject-2.0 $(LFLAGS)
49
50 gobject-2.0.rc : gobject.rc
51         cp $< $@
52
53 # Copied from Makefile.am:
54 # initial creation of the real stamp-* files
55 gmarshal.h:     # never add deps here
56         test -f "$(srcdir)/$@" || touch $(srcdir)/$@
57 # normal autogeneration rules
58 # all autogenerated files need to be generated in the srcdir,
59 # so old versions get remade and are not confused with newer
60 # versions in the build dir. thus a development setup requires
61 # srcdir to be writable, passing --disable-rebuilds to
62 # ../configure will supress all autogeneration rules.
63 $(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal.exe
64         echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
65         && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
66         && PATH=../glib:$$PATH ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
67         && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
68         && (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
69         && rm -f xgen-gmh xgen-gmh~ \
70         && echo timestamp > $@
71 $(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
72         PATH=../glib:$$PATH ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
73         && cp xgen-gmc $(srcdir)/gmarshal.c \
74         && rm -f xgen-gmc xgen-gmc~
75 $(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
76         grep '^[A-Z]' $(srcdir)/gmarshal.list \
77         | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
78         && cp xgen-gms $(srcdir)/gmarshal.strings \
79         && rm -f xgen-gms xgen-gms~
80 glib-genmarshal.o: gmarshal.strings
81
82 clean::
83         -rm gmarshal.h gmarshal.c stamp-gmarshal.h