Added FIXME comment for entry point parameter.
[wine] / Makefile.in
1 # This Makefile understands the following targets:
2 #
3 # all (default):        build wine
4 # clean:                remove all intermediate files
5 # distclean:            also remove all files created by configure
6 # install:              install everything
7 # uninstall:            uninstall everything
8 # depend:               create the dependencies
9 # etags:                create a TAGS file for Emacs.
10 # manpages:             compile manpages for Wine API
11 #
12
13 # Directories
14
15 TOPSRCDIR = @top_srcdir@
16 TOPOBJDIR = .
17 SRCDIR    = @srcdir@
18 VPATH     = @srcdir@
19 LIBEXT    = @LIBEXT@
20 MODULE    = wine
21 SOVERSION = 1.0
22
23 TOOLSUBDIRS = \
24         tools \
25         tools/wrc
26
27 LIBSUBDIRS = \
28         controls \
29         console \
30         debugger \
31         dlls/advapi32 \
32         dlls/crtdll \
33         dlls/display \
34         dlls/mouse \
35         dlls/mpr \
36         dlls/ntdll \
37         dlls/winaspi \
38         dlls/winmm \
39         files \
40         graphics \
41         graphics/enhmetafiledrv \
42         graphics/metafiledrv \
43         graphics/psdrv \
44         graphics/ttydrv \
45         graphics/win16drv \
46         if1632 \
47         library \
48         loader \
49         loader/ne \
50         loader/dos \
51         memory \
52         misc \
53         msdos \
54         objects \
55         ole \
56         relay32 \
57         resources \
58         scheduler \
59         win32 \
60         windows \
61         windows/ttydrv
62
63 X11SUBDIRS = \
64         graphics/x11drv \
65         tsx11 \
66         windows/x11drv
67
68 EMUSUBDIRS = \
69         miscemu \
70         server
71
72 PROGSUBDIRS = libtest programs
73
74 DOCSUBDIRS = documentation
75
76 INCSUBDIRS = include
77
78 PROGRAMS = \
79         loader/dos/dosmod \
80         server/wineserver \
81         windows/x11drv/wineclipsrv
82
83 # Sub-directories to run make into
84 BUILDSUBDIRS = \
85         $(TOOLSUBDIRS) \
86         $(LIBSUBDIRS) \
87         $(X11SUBDIRS) \
88         $(DLLDIR) \
89         $(EMUSUBDIRS) \
90         $(PROGSUBDIRS) \
91         $(DOCSUBDIRS)
92
93 # Sub-directories to run make depend into
94 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
95
96 # Sub-directories to run make install into
97 INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
98
99 # Sub-directories to run make lint into
100 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
101
102 # Extra sub-directories to clean
103 CLEANSUBDIRS = dlls include include/bitmaps include/wine
104
105 LIBOBJS = \
106         controls/controls.o \
107         console/console.o \
108         debugger/debugger.o \
109         dlls/advapi32/advapi32.o \
110         dlls/crtdll/crtdll.o \
111         dlls/display/display.o \
112         dlls/mouse/mouse.o \
113         dlls/mpr/mpr.o \
114         dlls/ntdll/ntdll.o \
115         dlls/winaspi/winaspi.o \
116         dlls/winmm/winmm.o \
117         files/files.o \
118         graphics/graphics.o \
119         graphics/enhmetafiledrv/enhmetafiledrv.o \
120         graphics/metafiledrv/metafiledrv.o \
121         graphics/psdrv/psdrv.o \
122         graphics/ttydrv/ttydrv.o \
123         graphics/win16drv/win16drv.o \
124         if1632/if1632.o \
125         loader/loader.o \
126         loader/ne/ne.o \
127         loader/dos/dos.o \
128         memory/memory.o \
129         misc/misc.o \
130         msdos/msdos.o \
131         objects/objects.o \
132         ole/ole.o \
133         relay32/relay32.o \
134         resources/resources.o \
135         scheduler/scheduler.o \
136         win32/win32.o \
137         windows/windows.o \
138         windows/ttydrv/ttydrv.o
139
140 X11OBJS = \
141         graphics/x11drv/x11drv.o \
142         tsx11/tsx11.o \
143         windows/x11drv/x11drv.o
144
145 EMUOBJS = \
146         miscemu/miscemu.o
147
148 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
149
150 EXTRA_OBJS = $(LIBOBJS) $(X11OBJS)
151
152 EMU_TARGET = @EMU_TARGET@
153
154 all: Make.rules $(PROGRAMS) $(EMU_TARGET)
155         @echo "Wine build complete."
156
157 LIBLINTS = $(LIBOBJS:.o=.ln) 
158 X11LINTS = $(X11OBJS:.o=.ln)
159 EMULINTS = $(EMUOBJS:.o=.ln)
160
161 lint:: llib-lwine.ln $(EMULINTS)
162         $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
163
164 WINAPI_CHECK_EXTRA_FLAGS = --global
165
166 @MAKE_RULES@
167
168 all: lib$(MODULE).$(LIBEXT) $(DLLOBJS)
169
170 Make.rules: Make.rules.in configure
171         @echo $? is newer than 'Make.rules', please rerun ./configure!
172         @exit 1
173
174 wine wine.sym: lib$(MODULE).$(LIBEXT) $(DLLOBJS) $(EMUOBJS)
175         $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
176         nm -n wine | grep -v _compiled >wine.sym
177
178 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
179         $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
180
181 install_wine: wine
182         [ -d $(bindir) ] || $(MKDIR) $(bindir)
183         [ -d $(libdir) ] || $(MKDIR) $(libdir)
184         [ -f wine.sym ] && $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
185         $(INSTALL_PROGRAM) wine $(bindir)/wine
186
187 install:: $(PROGRAMS) $(EMU_TARGET:%=install_%)
188         [ -d $(bindir) ] || $(MKDIR) $(bindir)
189         $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
190         $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
191         $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
192
193 uninstall::
194         cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION) wine.sym
195         cd $(bindir) && $(RM) wine wineserver wineclipsrv dosmod
196
197 $(X11OBJS) $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS): $(TOOLSUBDIRS) dummy
198         @cd `dirname $@` && $(MAKE) `basename $@`
199
200 $(BUILDSUBDIRS): dummy
201         @cd $@ && $(MAKE)
202
203 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
204         @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
205
206 install_programs: dummy
207         @cd programs && $(MAKE) install
208
209 uninstall_programs: dummy
210         @cd programs && $(MAKE) uninstall
211
212 install::
213         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
214         -$(LDCONFIG)
215
216 uninstall::
217         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
218
219 depend::
220         for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
221
222 checklink::
223         @cd dlls && $(MAKE) checklink
224
225 TAGS etags:
226         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
227
228 manpages:
229         -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
230         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
231
232 htmlpages:
233         -$(MKDIR) $(TOPOBJDIR)/documentation/html
234         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
235
236 clean::
237         for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
238         for i in $(CLEANSUBDIRS); do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
239         $(RM) wine wine.sym libwine.so.1.0 TAGS .#*
240
241 distclean: clean
242         $(RM) config.* Make.rules include/config.h documentation/wine.man documentation/wine.conf.man
243         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
244
245 # We depend on configure above for checks, so we better don't use this rule.
246 #configure: configure.in
247 #       autoconf
248
249 include/config.h.in: configure.in include/acconfig.h
250         autoheader -l include
251
252 ### Dependencies: