Report only the most specific instantiatable prerequisite, filter out all
[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-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.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-@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@
43
44 glib-genmarshal.exe : glib-genmarshal.c
45         $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
46
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)
49
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
78
79 clean::
80         -rm gmarshal.h gmarshal.c stamp-gmarshal.h