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