Moved dll-specific make rules to a separate Makedll.rules file.
[wine.git] / Makefile.in
blob3eef1b49fd4b80faa1840756659d0f3a59833961
1 # This Makefile understands the following targets:
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
13 # Directories
15 TOPSRCDIR = @top_srcdir@
16 TOPOBJDIR = .
17 SRCDIR = @srcdir@
18 VPATH = @srcdir@
19 LIBEXT = @LIBEXT@
20 LDSHARED = @LDSHARED@
21 LDCONFIG = @LDCONFIG@
22 MODULE = wine
23 SOVERSION = 1.0
24 SONAME = libwine.so
26 TOOLSUBDIRS = \
27 tools \
28 tools/wrc
30 LIBSUBDIRS = \
31 controls \
32 console \
33 debugger \
34 dlls/advapi32 \
35 dlls/crtdll \
36 dlls/display \
37 dlls/mouse \
38 dlls/mpr \
39 dlls/ntdll \
40 dlls/winaspi \
41 files \
42 graphics \
43 graphics/enhmetafiledrv \
44 graphics/metafiledrv \
45 graphics/psdrv \
46 graphics/ttydrv \
47 graphics/win16drv \
48 if1632 \
49 library \
50 loader \
51 loader/ne \
52 loader/dos \
53 memory \
54 misc \
55 msdos \
56 objects \
57 ole \
58 relay32 \
59 resources \
60 scheduler \
61 win32 \
62 windows \
63 windows/ttydrv
65 X11SUBDIRS = \
66 graphics/x11drv \
67 tsx11 \
68 windows/x11drv
70 EMUSUBDIRS = \
71 miscemu \
72 server
74 PROGSUBDIRS = libtest programs
76 DOCSUBDIRS = documentation
78 INCSUBDIRS = include
80 PROGRAMS = \
81 loader/dos/dosmod \
82 server/wineserver \
83 windows/x11drv/wineclipsrv
85 # Sub-directories to run make into
86 BUILDSUBDIRS = \
87 $(TOOLSUBDIRS) \
88 $(LIBSUBDIRS) \
89 $(X11SUBDIRS) \
90 $(DLLDIR) \
91 $(EMUSUBDIRS) \
92 $(PROGSUBDIRS) \
93 $(DOCSUBDIRS)
95 # Sub-directories to run make depend into
96 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
98 # Sub-directories to run make install into
99 INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
101 # Sub-directories to run make lint into
102 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
104 # Extra sub-directories to clean
105 CLEANSUBDIRS = dlls include include/bitmaps include/wine
107 LIBOBJS = \
108 controls/controls.o \
109 console/console.o \
110 debugger/debugger.o \
111 dlls/advapi32/advapi32.o \
112 dlls/crtdll/crtdll.o \
113 dlls/display/display.o \
114 dlls/mouse/mouse.o \
115 dlls/mpr/mpr.o \
116 dlls/ntdll/ntdll.o \
117 dlls/winaspi/winaspi.o \
118 files/files.o \
119 graphics/graphics.o \
120 graphics/enhmetafiledrv/enhmetafiledrv.o \
121 graphics/metafiledrv/metafiledrv.o \
122 graphics/psdrv/psdrv.o \
123 graphics/ttydrv/ttydrv.o \
124 graphics/win16drv/win16drv.o \
125 if1632/if1632.o \
126 loader/loader.o \
127 loader/ne/ne.o \
128 loader/dos/dos.o \
129 memory/memory.o \
130 misc/misc.o \
131 msdos/msdos.o \
132 objects/objects.o \
133 ole/ole.o \
134 relay32/relay32.o \
135 resources/resources.o \
136 scheduler/scheduler.o \
137 win32/win32.o \
138 windows/windows.o \
139 windows/ttydrv/ttydrv.o
141 X11OBJS = \
142 graphics/x11drv/x11drv.o \
143 tsx11/tsx11.o \
144 windows/x11drv/x11drv.o
146 EMUOBJS = \
147 miscemu/miscemu.o
149 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
151 EXTRA_OBJS = $(LIBOBJS) $(X11OBJS)
153 EMU_TARGET = @EMU_TARGET@
155 all: Make.rules $(PROGRAMS) $(EMU_TARGET)
156 @echo "Wine build complete."
158 LIBLINTS = $(LIBOBJS:.o=.ln)
159 X11LINTS = $(X11OBJS:.o=.ln)
160 EMULINTS = $(EMUOBJS:.o=.ln)
162 lint:: llib-lwine.ln $(EMULINTS)
163 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
165 WINAPI_CHECK_EXTRA_FLAGS = --global
167 @MAKE_RULES@
169 all: lib$(MODULE).$(LIBEXT) $(DLLOBJS)
171 Make.rules: Make.rules.in configure
172 @echo $? is newer than 'Make.rules', please rerun ./configure!
173 @exit 1
175 wine wine.sym: lib$(MODULE).$(LIBEXT) $(DLLOBJS) $(EMUOBJS)
176 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
177 nm -n wine | grep -v _compiled >wine.sym
179 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
180 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
182 install_so: lib$(MODULE).so.$(SOVERSION)
183 [ -d $(libdir) ] || $(MKDIR) $(libdir)
184 $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION)
185 cd $(libdir) && $(RM) lib$(MODULE).so && $(LN_S) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).so
187 install_a: lib$(MODULE).a
188 [ -d $(libdir) ] || $(MKDIR) $(libdir)
189 $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
191 install_wine: wine
192 [ -d $(bindir) ] || $(MKDIR) $(bindir)
193 [ -d $(libdir) ] || $(MKDIR) $(libdir)
194 [ -f wine.sym ] && $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
195 $(INSTALL_PROGRAM) wine $(bindir)/wine
197 install:: $(PROGRAMS) $(EMU_TARGET:%=install_%) $(LIBEXT:%=install_%)
198 [ -d $(bindir) ] || $(MKDIR) $(bindir)
199 $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
200 $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
201 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
203 uninstall::
204 cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION) wine.sym
205 cd $(bindir) && $(RM) wine wineserver wineclipsrv dosmod
207 lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in
208 $(LDSHARED) $(OBJS) -o $@
210 lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION)
211 $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
213 lib$(MODULE).a: $(OBJS) Makefile.in Make.rules.in
214 $(RM) $@
215 $(AR) $@ $(OBJS)
216 $(RANLIB) $@
218 checklink::
219 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) && $(RM) checklink
221 $(X11OBJS) $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS): $(TOOLSUBDIRS) dummy
222 @cd `dirname $@` && $(MAKE) `basename $@`
224 $(BUILDSUBDIRS): dummy
225 @cd $@ && $(MAKE)
227 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
228 @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
230 install_programs: dummy
231 @cd programs && $(MAKE) install
233 uninstall_programs: dummy
234 @cd programs && $(MAKE) uninstall
236 install::
237 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
238 -$(LDCONFIG)
240 uninstall::
241 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
243 depend::
244 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
246 checklink::
247 @cd dlls && $(MAKE) checklink
249 TAGS etags:
250 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
252 manpages:
253 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
254 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
256 htmlpages:
257 -$(MKDIR) $(TOPOBJDIR)/documentation/html
258 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
260 clean::
261 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
262 for i in $(CLEANSUBDIRS); do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
263 $(RM) wine wine.sym libwine.so.1.0 TAGS .#*
265 distclean: clean
266 $(RM) config.* Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man
267 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
269 # We depend on configure above for checks, so we better don't use this rule.
270 #configure: configure.in
271 # autoconf
273 include/config.h.in: configure.in include/acconfig.h
274 autoheader -l include
276 ### Dependencies: