Updated FAQ location.
[wine.git] / Makefile.in
blob1b73494e944a2d6dac611a0cbf51c8c4171e69ea
1 # This Makefile understands the following targets:
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
14 # Main target to build
16 MAIN_TARGET = @MAIN_TARGET@
18 # Directories
20 TOPSRCDIR = @top_srcdir@
21 TOPOBJDIR = .
22 SRCDIR = @srcdir@
23 VPATH = @srcdir@
24 MODULE = none
26 LIBSUBDIRS = \
27 tools \
28 tools/wrc \
29 controls \
30 dlls/comctl32 \
31 dlls/imagehlp \
32 dlls/msacm \
33 dlls/msacm32 \
34 dlls/ntdll \
35 dlls/psapi \
36 dlls/shell32 \
37 dlls/winaspi \
38 dlls/wnaspi32 \
39 files \
40 graphics \
41 graphics/metafiledrv \
42 graphics/x11drv \
43 ipc \
44 library \
45 loader \
46 loader/ne \
47 loader/dos \
48 memory \
49 misc \
50 msdos \
51 multimedia \
52 objects \
53 ole \
54 relay32 \
55 resources \
56 scheduler \
57 server \
58 tsx11 \
59 win32 \
60 windows
62 EMUSUBDIRS = \
63 debugger \
64 graphics/psdrv \
65 graphics/win16drv \
66 if1632 \
67 miscemu
69 PROGSUBDIRS = libtest programs
71 DOCSUBDIRS = documentation
73 # All sub-directories
74 ALLSUBDIRS = \
75 $(LIBSUBDIRS) \
76 $(EMUSUBDIRS) \
77 $(PROGSUBDIRS) \
78 $(DOCSUBDIRS)
80 # Sub-directories to run make depend into
81 DEPENDSUBDIRS = $(LIBSUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
83 # Sub-directories to run make install into
84 INSTALLSUBDIRS = $(DOCSUBDIRS)
86 LIBOBJS = \
87 controls/controls.o \
88 dlls/comctl32/comctl32.o \
89 dlls/imagehlp/imagehlp.o \
90 dlls/msacm/msacm.o \
91 dlls/msacm32/msacm32.o \
92 dlls/ntdll/ntdll.o \
93 dlls/psapi/psapi.o \
94 dlls/shell32/shell32.o \
95 dlls/winaspi/winaspi.o \
96 dlls/wnaspi32/wnaspi32.o \
97 files/files.o \
98 graphics/graphics.o \
99 graphics/metafiledrv/metafiledrv.o \
100 graphics/x11drv/x11drv.o \
101 ipc/ipc.o \
102 loader/loader.o \
103 loader/ne/ne.o \
104 loader/dos/dos.o \
105 memory/memory.o \
106 misc/misc.o \
107 msdos/msdos.o \
108 multimedia/multimedia.o \
109 objects/objects.o \
110 ole/ole.o \
111 relay32/relay32.o \
112 resources/resources.o \
113 scheduler/scheduler.o \
114 server/server.o \
115 tsx11/tsx11.o \
116 win32/win32.o \
117 windows/windows.o
119 EMUOBJS = \
120 debugger/debugger.o \
121 graphics/psdrv/psdrv.o \
122 graphics/win16drv/win16drv.o \
123 if1632/if1632.o \
124 miscemu/miscemu.o
126 LIB_TARGET = @LIB_TARGET@
128 ALT_LINK = @ALT_LINK@
130 all: $(MAIN_TARGET)
132 @MAKE_RULES@
134 install:: install_$(MAIN_TARGET)
136 uninstall:: uninstall_$(MAIN_TARGET)
138 emu: wine
140 lib: $(LIBSUBDIRS) $(LIB_TARGET)
142 wine wine.sym: $(LIBSUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
143 $(CC) -o wine $(EMUOBJS) $(LIB_TARGET) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
144 nm -n wine | grep -v _compiled >wine.sym
146 libwine.a: $(LIBOBJS)
147 $(RM) $@
148 $(AR) $@ $(LIBOBJS)
149 $(RANLIB) $@
151 libwine.so.1.0: $(LIBOBJS)
152 $(CC) -shared -Wl,-soname,libwine.so -o$@ $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
154 install_emu: install_lib
155 [ -d $(bindir) ] || $(MKDIR) $(bindir)
156 $(INSTALL_PROGRAM) wine $(bindir)/wine
157 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
159 uninstall_emu: uninstall_lib
160 $(RM) $(bindir)/wine $(bindir)/dosmod
162 install_lib: install_includes
163 [ -d $(libdir) ] || $(MKDIR) $(libdir)
164 if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
165 $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
167 uninstall_lib: uninstall_includes
168 cd $(libdir); $(RM) $(LIB_TARGET)
169 $(RM) $(libdir)/wine.sym
171 install_includes: dummy
172 [ -d $(includedir) ] || $(MKDIR) $(includedir)
173 cd $(TOPSRCDIR)/include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
175 # Don't just do a rm -rf on $(includedir) -- don't want to wipe out
176 # anything extra the user may have put there.
177 uninstall_includes: dummy
178 $(RM) $(includedir)/windows.h $(includedir)/wintypes.h
179 -rmdir $(includedir)
181 $(ALLSUBDIRS): dummy
182 @cd $@; $(SUBMAKE)
184 install_programs: dummy
185 @cd programs; $(SUBMAKE) install
187 uninstall_programs: dummy
188 @cd programs; $(SUBMAKE) uninstall
190 install::
191 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
193 uninstall::
194 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
196 depend:: dummy
197 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
199 TAGS etags:
200 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
202 manpages:
203 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
204 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
206 htmlpages:
207 -$(MKDIR) $(TOPOBJDIR)/documentation/html
208 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
210 clean::
211 for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
212 for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
213 $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS .#*
215 distclean: clean
216 $(RM) config.* Make.rules include/config.h
217 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
219 configure: configure.in
220 autoconf
222 include/config.h.in: configure.in include/acconfig.h
223 autoheader -l include
225 ### Dependencies: