fixed a typo in a comment.
[glib.git] / makefile.mingw.in
blob7c2df39ec882d618801071febe23eaceccfc0709
1 ## Makefile for building the GLib DLL with gcc for mingw. The build
2 ## uses tools running on cygwin, however.
4 ## Use: make -f makefile.mingw
6 TOP = ..
8 include build/win32/make.mingw
10 # Possibly override GLib version in build/win32/module.defs
11 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
13 ################################################################
15 # Nothing much configurable below
17 INCLUDES = -I .
18 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib -DG_ENABLE_DEBUG -DDLL_EXPORT
19 DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
21 DLLS_TO_BUILD =                         \
22         glib-$(GLIB_VER).dll            \
23         sub-gmodule                     \
24         sub-gthread                     \
25         sub-gobject
27 all :                           \
28         config.h                \
29         glibconfig.h            \
30         $(DLLS_TO_BUILD)        \
31         gspawn-win32-helper.exe \
32         testglib.exe            \
33         testgdate.exe           \
34         testgdateparser.exe
36 glib_OBJECTS =                  \
37         garray.o                \
38         gasyncqueue.o           \
39         gbacktrace.o            \
40         gcache.o                \
41         gcompletion.o           \
42         gconvert.o              \
43         gdataset.o              \
44         gdate.o                 \
45         gerror.o                \
46         gfileutils.o            \
47         ghash.o                 \
48         ghook.o                 \
49         giochannel.o            \
50         giowin32.o              \
51         glist.o                 \
52         gmain.o                 \
53         gmarkup.o               \
54         gmem.o                  \
55         gmessages.o             \
56         gnode.o                 \
57         gprimes.o               \
58         gqsort.o                \
59         gqueue.o                \
60         grand.o                 \
61         grel.o                  \
62         gscanner.o              \
63         gshell.o                \
64         gslist.o                \
65         gspawn-win32.o          \
66         gstrfuncs.o             \
67         gstring.o               \
68         gthread.o               \
69         gthreadpool.o           \
70         gtimer.o                \
71         gtree.o                 \
72         gunibreak.o             \
73         gunidecomp.o            \
74         guniprop.o              \
75         gutf8.o                 \
76         gutils.o                \
77         gwin32.o
79 glibconfig.h: glibconfig.h.win32
80         cp $< $@
82 config.h: config.h.win32
83         cp $< $@
85 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
86 makefile.mingw: makefile.mingw.in
87         sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
88             -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
89 endif
91 ################ glib
93 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
94         ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
96 gspawn-win32-helper.exe : gspawn-win32-helper.c
97         $(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-$(GLIB_VER)
99 ################ subdirectories
101 sub-gmodule :
102         cd gmodule && $(MAKE) -f makefile.mingw all
104 sub-gthread :
105         cd gthread && $(MAKE) -f makefile.mingw all
107 sub-gobject :
108         cd gobject && $(MAKE) -f makefile.mingw all
110 ################ test progs
112 testglib.o : testglib.c
113         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
115 testglib.exe : glib-$(GLIB_VER).dll testglib.o
116         $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
118 testgdate.o : testgdate.c
119         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
121 testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
122         $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
124 testgdateparser.o : testgdateparser.c
125         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
127 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
128         $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
131 ################ other stuff
133 clean::
134         -rm config.h glibconfig.h gmodule/gmoduleconf.h