Free private structure in Xlib_DDS_Release.
[wine/multimedia.git] / Makefile.in
blob998bf5c7737b94189a873241ebc2ae6e5cfbf16b
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 debugger \
32 dlls/advapi32 \
33 dlls/crtdll \
34 dlls/display \
35 dlls/mouse \
36 dlls/ntdll \
37 files \
38 graphics \
39 graphics/enhmetafiledrv \
40 graphics/metafiledrv \
41 graphics/psdrv \
42 graphics/win16drv \
43 if1632 \
44 library \
45 loader \
46 loader/ne \
47 loader/dos \
48 memory \
49 misc \
50 msdos \
51 objects \
52 ole \
53 relay32 \
54 resources \
55 scheduler \
56 win32 \
57 windows
59 EMUSUBDIRS = \
60 miscemu \
61 server
63 PROGSUBDIRS = libtest programs
65 DOCSUBDIRS = documentation
67 INCSUBDIRS = include
69 PROGRAMS = \
70 loader/dos/dosmod \
71 server/wineserver \
72 windows/x11drv/wineclipsrv
74 # Sub-directories to run make into
75 SUBDIRS = \
76 $(TOOLSUBDIRS) \
77 $(LIBSUBDIRS) \
78 $(DLLDIR) \
79 $(EMUSUBDIRS) \
80 $(PROGSUBDIRS) \
81 $(DOCSUBDIRS) \
82 include
84 # Sub-directories to run make install into
85 INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
87 # Sub-directories to run make lint into
88 LINTSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
90 LIBOBJS = \
91 controls/controls.o \
92 console/console.o \
93 debugger/debugger.o \
94 dlls/advapi32/advapi32.o \
95 dlls/crtdll/crtdll.o \
96 dlls/display/display.o \
97 dlls/mouse/mouse.o \
98 dlls/ntdll/ntdll.o \
99 files/files.o \
100 graphics/graphics.o \
101 graphics/enhmetafiledrv/enhmetafiledrv.o \
102 graphics/metafiledrv/metafiledrv.o \
103 graphics/psdrv/psdrv.o \
104 graphics/win16drv/win16drv.o \
105 if1632/if1632.o \
106 loader/loader.o \
107 loader/ne/ne.o \
108 loader/dos/dos.o \
109 memory/memory.o \
110 misc/misc.o \
111 msdos/msdos.o \
112 objects/objects.o \
113 ole/ole.o \
114 relay32/relay32.o \
115 resources/resources.o \
116 scheduler/scheduler.o \
117 win32/win32.o \
118 windows/windows.o
120 EMUOBJS = \
121 miscemu/miscemu.o
123 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
125 EXTRA_OBJS = $(LIBOBJS)
127 EMU_TARGET = @EMU_TARGET@
129 all: Make.rules $(PROGRAMS) $(EMU_TARGET)
130 @echo "Wine build complete."
132 LIBLINTS = $(LIBOBJS:.o=.ln)
133 EMULINTS = $(EMUOBJS:.o=.ln)
135 lint:: llib-lwine.ln $(EMULINTS)
136 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
138 WINAPI_CHECK_EXTRA_FLAGS = --global
140 @MAKE_RULES@
142 all: lib$(MODULE).$(LIBEXT) $(DLLOBJS)
144 Make.rules: Make.rules.in configure
145 @echo $? is newer than 'Make.rules', please rerun ./configure!
146 @exit 1
148 wine wine.sym: lib$(MODULE).$(LIBEXT) $(DLLOBJS) $(EMUOBJS)
149 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
150 nm -n wine | grep -v _compiled >wine.sym
152 llib-lwine.ln : $(LIBLINTS)
153 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS)
155 install_so: lib$(MODULE).so.$(SOVERSION)
156 [ -d $(libdir) ] || $(MKDIR) $(libdir)
157 $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION)
158 cd $(libdir) && $(RM) lib$(MODULE).so && $(LN_S) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).so
160 install_a: lib$(MODULE).a
161 [ -d $(libdir) ] || $(MKDIR) $(libdir)
162 $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
164 install_wine: wine
165 [ -d $(bindir) ] || $(MKDIR) $(bindir)
166 [ -d $(libdir) ] || $(MKDIR) $(libdir)
167 [ -f wine.sym ] && $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
168 $(INSTALL_PROGRAM) wine $(bindir)/wine
170 install:: $(PROGRAMS) $(EMU_TARGET:%=install_%) $(LIBEXT:%=install_%)
171 [ -d $(bindir) ] || $(MKDIR) $(bindir)
172 $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
173 $(INSTALL_PROGRAM) windows/x11drv/wineclipsrv $(bindir)/wineclipsrv
174 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
176 uninstall::
177 cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION) wine.sym
178 cd $(bindir) && $(RM) wine wineserver wineclipsrv dosmod
180 lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in
181 $(LDSHARED) $(OBJS) -o $@
183 lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION)
184 $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
186 lib$(MODULE).a: $(OBJS) Makefile.in Make.rules.in
187 $(RM) $@
188 $(AR) $@ $(OBJS)
189 $(RANLIB) $@
191 checklink::
192 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS) && $(RM) checklink
194 $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS): $(TOOLSUBDIRS) dummy
195 @cd `dirname $@` && $(MAKE) `basename $@`
197 $(LIBLINTS) $(EMULINTS): dummy
198 @cd `dirname $@` && $(MAKE) lint
200 install_programs: dummy
201 @cd programs && $(MAKE) install
203 uninstall_programs: dummy
204 @cd programs && $(MAKE) uninstall
206 install::
207 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
208 -$(LDCONFIG)
210 uninstall::
211 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
213 checklink::
214 @cd dlls && $(MAKE) checklink
216 TAGS etags:
217 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
219 manpages:
220 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
221 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
223 htmlpages:
224 -$(MKDIR) $(TOPOBJDIR)/documentation/html
225 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
227 clean::
228 $(RM) wine wine.sym libwine.so.1.0 TAGS
230 distclean: clean
231 $(RM) config.* Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man
232 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
234 # We depend on configure above for checks, so we better don't use this rule.
235 #configure: configure.in
236 # autoconf
238 include/config.h.in: configure.in include/acconfig.h
239 autoheader -l include
241 ### Dependencies: