fix tor's recent changes which got rid of a required variable in the
[platform/upstream/glib.git] / makefile.mingw.in
1 ## Makefile for building the GLib DLL with gcc for mingw. The build
2 ## uses tools running on cygwin, however.
3
4 ## Use: make -f makefile.mingw
5
6 # Change this to wherever you want to install the DLLs. This directory
7 # should be in your PATH.
8 BIN = /bin
9
10 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
11
12 TOP = ..
13
14 include build/win32/make.mingw
15
16 ################################################################
17
18 # Nothing much configurable below
19
20 INCLUDES = -I .
21 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
22
23 DLLS_TO_BUILD = \
24         glib-$(GLIB_VER).dll \
25         gmodule/gmodule-$(GLIB_VER).dll \
26         gthread/gthread-$(GLIB_VER).dll \
27         gobject/gobject-$(GLIB_VER).dll \
28
29
30 all : \
31         config.h \
32         glibconfig.h \
33         $(DLLS_TO_BUILD) \
34         testglib.exe \
35         testgdate.exe \
36         testgdateparser.exe
37
38 install : all
39         $(INSTALL) $(DLLS_TO_BUILD) $(BIN)
40
41 glib_OBJECTS = \
42         garray.o \
43         gasyncqueue.o \
44         gbacktrace.o \
45         gcache.o \
46         gcompletion.o \
47         gdataset.o \
48         gdate.o \
49         gerror.o \
50         ghook.o \
51         ghash.o \
52         giochannel.o \
53         giowin32.o \
54         glist.o \
55         gmain.o \
56         gmem.o \
57         gmessages.o \
58         gnode.o \
59         gprimes.o \
60         gqueue.o \
61         grand.o \
62         gslist.o \
63         gthread.o \
64         gthreadpool.o \
65         gtimer.o \
66         gtree.o \
67         grel.o \
68         gstring.o \
69         gstrfuncs.o \
70         gscanner.o \
71         gunidecomp.o \
72         guniprop.o \
73         gutf8.o \
74         gutils.o \
75         gwin32.o
76
77 glibconfig.h: glibconfig.h.win32
78         cp $< $@
79
80 config.h: config.h.win32
81         cp $< $@
82
83 makefile.mingw: makefile.mingw.in
84         sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
85             -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
86
87 ################ glib
88
89 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
90         ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) -luser32 -lwsock32
91
92 ################ subdirectories
93
94 gmodule/gmodule-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
95         cd gmodule && $(MAKE) -f makefile.mingw all
96
97 gthread/gthread-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
98         cd gthread && $(MAKE) -f makefile.mingw all
99
100 gobject/gobject-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
101         cd gobject && $(MAKE) -f makefile.mingw all
102
103 ################ test progs
104
105 testglib.o : testglib.c
106         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
107
108 testglib.exe : glib-$(GLIB_VER).dll testglib.o
109         $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
110
111 testgdate.o : testgdate.c
112         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
113
114 testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
115         $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
116
117 testgdateparser.o : testgdateparser.c
118         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
119
120 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
121         $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
122
123
124 ################ other stuff
125
126 clean::
127         -rm config.h glibconfig.h gmodule/gmoduleconf.h