Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
[wine/multimedia.git] / Makefile.in
blob5b41d4fc33b4ec1412ed31382a57cb2e2ccd011c
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 console \
31 dlls/advapi32 \
32 dlls/avifil32 \
33 dlls/comctl32 \
34 dlls/commdlg \
35 dlls/imagehlp \
36 dlls/msacm \
37 dlls/msacm32 \
38 dlls/ntdll \
39 dlls/psapi \
40 dlls/rasapi32 \
41 dlls/shell32 \
42 dlls/tapi32 \
43 dlls/ver \
44 dlls/version \
45 dlls/winaspi \
46 dlls/winspool \
47 dlls/wnaspi32 \
48 files \
49 graphics \
50 graphics/enhmetafiledrv \
51 graphics/metafiledrv \
52 graphics/psdrv \
53 graphics/ttydrv \
54 ipc \
55 library \
56 loader \
57 loader/ne \
58 loader/dos \
59 memory \
60 misc \
61 msdos \
62 multimedia \
63 objects \
64 ole \
65 relay32 \
66 resources \
67 scheduler \
68 server \
69 win32 \
70 windows \
71 windows/ttydrv
73 X11SUBDIRS = \
74 graphics/x11drv \
75 tsx11 \
76 windows/x11drv
78 EMUSUBDIRS = \
79 debugger \
80 graphics/win16drv \
81 if1632 \
82 miscemu
84 PROGSUBDIRS = libtest programs
86 DOCSUBDIRS = documentation
88 INCSUBDIRS = include
90 # Sub-directories to run make into
91 BUILDSUBDIRS = \
92 $(LIBSUBDIRS) \
93 $(X11SUBDIRS) \
94 $(EMUSUBDIRS) \
95 $(PROGSUBDIRS) \
96 $(DOCSUBDIRS)
98 # Sub-directories to run make depend into
99 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
101 # Sub-directories to run make install into
102 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
104 LIBOBJS = \
105 controls/controls.o \
106 console/console.o \
107 dlls/advapi32/advapi32.o \
108 dlls/avifil32/avifil32.o \
109 dlls/comctl32/comctl32.o \
110 dlls/commdlg/commdlg.o \
111 dlls/imagehlp/imagehlp.o \
112 dlls/msacm/msacm.o \
113 dlls/msacm32/msacm32.o \
114 dlls/ntdll/ntdll.o \
115 dlls/psapi/psapi.o \
116 dlls/rasapi32/rasapi32.o \
117 dlls/shell32/shell32.o \
118 dlls/tapi32/tapi32.o \
119 dlls/ver/ver.o \
120 dlls/version/version.o \
121 dlls/winaspi/winaspi.o \
122 dlls/winspool/winspool.o \
123 dlls/wnaspi32/wnaspi32.o \
124 files/files.o \
125 graphics/graphics.o \
126 graphics/enhmetafiledrv/enhmetafiledrv.o \
127 graphics/metafiledrv/metafiledrv.o \
128 graphics/psdrv/psdrv.o \
129 graphics/ttydrv/ttydrv.o \
130 ipc/ipc.o \
131 loader/loader.o \
132 loader/ne/ne.o \
133 loader/dos/dos.o \
134 memory/memory.o \
135 misc/misc.o \
136 msdos/msdos.o \
137 multimedia/multimedia.o \
138 objects/objects.o \
139 ole/ole.o \
140 relay32/relay32.o \
141 resources/resources.o \
142 scheduler/scheduler.o \
143 server/server.o \
144 win32/win32.o \
145 windows/windows.o \
146 windows/ttydrv/ttydrv.o
148 X11OBJS = \
149 graphics/x11drv/x11drv.o \
150 tsx11/tsx11.o \
151 windows/x11drv/x11drv.o
153 EMUOBJS = \
154 debugger/debugger.o \
155 graphics/win16drv/win16drv.o \
156 if1632/if1632.o \
157 miscemu/miscemu.o
159 LIB_TARGET = @LIB_TARGET@
161 ALT_LINK = @ALT_LINK@
163 all: Makefile Make.rules $(MAIN_TARGET)
165 @MAKE_RULES@
167 Make.rules: Make.rules.in configure
168 @echo $? is newer than 'Make.rules', please rerun ./configure!
169 @exit 1
171 install:: install_$(MAIN_TARGET)
173 uninstall:: uninstall_$(MAIN_TARGET)
175 emu: wine
177 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
179 wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
180 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
181 nm -n wine | grep -v _compiled >wine.sym
182 @echo "Wine build complete."
184 libwine.a: $(LIBOBJS) $(X11OBJS)
185 $(RM) $@
186 $(AR) $@ $(LIBOBJS) $(X11OBJS)
187 $(RANLIB) $@
189 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
190 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
191 ln -sf $@ libwine.so
193 install_emu: install_lib
194 [ -d $(bindir) ] || $(MKDIR) $(bindir)
195 $(INSTALL_PROGRAM) wine $(bindir)/wine
196 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
198 uninstall_emu: uninstall_lib
199 $(RM) $(bindir)/wine $(bindir)/dosmod
201 install_lib: dummy
202 [ -d $(libdir) ] || $(MKDIR) $(libdir)
203 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
204 if [ $(LIB_TARGET) ]; then \
205 $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
206 if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
209 uninstall_lib: dummy
210 cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
212 $(BUILDSUBDIRS): dummy
213 @cd $@; $(SUBMAKE)
215 install_programs: dummy
216 @cd programs; $(SUBMAKE) install
218 uninstall_programs: dummy
219 @cd programs; $(SUBMAKE) uninstall
221 install::
222 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
224 uninstall::
225 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
227 depend:: dummy
228 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
230 TAGS etags:
231 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
233 manpages:
234 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
235 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
237 htmlpages:
238 -$(MKDIR) $(TOPOBJDIR)/documentation/html
239 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
241 clean::
242 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
243 for i in include include/bitmaps include/server include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
244 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
246 distclean: clean
247 $(RM) config.* Make.rules include/config.h documentation/wine.man
248 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
250 # We depend on configure above for checks, so we better don't use this rule.
251 #configure: configure.in
252 # autoconf
254 include/config.h.in: configure.in include/acconfig.h
255 autoheader -l include
257 ### Dependencies: