Rewrote command-line parsing of CreateProcessA to be more compatible.
[wine/multimedia.git] / Makefile.in
blobef9332f86074d84388abbdf3bdfe509a0ff4e8ee
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 = tools
28 LIBSUBDIRS = \
29 controls \
30 console \
31 dlls/advapi32 \
32 dlls/crtdll \
33 dlls/display \
34 dlls/mouse \
35 dlls/ntdll \
36 files \
37 graphics \
38 graphics/enhmetafiledrv \
39 graphics/metafiledrv \
40 graphics/psdrv \
41 graphics/win16drv \
42 if1632 \
43 library \
44 loader \
45 loader/ne \
46 loader/dos \
47 memory \
48 misc \
49 msdos \
50 objects \
51 ole \
52 relay32 \
53 resources \
54 scheduler \
55 win32 \
56 windows
58 EMUSUBDIRS = \
59 miscemu \
60 server
62 PROGSUBDIRS = \
63 debugger \
64 libtest \
65 programs
67 DOCSUBDIRS = documentation
69 INCSUBDIRS = include
71 # Stand-alone programs
72 PROGRAMS = \
73 loader/dos/dosmod \
74 server/wineserver \
75 windows/x11drv/wineclipsrv
77 # Programs that link with libwine
78 LIBPROGRAMS = \
79 debugger/winedbg
81 # Sub-directories to run make into
82 SUBDIRS = \
83 $(TOOLSUBDIRS) \
84 $(LIBSUBDIRS) \
85 $(DLLDIR) \
86 $(EMUSUBDIRS) \
87 $(PROGSUBDIRS) \
88 $(DOCSUBDIRS) \
89 include
91 # Sub-directories to run make install into
92 INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
94 # Sub-directories to run make lint into
95 LINTSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
97 LIBOBJS = \
98 controls/controls.o \
99 console/console.o \
100 dlls/advapi32/advapi32.o \
101 dlls/crtdll/crtdll.o \
102 dlls/display/display.o \
103 dlls/mouse/mouse.o \
104 dlls/ntdll/ntdll.o \
105 files/files.o \
106 graphics/graphics.o \
107 graphics/enhmetafiledrv/enhmetafiledrv.o \
108 graphics/metafiledrv/metafiledrv.o \
109 graphics/psdrv/psdrv.o \
110 graphics/win16drv/win16drv.o \
111 if1632/if1632.o \
112 loader/loader.o \
113 loader/ne/ne.o \
114 loader/dos/dos.o \
115 memory/memory.o \
116 misc/misc.o \
117 msdos/msdos.o \
118 objects/objects.o \
119 ole/ole.o \
120 relay32/relay32.o \
121 resources/resources.o \
122 scheduler/scheduler.o \
123 win32/win32.o \
124 windows/windows.o
126 EMUOBJS = \
127 miscemu/miscemu.o
129 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
131 EXTRA_OBJS = $(LIBOBJS)
133 EMU_TARGET = @EMU_TARGET@
135 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) $(EMU_TARGET)
136 @echo "Wine build complete."
138 LIBLINTS = $(LIBOBJS:.o=.ln)
139 EMULINTS = $(EMUOBJS:.o=.ln)
141 lint:: llib-lwine.ln $(EMULINTS)
142 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
144 WINAPI_CHECK_EXTRA_FLAGS = --global
146 @MAKE_RULES@
148 all: lib$(MODULE).$(LIBEXT) $(DLLOBJS)
150 Make.rules: Make.rules.in configure
151 @echo $? is newer than 'Make.rules', please rerun ./configure!
152 @exit 1
154 wine wine.sym: lib$(MODULE).$(LIBEXT) $(DLLOBJS) $(EMUOBJS)
155 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
156 nm -n wine | grep -v _compiled >wine.sym
158 llib-lwine.ln : $(LIBLINTS)
159 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS)
161 install_so: lib$(MODULE).so.$(SOVERSION)
162 [ -d $(libdir) ] || $(MKDIR) $(libdir)
163 $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION)
164 cd $(libdir) && $(RM) lib$(MODULE).so && $(LN_S) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).so
166 install_a: lib$(MODULE).a
167 [ -d $(libdir) ] || $(MKDIR) $(libdir)
168 $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
170 install_wine: wine
171 [ -d $(bindir) ] || $(MKDIR) $(bindir)
172 [ -d $(libdir) ] || $(MKDIR) $(libdir)
173 [ -f wine.sym ] && $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
174 $(INSTALL_PROGRAM) wine $(bindir)/wine
176 install:: $(PROGRAMS) $(LIBPROGRAMS) $(EMU_TARGET:%=install_%) $(LIBEXT:%=install_%)
177 [ -d $(bindir) ] || $(MKDIR) $(bindir)
178 $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
179 $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
180 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
181 $(INSTALL_PROGRAM) debugger/winedbg $(bindir)/winedbg
183 uninstall::
184 cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION) wine.sym
185 cd $(bindir) && $(RM) wine wineserver wineclipsrv dosmod winedbg
187 lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in
188 $(LDSHARED) $(OBJS) -o $@
190 lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION)
191 $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
193 lib$(MODULE).a: $(OBJS) Makefile.in Make.rules.in
194 $(RM) $@
195 $(AR) $@ $(OBJS)
196 $(RANLIB) $@
198 checklink::
199 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) && $(RM) checklink
201 $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS): $(TOOLSUBDIRS) dummy
202 @cd `dirname $@` && $(MAKE) `basename $@`
204 $(LIBPROGRAMS): lib$(MODULE).$(LIBEXT) $(DLLOBJS)
206 $(LIBLINTS) $(EMULINTS): dummy
207 @cd `dirname $@` && $(MAKE) lint
209 install_programs: dummy
210 @cd programs && $(MAKE) install
212 uninstall_programs: dummy
213 @cd programs && $(MAKE) uninstall
215 install::
216 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
217 -$(LDCONFIG)
219 uninstall::
220 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
222 checklink::
223 @cd dlls && $(MAKE) checklink
225 TAGS etags:
226 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
228 manpages:
229 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
230 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
232 htmlpages:
233 -$(MKDIR) $(TOPOBJDIR)/documentation/html
234 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
236 clean::
237 $(RM) wine wine.sym libwine.so.1.0 TAGS
239 distclean: clean
240 $(RM) config.* Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man
241 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
243 # We depend on configure above for checks, so we better don't use this rule.
244 #configure: configure.in
245 # autoconf
247 include/config.h.in: configure.in include/acconfig.h
248 autoheader -l include
250 ### Dependencies: