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