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.
10 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
14 include build/win32/make.mingw
16 ################################################################
18 # Nothing much configurable below
21 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
22 DEPCFLAGS = $(LIBICONV_CFLAGS)
25 glib-$(GLIB_VER).dll \
26 gmodule/gmodule-$(GLIB_VER).dll \
27 gthread/gthread-$(GLIB_VER).dll \
28 gobject/gobject-$(GLIB_VER).dll \
40 $(INSTALL) $(DLLS_TO_BUILD) $(BIN)
79 glibconfig.h: glibconfig.h.win32
82 config.h: config.h.win32
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@,' <$< >$@
91 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
92 ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(LIBICONV_LIBS) -luser32 -lwsock32
94 ################ subdirectories
96 gmodule/gmodule-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
97 cd gmodule && $(MAKE) -f makefile.mingw all
99 gthread/gthread-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
100 cd gthread && $(MAKE) -f makefile.mingw all
102 gobject/gobject-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
103 cd gobject && $(MAKE) -f makefile.mingw all
105 ################ test progs
107 testglib.o : testglib.c
108 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
110 testglib.exe : glib-$(GLIB_VER).dll testglib.o
111 $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
113 testgdate.o : testgdate.c
114 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
116 testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
117 $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
119 testgdateparser.o : testgdateparser.c
120 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
122 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
123 $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
126 ################ other stuff
129 -rm config.h glibconfig.h gmodule/gmoduleconf.h