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
24 glib-$(GLIB_VER).dll \
25 gmodule/gmodule-$(GLIB_VER).dll \
26 gthread/gthread-$(GLIB_VER).dll \
27 gobject/gobject-$(GLIB_VER).dll \
39 $(INSTALL) $(DLLS_TO_BUILD) $(BIN)
77 glibconfig.h: glibconfig.h.win32
80 config.h: config.h.win32
83 makefile.mingw: makefile.mingw.in
84 sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
85 -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
89 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
90 ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) -luser32 -lwsock32
92 ################ subdirectories
94 gmodule/gmodule-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
95 cd gmodule && $(MAKE) -f makefile.mingw all
97 gthread/gthread-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
98 cd gthread && $(MAKE) -f makefile.mingw all
100 gobject/gobject-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
101 cd gobject && $(MAKE) -f makefile.mingw all
103 ################ test progs
105 testglib.o : testglib.c
106 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
108 testglib.exe : glib-$(GLIB_VER).dll testglib.o
109 $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
111 testgdate.o : testgdate.c
112 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
114 testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
115 $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
117 testgdateparser.o : testgdateparser.c
118 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
120 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
121 $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
124 ################ other stuff
127 -rm config.h glibconfig.h gmodule/gmoduleconf.h