1 ## Makefile for building the gmodule DLL with gcc for mingw. The build
2 ## uses tools running on cygwin, however.
4 ## Use: make -f makefile.mingw
8 include ../build/win32/make.mingw
10 ################################################################
12 # Nothing much configurable below
14 INCLUDES = -I .. -I ../glib -I .
15 DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" -DG_ENABLE_DEBUG
19 gmodule-@GLIB_VERSION@.dll \
21 libgplugin_a.dll libgplugin_b.dll
23 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
24 makefile.mingw: makefile.mingw.in
25 sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
31 gmoduleconf.h: gmoduleconf.h.win32
34 ################ The gmodule DLL
36 gmodule-@GLIB_VERSION@.dll : $(gmodule_OBJECTS) gmodule.def
37 $(BUILD_DLL) gmodule @GLIB_VERSION@ $(CFLAGS) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib
39 ################ test prog
41 testgmodule.exe : gmodule-@GLIB_VERSION@.dll testgmodule.o
42 # We have to generate an .exp file separately with dlltool, and link
44 dlltool --output-exp testgmodule.exp testgmodule.o
45 $(CC) $(CFLAGS) -o testgmodule.exe testgmodule.o testgmodule.exp -L ../glib -lglib -L . -lgmodule $(LFLAGS)
47 libgplugin_a.dll : libgplugin_a.o
48 $(BUILD_DLL) libgplugin_a - libgplugin_a.o -L ../glib -lglib -L . -lgmodule
50 libgplugin_b.dll : libgplugin_b.o
51 $(BUILD_DLL) libgplugin_b - libgplugin_b.o -L ../glib -lglib -L . -lgmodule
53 ################ Other stuff