Update. Don't mention pthreads.
[platform/upstream/glib.git] / gmodule / makefile.mingw.in
1 ## Makefile for building the gmodule DLL with gcc for mingw. The build
2 ## uses tools running on cygwin, however.
3
4 ## Use: make -f makefile.mingw
5
6 TOP = ../..
7
8 include ../build/win32/make.mingw
9
10 ################################################################
11
12 # Nothing much configurable below
13
14 INCLUDES = -I .. -I ../glib -I .
15 DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" -DG_ENABLE_DEBUG
16
17 all : \
18         gmoduleconf.h \
19         gmodule-@GLIB_VERSION@.dll \
20         testgmodule.exe \
21         libgplugin_a.dll libgplugin_b.dll
22
23 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
24 makefile.mingw: makefile.mingw.in
25         sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
26 endif
27
28 gmodule_OBJECTS = \
29         gmodule.o
30
31 gmoduleconf.h: gmoduleconf.h.win32
32         cp $< $@
33
34 ################ The gmodule DLL
35
36 gmodule-@GLIB_VERSION@.dll : $(gmodule_OBJECTS) gmodule.def
37         $(BUILD_DLL) gmodule @GLIB_VERSION@ $(CFLAGS) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib
38
39 ################ test prog
40
41 testgmodule.exe : gmodule-@GLIB_VERSION@.dll testgmodule.o 
42 # We have to generate an .exp file separately with dlltool, and link
43 # with that. Sigh.
44         dlltool --output-exp testgmodule.exp testgmodule.o
45         $(CC) $(CFLAGS) -o testgmodule.exe testgmodule.o testgmodule.exp -L ../glib -lglib -L . -lgmodule $(LFLAGS)
46
47 libgplugin_a.dll : libgplugin_a.o
48         $(BUILD_DLL) libgplugin_a - libgplugin_a.o -L ../glib -lglib -L . -lgmodule
49
50 libgplugin_b.dll : libgplugin_b.o
51         $(BUILD_DLL) libgplugin_b - libgplugin_b.o -L ../glib -lglib -L . -lgmodule
52
53 ################ Other stuff
54
55 clean::
56         -rm gmoduleconf.h