Add G_GNUC_PURE macro (but don't use it anywhere).
[platform/upstream/glib.git] / makefile.mingw.in
1 ## Makefile for building the GLib DLL with gcc for mingw. The build
2 ## uses tools running on cygwin, however.
3
4 ## Use: make -f makefile.mingw
5
6 # Change this to wherever you want to install the DLLs. This directory
7 # should be in your PATH.
8 BIN = /bin
9
10 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
11
12 TOP = ..
13
14 include build/win32/make.mingw
15
16 ################################################################
17
18 # Nothing much configurable below
19
20 INCLUDES = -I .
21 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
22 DEPCFLAGS = $(LIBICONV_CFLAGS)
23
24 DLLS_TO_BUILD = \
25         glib-$(GLIB_VER).dll \
26         gmodule/gmodule-$(GLIB_VER).dll \
27         gthread/gthread-$(GLIB_VER).dll \
28         gobject/gobject-$(GLIB_VER).dll \
29
30
31 all : \
32         config.h \
33         glibconfig.h \
34         $(DLLS_TO_BUILD) \
35         testglib.exe \
36         testgdate.exe \
37         testgdateparser.exe
38
39 install : all
40         $(INSTALL) $(DLLS_TO_BUILD) $(BIN)
41
42 glib_OBJECTS = \
43         garray.o \
44         gasyncqueue.o \
45         gbacktrace.o \
46         gcache.o \
47         gcompletion.o \
48         gconvert.o \
49         gdataset.o \
50         gdate.o \
51         gerror.o \
52         ghook.o \
53         ghash.o \
54         giochannel.o \
55         giowin32.o \
56         glist.o \
57         gmain.o \
58         gmem.o \
59         gmessages.o \
60         gnode.o \
61         gprimes.o \
62         gqueue.o \
63         grand.o \
64         gslist.o \
65         gthread.o \
66         gthreadpool.o \
67         gtimer.o \
68         gtree.o \
69         grel.o \
70         gstring.o \
71         gstrfuncs.o \
72         gscanner.o \
73         gunidecomp.o \
74         guniprop.o \
75         gutf8.o \
76         gutils.o \
77         gwin32.o
78
79 glibconfig.h: glibconfig.h.win32
80         cp $< $@
81
82 config.h: config.h.win32
83         cp $< $@
84
85 makefile.mingw: makefile.mingw.in
86         sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
87             -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
88
89 ################ glib
90
91 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
92         ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(LIBICONV_LIBS) -luser32 -lwsock32
93
94 ################ subdirectories
95
96 gmodule/gmodule-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
97         cd gmodule && $(MAKE) -f makefile.mingw all
98
99 gthread/gthread-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
100         cd gthread && $(MAKE) -f makefile.mingw all
101
102 gobject/gobject-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
103         cd gobject && $(MAKE) -f makefile.mingw all
104
105 ################ test progs
106
107 testglib.o : testglib.c
108         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
109
110 testglib.exe : glib-$(GLIB_VER).dll testglib.o
111         $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
112
113 testgdate.o : testgdate.c
114         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
115
116 testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
117         $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
118
119 testgdateparser.o : testgdateparser.c
120         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
121
122 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
123         $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
124
125
126 ################ other stuff
127
128 clean::
129         -rm config.h glibconfig.h gmodule/gmoduleconf.h