1 ## Makefile for building the GLib and gmodule dll with Microsoft C
2 ## Use: nmake -f makefile.msc install
4 # Change this to wherever you want to install the dlls
7 # cl -? described the options
8 CC = cl -G5 -GF -Ox -W3 -D_DLL -nologo
10 LDFLAGS = /link /nodefaultlib:libc msvcrt.lib # /debug:full /debugtype:cv
12 TOUCH = copy makefile.msc
20 glib-$(GLIB_VER).dll \
21 gmodule\gmoduleconf.h \
22 gmodule-$(GLIB_VER).dll \
27 $(INSTALL) glib-$(GLIB_VER).dll $(BIN)
28 $(INSTALL) gmodule-$(GLIB_VER).dll $(BIN)
53 glib-$(GLIB_VER).dll : $(glib_OBJECTS)
54 $(CC) $(CFLAGS) -MD -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) user32.lib advapi32.lib $(LDFLAGS) /def:glib.def
56 glibconfig.h: glibconfig.h.win32
57 copy glibconfig.h.win32 glibconfig.h
60 $(CC) $(CFLAGS) -GD -c -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib $<
65 gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS)
66 $(CC) $(CFLAGS) -MD -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule\gmodule.def
68 gmodule.obj : gmodule\gmodule.c gmodule\gmodule-win32.c
69 $(CC) $(CFLAGS) -Igmodule -c -DG_LIB_DOMAIN=g_log_domain_gmodule gmodule\gmodule.c
71 gmodule\gmoduleconf.h: gmodule\gmoduleconf.h.win32
72 copy gmodule\gmoduleconf.h.win32 gmodule\gmoduleconf.h
74 testglib.exe : glib-$(GLIB_VER).dll testglib.obj
75 $(CC) $(CFLAGS) -MD -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /map
77 testglib.obj : testglib.c
78 $(CC) -c $(CFLAGS) testglib.c
80 testgmodule.exe : glib-$(GLIB_VER).dll gmodule-$(GLIB_VER).dll testgmodule.obj libgplugin_a.dll libgplugin_b.dll
81 $(CC) $(CFLAGS) -MD testgmodule.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS)
83 testgmodule.obj : gmodule\testgmodule.c
84 $(CC) $(CFLAGS) -Igmodule -c gmodule\testgmodule.c
86 libgplugin_a.dll : libgplugin_a.obj
87 $(CC) $(CFLAGS) -MD -LD libgplugin_a.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS)
89 libgplugin_a.obj : gmodule\libgplugin_a.c
90 $(CC) $(CFLAGS) -Igmodule -c gmodule\libgplugin_a.c
92 libgplugin_b.dll : libgplugin_b.obj
93 $(CC) $(CFLAGS) -MD -LD libgplugin_b.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS)
95 libgplugin_b.obj : gmodule\libgplugin_b.c
96 $(CC) $(CFLAGS) -Igmodule -c gmodule\libgplugin_b.c