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