Add gmarkup.
[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         gqueue.obj              \
64         grand.obj               \
65         grel.obj                \
66         gscanner.obj            \
67         gshell.obj              \
68         gslist.obj              \
69         gspawn-win32.obj        \
70         gstrfuncs.obj           \
71         gstring.obj             \
72         gthread.obj             \
73         gthreadpool.obj         \
74         gtimer.obj              \
75         gtree.obj               \
76         gunidecomp.obj          \
77         guniprop.obj            \
78         gutf8.obj               \
79         gutils.obj              \
80         gwin32.obj
81
82 glibconfig.h: glibconfig.h.win32
83         copy glibconfig.h.win32 glibconfig.h
84
85 config.h: config.h.win32
86         copy config.h.win32 config.h
87
88 makefile.msc: makefile.msc.in
89         $(SED) -e s,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@, \
90                -e s,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@, <makefile.msc.in >$@
91
92 ################ glib
93
94 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
95         $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) $(LIBICONV_LIBS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def
96
97 gspawn-win32-helper.exe : gspawn-win32.c glib-$(GLIB_VER).dll
98         $(CC) $(CFLAGS) -Fe$@ -DGSPAWN_HELPER -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32.c glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:windows user32.lib
99
100 ################ subdirectories
101
102 sub-gmodule :
103         cd gmodule
104         -$(MAKE) -f makefile.msc all
105         cd ..
106
107 sub-gthread :
108         cd gthread
109         -$(MAKE) -f makefile.msc all
110         cd ..
111
112 sub-gobject :
113         cd gobject
114         -$(MAKE) -f makefile.msc all
115         cd ..
116
117 ################ test progs
118
119 testglib.obj : testglib.c
120         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" testglib.c
121
122 testglib.exe : glib-$(GLIB_VER).dll testglib.obj
123         $(CC) $(CFLAGS) -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
124
125 testgdate.obj : testgdate.c
126         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" testgdate.c
127
128 testgdate.exe : glib-$(GLIB_VER).dll testgdate.obj
129         $(CC) $(CFLAGS) -Fetestgdate.exe testgdate.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
130
131 testgdateparser.obj : testgdateparser.c
132         $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" testgdateparser.c
133
134 testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.obj
135         $(CC) $(CFLAGS) -Fetestgdateparser.exe testgdateparser.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
136
137 ################ other stuff
138
139 clean::
140         del config.h
141         del glibconfig.h
142         cd gmodule
143         $(MAKE) -f makefile.msc clean
144         cd ..
145         cd gthread
146         $(MAKE) -f makefile.msc clean
147         cd ..
148         cd gobject
149         $(MAKE) -f makefile.msc clean
150         cd ..