Separated Win16 (USER) and Win32 (MPR) network routines.
[wine] / Makefile.in
1 # This Makefile understands the following targets:
2 #
3 # all (default):        build wine
4 # lib:                  build libwine
5 # clean:                remove all intermediate files
6 # distclean:            also remove all files created by configure
7 # install:              install everything
8 # uninstall:            uninstall everything
9 # depend:               create the dependencies
10 # etags:                create a TAGS file for Emacs.
11 # manpages:             compile manpages for Wine API
12 #
13
14 # Main target to build
15
16 MAIN_TARGET = @MAIN_TARGET@
17
18 # Directories
19
20 TOPSRCDIR = @top_srcdir@
21 TOPOBJDIR = .
22 SRCDIR    = @srcdir@
23 VPATH     = @srcdir@
24 MODULE    = none
25
26 TOOLSUBDIRS = \
27         tools \
28         tools/wrc
29
30 LIBSUBDIRS = \
31         controls \
32         console \
33         dlls/advapi32 \
34         dlls/avifil32 \
35         dlls/comctl32 \
36         dlls/commdlg \
37         dlls/crtdll \
38         dlls/dciman32 \
39         dlls/imagehlp \
40         dlls/imm32 \
41         dlls/lzexpand \
42         dlls/mpr \
43         dlls/msacm \
44         dlls/msacm32 \
45         dlls/msnet32 \
46         dlls/msvideo \
47         dlls/ntdll \
48         dlls/psapi \
49         dlls/rasapi32 \
50         dlls/shell32 \
51         dlls/sound \
52         dlls/stress \
53         dlls/tapi32 \
54         dlls/ver \
55         dlls/version \
56         dlls/win32s \
57         dlls/win87em \
58         dlls/winaspi \
59         dlls/windebug \
60         dlls/wing \
61         dlls/winspool \
62         dlls/wnaspi32 \
63         files \
64         graphics \
65         graphics/enhmetafiledrv \
66         graphics/metafiledrv \
67         graphics/psdrv \
68         graphics/ttydrv \
69         graphics/win16drv \
70         if1632 \
71         library \
72         loader \
73         loader/ne \
74         loader/dos \
75         memory \
76         misc \
77         msdos \
78         multimedia \
79         objects \
80         ole \
81         relay32 \
82         resources \
83         scheduler \
84         server \
85         win32 \
86         windows \
87         windows/ttydrv
88
89 X11SUBDIRS = \
90         graphics/x11drv \
91         tsx11 \
92         windows/x11drv
93
94 EMUSUBDIRS = \
95         debugger \
96         miscemu
97
98 PROGSUBDIRS = libtest programs
99
100 DOCSUBDIRS = documentation
101
102 INCSUBDIRS = include
103
104 # Sub-directories to run make into
105 BUILDSUBDIRS = \
106         $(TOOLSUBDIRS) \
107         $(LIBSUBDIRS) \
108         $(X11SUBDIRS) \
109         $(EMUSUBDIRS) \
110         $(PROGSUBDIRS) \
111         $(DOCSUBDIRS)
112
113 # Sub-directories to run make depend into
114 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
115
116 # Sub-directories to run make install into
117 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
118
119 # Sub-directories to run make lint into
120 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
121
122 LIBOBJS = \
123         controls/controls.o \
124         console/console.o \
125         dlls/advapi32/advapi32.o \
126         dlls/avifil32/avifil32.o \
127         dlls/comctl32/comctl32.o \
128         dlls/commdlg/commdlg.o \
129         dlls/crtdll/crtdll.o \
130         dlls/dciman32/dciman32.o \
131         dlls/imagehlp/imagehlp.o \
132         dlls/imm32/imm32.o \
133         dlls/lzexpand/lzexpand.o \
134         dlls/mpr/mpr.o \
135         dlls/msacm/msacm.o \
136         dlls/msacm32/msacm32.o \
137         dlls/msnet32/msnet32.o \
138         dlls/msvideo/msvideo.o \
139         dlls/ntdll/ntdll.o \
140         dlls/psapi/psapi.o \
141         dlls/rasapi32/rasapi32.o \
142         dlls/shell32/shell32.o \
143         dlls/sound/sound.o \
144         dlls/stress/stress.o \
145         dlls/tapi32/tapi32.o \
146         dlls/ver/ver.o \
147         dlls/version/version.o \
148         dlls/win32s/win32s.o \
149         dlls/win87em/win87em.o \
150         dlls/winaspi/winaspi.o \
151         dlls/windebug/windebug.o \
152         dlls/wing/wing.o \
153         dlls/winspool/winspool.o \
154         dlls/wnaspi32/wnaspi32.o \
155         files/files.o \
156         graphics/graphics.o \
157         graphics/enhmetafiledrv/enhmetafiledrv.o \
158         graphics/metafiledrv/metafiledrv.o \
159         graphics/psdrv/psdrv.o \
160         graphics/ttydrv/ttydrv.o \
161         graphics/win16drv/win16drv.o \
162         if1632/if1632.o \
163         loader/loader.o \
164         loader/ne/ne.o \
165         loader/dos/dos.o \
166         memory/memory.o \
167         misc/misc.o \
168         msdos/msdos.o \
169         multimedia/multimedia.o \
170         objects/objects.o \
171         ole/ole.o \
172         relay32/relay32.o \
173         resources/resources.o \
174         scheduler/scheduler.o \
175         server/server.o \
176         win32/win32.o \
177         windows/windows.o \
178         windows/ttydrv/ttydrv.o
179
180 X11OBJS = \
181         graphics/x11drv/x11drv.o \
182         tsx11/tsx11.o \
183         windows/x11drv/x11drv.o
184
185 EMUOBJS = \
186         debugger/debugger.o \
187         miscemu/miscemu.o
188
189 LIB_TARGET  = @LIB_TARGET@
190
191 ALT_LINK    = @ALT_LINK@
192
193 all: Makefile Make.rules $(MAIN_TARGET)
194         @echo "Wine build complete."
195
196 LIBLINTS = $(LIBOBJS:.o=.ln) 
197 X11LINTS = $(X11OBJS:.o=.ln)
198 EMULINTS = $(EMUOBJS:.o=.ln)
199
200 lint:: llib-lwine.ln $(EMULINTS)
201         $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
202
203 @MAKE_RULES@
204
205 Make.rules: Make.rules.in configure
206         @echo $? is newer than 'Make.rules', please rerun ./configure!
207         @exit 1
208
209 install:: install_$(MAIN_TARGET)
210
211 uninstall:: uninstall_$(MAIN_TARGET)
212
213 emu: wine
214
215 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
216
217 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS)
218         $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
219         nm -n wine | grep -v _compiled >wine.sym
220
221 libwine.a: $(LIBOBJS) $(X11OBJS)
222         $(RM) $@
223         $(AR) $@ $(LIBOBJS) $(X11OBJS)
224         $(RANLIB) $@
225
226 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
227         $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
228
229 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
230         $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
231         ln -sf $@ libwine.so
232
233 install_emu: install_lib
234         [ -d $(bindir) ] || $(MKDIR) $(bindir)
235         $(INSTALL_PROGRAM) wine $(bindir)/wine
236         $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
237
238 uninstall_emu: uninstall_lib
239         $(RM) $(bindir)/wine $(bindir)/dosmod
240
241 install_lib: dummy
242         [ -d $(libdir) ] || $(MKDIR) $(libdir)
243         if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
244         if [ $(LIB_TARGET) ]; then \
245             $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
246             if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
247         fi
248
249 uninstall_lib: dummy
250         cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
251
252 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
253         @cd `dirname $@`; $(SUBMAKE)
254
255 $(BUILDSUBDIRS): dummy
256         @cd $@; $(SUBMAKE)
257
258 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
259         @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
260
261
262 install_programs: dummy
263         @cd programs; $(SUBMAKE) install
264
265 uninstall_programs: dummy
266         @cd programs; $(SUBMAKE) uninstall
267
268 install::
269         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
270
271 uninstall::
272         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
273
274 depend:: dummy
275         for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
276
277 TAGS etags:
278         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
279
280 manpages:
281         -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
282         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
283
284 htmlpages:
285         -$(MKDIR) $(TOPOBJDIR)/documentation/html
286         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
287
288 clean::
289         for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
290         for i in include include/bitmaps include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
291         $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
292
293 distclean: clean
294         $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
295         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
296
297 # We depend on configure above for checks, so we better don't use this rule.
298 #configure: configure.in
299 #       autoconf
300
301 include/config.h.in: configure.in include/acconfig.h
302         autoheader -l include
303
304 ### Dependencies: