Fix invalid memory reads. (#340816, Nick Treleaven)
[platform/upstream/glib.git] / glib / 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 TOP = ../..
7
8 include ../build/win32/make.mingw
9
10 ################################################################
11
12 # Nothing much configurable below
13
14 INCLUDES = -I . -I .. 
15 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" -DG_ENABLE_DEBUG -DDLL_EXPORT
16 DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
17
18 all :                           \
19         ../config.h             \
20         ../glibconfig.h         \
21         libglib-2.0.a \
22         gspawn-win32-helper.exe
23
24 glib_OBJECTS =                  \
25         garray.o                \
26         gasyncqueue.o           \
27         gbacktrace.o            \
28         gbookmarkfile.o         \
29         gbsearcharray.o         \
30         gcache.o                \
31         gcompletion.o           \
32         gconvert.o              \
33         gdataset.o              \
34         gdate.o                 \
35         gdir.o                  \
36         gerror.o                \
37         gfileutils.o            \
38         ghash.o                 \
39         ghook.o                 \
40         giochannel.o            \
41         giowin32.o              \
42         glist.o                 \
43         gmain.o                 \
44         gmarkup.o               \
45         gmem.o                  \
46         gmessages.o             \
47         gnode.o                 \
48         gpattern.o              \
49         gprimes.o               \
50         gqsort.o                \
51         gqueue.o                \
52         grand.o                 \
53         grel.o                  \
54         gscanner.o              \
55         gshell.o                \
56         gslist.o                \
57         gspawn-win32.o          \
58         gstrfuncs.o             \
59         gstring.o               \
60         gthread.o               \
61         gthreadpool.o           \
62         gtimer.o                \
63         gtree.o                 \
64         gunibreak.o             \
65         gunicollate.o           \
66         gunidecomp.o            \
67         guniprop.o              \
68         gutf8.o                 \
69         gutils.o                \
70         gwin32.o                \
71         localcharset.o
72
73 ../glibconfig.h: ../glibconfig.h.win32
74         cp $< $@
75
76 ../config.h: ../config.h.win32
77         cp $< $@
78
79 localcharset.c : libcharset/localcharset.c
80         cp $< $@
81
82 ################ The glib DLL
83
84 libglib-2.0.a : $(glib_OBJECTS) glib.def glib-2.0.rc
85         $(BUILD_DLL) glib-2.0 @LT_CURRENT@:@LT_REVISION@:@LT_AGE@ glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
86
87 glib-2.0.rc : glib.rc
88         cp $< $@
89
90 gspawn-win32-helper.exe : gspawn-win32-helper.c
91         $(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-2.0