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
8 include $(TOP)/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
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)
24 glib-$(GLIB_VER).dll \
25 gspawn-win32-helper.exe
72 ../glibconfig.h: ../glibconfig.h.win32
75 ../config.h: ../config.h.win32
78 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
79 makefile.mingw: makefile.mingw.in
80 sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
81 -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
86 #glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
87 # ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
89 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
90 dllwrap --mno-cygwin --dllname glib-$(GLIB_VER).dll --implib glib-$(GLIB_VER).lib --def glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
92 gspawn-win32-helper.exe : gspawn-win32-helper.c
93 $(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-$(GLIB_VER)
95 ################ subdirectories
98 cd gmodule && $(MAKE) -f makefile.mingw all
101 cd gthread && $(MAKE) -f makefile.mingw all
104 cd gobject && $(MAKE) -f makefile.mingw all
106 ################ test progs
108 testglib.o : testglib.c
109 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
111 testglib.exe : glib-$(GLIB_VER).dll testglib.o
112 $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
114 testgdate.o : testgdate.c
115 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
117 testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
118 $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
120 testgdateparser.o : testgdateparser.c
121 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
123 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
124 $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
127 ################ other stuff
130 -rm config.h glibconfig.h gmodule/gmoduleconf.h