GVariant: fix some refcounting issues
[platform/upstream/glib.git] / glib / 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 ..\build\win32\make.msc
7
8 ################################################################
9
10 INCLUDES = -FImsvc_recommended_pragmas.h -I . -I ..
11 DEFINES = \
12         -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" \
13         -DG_ENABLE_DEBUG -DPCRE_STATIC -DG_DISABLE_DEPRECATED \
14         -DDLL_EXPORT=1
15
16 DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(DIRENT_CFLAGS)
17
18 all :                           \
19         ..\config.h             \
20         ..\glibconfig.h \
21         galias.h                \
22         galiasdef.c             \
23         gnulib\gnulib.lib       \
24         pcre\pcre.lib           \
25         libglib-2.0-0.dll \
26         glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib \
27         gspawn-win32-helper.exe \
28         gspawn-win32-helper-console.exe \
29
30
31 gnulib\gnulib.lib :
32         cd gnulib
33         nmake -f makefile.msc
34         cd ..
35
36 pcre\pcre.lib :
37         cd pcre
38         nmake -f makefile.msc
39         cd ..
40
41 glib_OBJECTS =                  \
42         garray.obj              \
43         gasyncqueue.obj         \
44         gatomic.obj     \
45         gbacktrace.obj          \
46         gbase64.obj     \
47         gbookmarkfile.obj \
48         gcache.obj \
49         gchecksum.obj   \
50         gcompletion.obj \
51         gconvert.obj \
52         gdataset.obj \
53         gdate.obj \
54         gdir.obj \
55         gerror.obj \
56         gfileutils.obj \
57         ghash.obj \
58         ghostutils.obj \
59         ghook.obj \
60         giochannel.obj \
61         giowin32.obj \
62         gpoll.obj \
63         gkeyfile.obj \
64         glist.obj \
65         gmain.obj \
66         gmappedfile.obj \
67         gmarkup.obj \
68         gmem.obj \
69         gmessages.obj \
70         gnode.obj \
71         goption.obj \
72         gpattern.obj \
73         gprimes.obj \
74         gprintf.obj \
75         gqsort.obj \
76         gqueue.obj \
77         grand.obj \
78         gregex.obj \
79         grel.obj \
80         gscanner.obj \
81         gsequence.obj \
82         gshell.obj \
83         gslice.obj \
84         gslist.obj \
85         gspawn-win32.obj \
86         gstdio.obj \
87         gstrfuncs.obj \
88         gstring.obj \
89         gtestutils.obj \
90         gthread.obj \
91         gthreadpool.obj \
92         gtimer.obj \
93         gtree.obj \
94         gunibreak.obj \
95         gunicollate.obj \
96         gunidecomp.obj \
97         guniprop.obj \
98         gurifuncs.obj \
99         gutf8.obj               \
100         gutils.obj              \
101         gwin32.obj              \
102         localcharset.obj
103
104 ..\glibconfig.h: ..\glibconfig.h.win32
105         copy ..\glibconfig.h.win32 ..\glibconfig.h
106
107 ..\config.h: ..\config.h.win32
108         copy ..\config.h.win32 ..\config.h
109
110 galias.h: glib.symbols
111         perl makegalias.pl < glib.symbols > galias.h
112
113 galiasdef.c: glib.symbols
114           perl makegalias.pl -def < glib.symbols > galiasdef.c
115
116 localcharset.obj : libcharset\localcharset.c
117         $(CC) $(CFLAGS) -DLIBDIR=\".\" -c libcharset\localcharset.c
118
119 glib.def: glib.symbols
120         echo EXPORTS > glib.def
121         cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES \
122                 -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
123                 -DG_GNUC_PRINTF=;G_GNUC_PRINTF -DG_GNUC_FORMAT=;G_GNUC_FORMAT glib.symbols >> glib.def
124
125 glib.res : glib.rc
126         rc -DBUILDNUMBER=0 -r -fo glib.res glib.rc
127
128 ################ glib
129
130 # create a static libary
131 # static library can well have the real version number in the name
132 glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib
133         lib /out:glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib
134
135 libglib-2.0-0.dll : $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib glib.def glib.res
136         $(CC) $(CFLAGS) -LD -Fe$@ $(glib_OBJECTS) glib.res $(INTL_LIBS) \
137         gnulib\gnulib.lib pcre\pcre.lib $(DIRENT_LIBS) user32.lib advapi32.lib shell32.lib wsock32.lib ole32.lib ws2_32.lib \
138         $(LDFLAGS) /implib:glib-2.0.lib /def:glib.def
139
140 gspawn-win32-helper.exe : gspawn-win32-helper.c libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll
141         $(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:windows user32.lib
142
143 gspawn-win32-helper-console.exe : gspawn-win32-helper.c libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll
144         $(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:console user32.lib
145
146 ################ other stuff
147
148 clean::
149         del ..\config.h
150         del ..\glibconfig.h
151