s/UNICODE_LAST_CHAR/G_UNICODE_LAST_CHAR/
[platform/upstream/glib.git] / makefile.msc.in
1 ## Makefile for building the GLib dlls with Microsoft C
2 ## Use: nmake -f makefile.msc install
3
4 # Change this to wherever you want to install the DLLs. This directory
5 # should be in your PATH.
6 BIN = C:\bin
7
8 TOP = ..
9
10 !INCLUDE $(TOP)\build\win32\make.msc
11
12 # Possibly override GLib version in build\win32\module.defs
13 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
14
15 ################################################################
16
17 # Nothing much configurable below
18
19 INCLUDES = -I .
20 DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
21 DEPCFLAGS = $(LIBICONV_CFLAGS)
22
23 DLLS_TO_BUILD =                 \
24         glib-$(GLIB_VER).dll    \
25         sub-gmodule             \
26         sub-gthread             \
27         sub-gobject
28
29 all :                           \
30         config.h                \
31         glibconfig.h            \
32         $(DLLS_TO_BUILD)        \
33         gspawn-win32-helper.exe \
34         testglib.exe            \
35         testgdate.exe           \
36         testgdateparser.exe
37
38 install : all
39         copy glib-$(GLIB_VER).dll $(BIN)
40
41 glib_OBJECTS =                  \
42         garray.obj              \
43         gasyncqueue.obj         \
44         gbacktrace.obj          \
45         gcache.obj              \
46         gcompletion.obj         \
47         gconvert.obj            \
48         gdataset.obj            \
49         gdate.obj               \
50         gerror.obj              \
51         gfileutils.obj          \
52         ghash.obj               \
53         ghook.obj               \
54         giochannel.obj          \
55         giowin32.obj            \
56         glist.obj               \
57         gmain.obj               \
58         gmarkup.obj             \
59         gmem.obj                \
60         gmessages.obj           \
61         gnode.obj               \
62         gprimes.obj             \
63         gqsort.obj              \
64         gqueue.obj              \
65         grand.obj               \
66         grel.obj                \
67         gscanner.obj            \
68         gshell.obj              \
69         gslist.obj              \
70         gspawn-win32.obj        \
71         gstrfuncs.obj           \
72         gstring.obj             \
73         gthread.obj             \
74         gthreadpool.obj         \
75         gtimer.obj              \
76         gtree.obj               \
77         gunidecomp.obj          \
78         guniprop.obj            \
79         gutf8.obj               \
80         gutils.obj              \
81         gwin32.obj
82
83 glibconfig.h: glibconfig.h.win32
84         copy glibconfig.h.win32 glibconfig.h
85
86 config.h: config.h.win32
87         copy config.h.win32 config.h
88
89 makefile.msc: makefile.msc.in
90         $(SED) -e s,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@, \
91                -e s,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@, <makefile.msc.in >$@
92
93 ################ glib
94
95 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
96         $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) $(LIBICONV_LIBS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def
97
98 gspawn-win32-helper.exe : gspawn-win32-helper.c glib-$(GLIB_VER).dll
99         $(CC) $(CFLAGS) -Fe$@ -DGSPAWN_HELPER -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:windows user32.lib
100
101 ################ subdirectories
102
103 sub-gmodule :
104         cd gmodule
105         -$(MAKE) -f makefile.msc all
106         cd ..
107
108 sub-gthread :
109         cd gthread
110         -$(MAKE) -f makefile.msc all
111         cd ..
112
113 sub-gobject :
114         cd gobject
115         -$(MAKE) -f makefile.msc all
116         cd ..
117
118 ################ test progs
119
120 testglib.obj : testglib.c
121         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" testglib.c
122
123 testglib.exe : glib-$(GLIB_VER).dll testglib.obj
124         $(CC) $(CFLAGS) -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
125
126 testgdate.obj : testgdate.c
127         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" testgdate.c
128
129 testgdate.exe : glib-$(GLIB_VER).dll testgdate.obj
130         $(CC) $(CFLAGS) -Fetestgdate.exe testgdate.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
131
132 testgdateparser.obj : testgdateparser.c
133         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" testgdateparser.c
134
135 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.obj
136         $(CC) $(CFLAGS) -Fetestgdateparser.exe testgdateparser.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
137
138 ################ other stuff
139
140 clean::
141         del config.h
142         del glibconfig.h
143         cd gmodule
144         $(MAKE) -f makefile.msc clean
145         cd ..
146         cd gthread
147         $(MAKE) -f makefile.msc clean
148         cd ..
149         cd gobject
150         $(MAKE) -f makefile.msc clean
151         cd ..