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