Fixes for #58195, based on some ideas from Hidetosh Tajima.
[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=g_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-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a \
22         gspawn-win32-helper.exe
23
24 glib_OBJECTS =                  \
25         garray.o                \
26         gasyncqueue.o           \
27         gbacktrace.o            \
28         gbsearcharray.o         \
29         gcache.o                \
30         gcompletion.o           \
31         gconvert.o              \
32         gdataset.o              \
33         gdate.o                 \
34         gerror.o                \
35         gfileutils.o            \
36         ghash.o                 \
37         ghook.o                 \
38         giochannel.o            \
39         giowin32.o              \
40         glist.o                 \
41         gmain.o                 \
42         gmarkup.o               \
43         gmem.o                  \
44         gmessages.o             \
45         gnode.o                 \
46         gpattern.o              \
47         gprimes.o               \
48         gqsort.o                \
49         gqueue.o                \
50         grand.o                 \
51         grel.o                  \
52         gscanner.o              \
53         gshell.o                \
54         gslist.o                \
55         gspawn-win32.o          \
56         gstrfuncs.o             \
57         gstring.o               \
58         gthread.o               \
59         gthreadpool.o           \
60         gtimer.o                \
61         gtree.o                 \
62         gunibreak.o             \
63         gunicollate.o           \
64         gunidecomp.o            \
65         guniprop.o              \
66         gutf8.o                 \
67         gutils.o                \
68         gwin32.o
69
70 ../glibconfig.h: ../glibconfig.h.win32
71         cp $< $@
72
73 ../config.h: ../config.h.win32
74         cp $< $@
75
76 ################ The glib DLL
77
78 libglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a : $(glib_OBJECTS) glib.def glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc
79         $(BUILD_DLL) glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ @LT_CURRENT@:@LT_REVISION@:@LT_AGE@ glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
80
81 glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc : glib.rc
82         cp $< $@
83
84 gspawn-win32-helper.exe : gspawn-win32-helper.c
85         $(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@