Added device type constants and used them in device enumeration
[wine.git] / Makefile.in
blob47a2dd95fabd6f16e33e1f6dcebccb22306dd50b
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 ipc \
43 library \
44 loader \
45 loader/ne \
46 loader/dos \
47 memory \
48 misc \
49 msdos \
50 multimedia \
51 objects \
52 ole \
53 relay32 \
54 resources \
55 scheduler \
56 server \
57 win32 \
58 windows
60 X11SUBDIRS = \
61 graphics/x11drv \
62 tsx11 \
63 windows/x11drv
65 EMUSUBDIRS = \
66 debugger \
67 graphics/psdrv \
68 graphics/win16drv \
69 if1632 \
70 miscemu
72 PROGSUBDIRS = libtest programs
74 DOCSUBDIRS = documentation
76 # All sub-directories
77 ALLSUBDIRS = \
78 $(LIBSUBDIRS) \
79 $(X11SUBDIRS) \
80 $(EMUSUBDIRS) \
81 $(PROGSUBDIRS) \
82 $(DOCSUBDIRS)
84 # Sub-directories to run make depend into
85 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
87 # Sub-directories to run make install into
88 INSTALLSUBDIRS = $(DOCSUBDIRS)
90 LIBOBJS = \
91 controls/controls.o \
92 dlls/comctl32/comctl32.o \
93 dlls/imagehlp/imagehlp.o \
94 dlls/msacm/msacm.o \
95 dlls/msacm32/msacm32.o \
96 dlls/ntdll/ntdll.o \
97 dlls/psapi/psapi.o \
98 dlls/shell32/shell32.o \
99 dlls/winaspi/winaspi.o \
100 dlls/wnaspi32/wnaspi32.o \
101 files/files.o \
102 graphics/graphics.o \
103 graphics/metafiledrv/metafiledrv.o \
104 ipc/ipc.o \
105 loader/loader.o \
106 loader/ne/ne.o \
107 loader/dos/dos.o \
108 memory/memory.o \
109 misc/misc.o \
110 msdos/msdos.o \
111 multimedia/multimedia.o \
112 objects/objects.o \
113 ole/ole.o \
114 relay32/relay32.o \
115 resources/resources.o \
116 scheduler/scheduler.o \
117 server/server.o \
118 win32/win32.o \
119 windows/windows.o
121 X11OBJS = \
122 graphics/x11drv/x11drv.o \
123 tsx11/tsx11.o \
124 windows/x11drv/x11drv.o
126 EMUOBJS = \
127 debugger/debugger.o \
128 graphics/psdrv/psdrv.o \
129 graphics/win16drv/win16drv.o \
130 if1632/if1632.o \
131 miscemu/miscemu.o
133 LIB_TARGET = @LIB_TARGET@
135 ALT_LINK = @ALT_LINK@
137 all: $(MAIN_TARGET)
139 @MAKE_RULES@
141 install:: install_$(MAIN_TARGET)
143 uninstall:: uninstall_$(MAIN_TARGET)
145 emu: wine
147 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
149 wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
150 $(CC) -o wine $(EMUOBJS) $(LIB_TARGET) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
151 @echo "Please ignore the 'gets' warning message, it only applies to Windows programs which use 'gets'"
152 nm -n wine | grep -v _compiled >wine.sym
153 @echo "Wine build complete."
155 libwine.a: $(LIBOBJS) $(X11OBJS)
156 $(RM) $@
157 $(AR) $@ $(LIBOBJS) $(X11OBJS)
158 $(RANLIB) $@
160 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
161 $(CC) -shared -Wl,-soname,libwine.so -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
163 install_emu: install_lib
164 [ -d $(bindir) ] || $(MKDIR) $(bindir)
165 $(INSTALL_PROGRAM) wine $(bindir)/wine
166 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
168 uninstall_emu: uninstall_lib
169 $(RM) $(bindir)/wine $(bindir)/dosmod
171 install_lib: install_includes
172 [ -d $(libdir) ] || $(MKDIR) $(libdir)
173 if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
174 $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
176 uninstall_lib: uninstall_includes
177 cd $(libdir); $(RM) $(LIB_TARGET)
178 $(RM) $(libdir)/wine.sym
180 install_includes: dummy
181 [ -d $(includedir) ] || $(MKDIR) $(includedir)
182 cd $(TOPSRCDIR)/include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
184 # Don't just do a rm -rf on $(includedir) -- don't want to wipe out
185 # anything extra the user may have put there.
186 uninstall_includes: dummy
187 $(RM) $(includedir)/windows.h $(includedir)/wintypes.h
188 -rmdir $(includedir)
190 $(ALLSUBDIRS): dummy
191 @cd $@; $(SUBMAKE)
193 install_programs: dummy
194 @cd programs; $(SUBMAKE) install
196 uninstall_programs: dummy
197 @cd programs; $(SUBMAKE) uninstall
199 install::
200 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
202 uninstall::
203 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
205 depend:: dummy
206 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
208 TAGS etags:
209 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
211 manpages:
212 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
213 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
215 htmlpages:
216 -$(MKDIR) $(TOPOBJDIR)/documentation/html
217 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
219 clean::
220 for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
221 for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
222 $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS .#*
224 distclean: clean
225 $(RM) config.* Make.rules include/config.h
226 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
228 configure: configure.in
229 autoconf
231 include/config.h.in: configure.in include/acconfig.h
232 autoheader -l include
234 ### Dependencies: