1 ## Makefile for building the GLib dlls with Microsoft C
2 ## Use: nmake -f makefile.msc install
4 # Change this to wherever you want to install the DLLs. This directory
5 # should be in your PATH.
10 !INCLUDE build\win32\make.msc
12 # Possibly override GLib version in build\win32\module.defs
13 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
15 ################################################################
17 # Nothing much configurable below
20 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
21 DEPCFLAGS = $(LIBICONV_CFLAGS)
24 glib-$(GLIB_VER).dll \
33 gspawn-win32-helper.exe \
39 copy glib-$(GLIB_VER).dll $(BIN)
84 glibconfig.h: glibconfig.h.win32
85 copy glibconfig.h.win32 glibconfig.h
87 config.h: config.h.win32
88 copy config.h.win32 config.h
90 makefile.msc: makefile.msc.in
91 $(SED) -e s,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@, \
92 -e s,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@, <makefile.msc.in >$@
96 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
97 $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) $(LIBICONV_LIBS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def
99 gspawn-win32-helper.exe : gspawn-win32-helper.c glib-$(GLIB_VER).dll
100 $(CC) $(CFLAGS) -Fe$@ -DGSPAWN_HELPER -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:windows user32.lib
102 ################ subdirectories
106 -$(MAKE) -f makefile.msc all
111 -$(MAKE) -f makefile.msc all
116 -$(MAKE) -f makefile.msc all
119 ################ test progs
121 testglib.obj : testglib.c
122 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" testglib.c
124 testglib.exe : glib-$(GLIB_VER).dll testglib.obj
125 $(CC) $(CFLAGS) -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
127 testgdate.obj : testgdate.c
128 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" testgdate.c
130 testgdate.exe : glib-$(GLIB_VER).dll testgdate.obj
131 $(CC) $(CFLAGS) -Fetestgdate.exe testgdate.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
133 testgdateparser.obj : testgdateparser.c
134 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" testgdateparser.c
136 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.obj
137 $(CC) $(CFLAGS) -Fetestgdateparser.exe testgdateparser.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
139 ################ other stuff
145 $(MAKE) -f makefile.msc clean
148 $(MAKE) -f makefile.msc clean
151 $(MAKE) -f makefile.msc clean