1 ## Makefile for building the GLib dlls with Microsoft C
2 ## Use: nmake -f makefile.msc
6 !INCLUDE $(TOP)\build\win32\make.msc
8 # Possibly override GLib version in build\win32\module.defs
9 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
11 ################################################################
13 # Nothing much configurable below
16 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib -DG_ENABLE_DEBUG
17 DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
20 glib-$(GLIB_VER).dll \
28 glib-$(GLIB_VER)s.lib \
30 gspawn-win32-helper.exe \
79 glibconfig.h: glibconfig.h.win32
80 copy glibconfig.h.win32 glibconfig.h
82 config.h: config.h.win32
83 copy config.h.win32 config.h
85 makefile.msc: makefile.msc.in
86 $(SED) -e s,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@, \
87 -e s,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@, <makefile.msc.in >$@
91 # create a static libary
92 glib-$(GLIB_VER)s.lib : $(glib_OBJECTS)
93 lib /out:glib-$(GLIB_VER)s.lib $(glib_OBJECTS)
95 # $(LIBICONV_LIBS) is a runtime dependency now
97 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
98 $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) $(INTL_LIBS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def
100 gspawn-win32-helper.exe : gspawn-win32-helper.c glib-$(GLIB_VER).dll
101 $(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:windows user32.lib
103 ################ subdirectories
107 -$(MAKE) -f makefile.msc all
112 -$(MAKE) -f makefile.msc all
117 -$(MAKE) -f makefile.msc all
120 ################ test progs
122 testglib.obj : testglib.c
123 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" testglib.c
125 testglib.exe : glib-$(GLIB_VER).dll testglib.obj
126 $(CC) $(CFLAGS) -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
128 testgdate.obj : testgdate.c
129 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" testgdate.c
131 testgdate.exe : glib-$(GLIB_VER).dll testgdate.obj
132 $(CC) $(CFLAGS) -Fetestgdate.exe testgdate.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
134 testgdateparser.obj : testgdateparser.c
135 $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" testgdateparser.c
137 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.obj
138 $(CC) $(CFLAGS) -Fetestgdateparser.exe testgdateparser.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
140 ################ other stuff
146 $(MAKE) -f makefile.msc clean
149 $(MAKE) -f makefile.msc clean
152 $(MAKE) -f makefile.msc clean