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 # Change this to wherever you want to install the DLLs. This directory
7 # should be in your PATH.
12 include build/win32/make.mingw
14 # Possibly override GLib version in build/win32/module.defs
15 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
17 ################################################################
19 # Nothing much configurable below
22 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
23 DEPCFLAGS = $(LIBICONV_CFLAGS)
26 glib-$(GLIB_VER).dll \
27 gmodule/gmodule-$(GLIB_VER).dll \
28 gthread/gthread-$(GLIB_VER).dll \
29 gobject/gobject-$(GLIB_VER).dll \
36 gspawn-win32-helper.exe \
42 $(INSTALL) $(DLLS_TO_BUILD) $(BIN)
84 glibconfig.h: glibconfig.h.win32
87 config.h: config.h.win32
90 makefile.mingw: makefile.mingw.in
91 sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
92 -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
96 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
97 ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(LIBICONV_LIBS) -luser32 -lwsock32
99 gspawn-win32-helper.exe : gspawn-win32.c
100 $(CC) $(CFLAGS) -mwindows -DGSPAWN_HELPER -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-$(GLIB_VER)
102 ################ subdirectories
104 gmodule/gmodule-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
105 cd gmodule && $(MAKE) -f makefile.mingw all
107 gthread/gthread-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
108 cd gthread && $(MAKE) -f makefile.mingw all
110 gobject/gobject-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
111 cd gobject && $(MAKE) -f makefile.mingw all
113 ################ test progs
115 testglib.o : testglib.c
116 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
118 testglib.exe : glib-$(GLIB_VER).dll testglib.o
119 $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
121 testgdate.o : testgdate.c
122 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
124 testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
125 $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
127 testgdateparser.o : testgdateparser.c
128 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
130 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
131 $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
134 ################ other stuff
137 -rm config.h glibconfig.h gmodule/gmoduleconf.h