Merged mouse dll into USER.
[wine.git] / Makefile.in
blobc7aab6968d17c508526ef4cf639cbdc26a01d1a5
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/kernel \
34 dlls/ntdll \
35 files \
36 graphics \
37 graphics/enhmetafiledrv \
38 graphics/metafiledrv \
39 graphics/win16drv \
40 if1632 \
41 library \
42 loader \
43 loader/ne \
44 loader/dos \
45 memory \
46 misc \
47 msdos \
48 objects \
49 ole \
50 relay32 \
51 resources \
52 scheduler \
53 win32 \
54 windows
56 EMUSUBDIRS = \
57 miscemu \
58 server
60 PROGSUBDIRS = \
61 debugger \
62 libtest \
63 programs
65 DOCSUBDIRS = documentation
67 INCSUBDIRS = include
69 # Stand-alone programs
70 PROGRAMS = \
71 loader/dos/dosmod \
72 server/wineserver
74 # Programs that link with libwine
75 LIBPROGRAMS = \
76 debugger/winedbg
78 # Sub-directories to run make into
79 SUBDIRS = \
80 $(TOOLSUBDIRS) \
81 $(LIBSUBDIRS) \
82 $(DLLDIR) \
83 $(EMUSUBDIRS) \
84 $(PROGSUBDIRS) \
85 $(DOCSUBDIRS) \
86 include
88 # Sub-directories to run make install into
89 INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
91 # Sub-directories to run make lint into
92 LINTSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
94 LIBOBJS = \
95 controls/controls.o \
96 console/console.o \
97 dlls/advapi32/advapi32.o \
98 dlls/crtdll/crtdll.o \
99 dlls/ntdll/ntdll.o \
100 files/files.o \
101 graphics/graphics.o \
102 graphics/enhmetafiledrv/enhmetafiledrv.o \
103 graphics/metafiledrv/metafiledrv.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) $(LIBPROGRAMS) lib$(MODULE).$(LIBEXT) $(DLLDIR) $(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 Make.rules: Make.rules.in configure
143 @echo $? is newer than 'Make.rules', please rerun ./configure!
144 @exit 1
146 wine: lib$(MODULE).$(LIBEXT) $(DLLDIR) $(EMUOBJS)
147 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS)
149 llib-lwine.ln : $(LIBLINTS)
150 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS)
152 install_so: lib$(MODULE).so.$(SOVERSION)
153 [ -d $(libdir) ] || $(MKDIR) $(libdir)
154 $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION)
155 cd $(libdir) && $(RM) lib$(MODULE).so && $(LN_S) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).so
157 install_a: lib$(MODULE).a
158 [ -d $(libdir) ] || $(MKDIR) $(libdir)
159 $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
161 install_wine: wine
162 [ -d $(bindir) ] || $(MKDIR) $(bindir)
163 $(INSTALL_PROGRAM) wine $(bindir)/wine
165 install:: $(PROGRAMS) $(LIBPROGRAMS) $(EMU_TARGET:%=install_%) $(LIBEXT:%=install_%)
166 [ -d $(bindir) ] || $(MKDIR) $(bindir)
167 $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
168 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
169 $(INSTALL_PROGRAM) debugger/winedbg $(bindir)/winedbg
171 uninstall::
172 cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION)
173 cd $(bindir) && $(RM) wine wineserver dosmod winedbg
175 lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in
176 $(LDSHARED) $(OBJS) -o $@
178 lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION)
179 $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
181 lib$(MODULE).a: $(OBJS) Makefile.in Make.rules.in
182 $(RM) $@
183 $(AR) $@ $(OBJS)
184 $(RANLIB) $@
186 checklink::
187 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LIBS) && $(RM) checklink
189 $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS): $(TOOLSUBDIRS) dummy
190 @cd `dirname $@` && $(MAKE) `basename $@`
192 $(DLLDIR): $(TOOLSUBDIRS) dummy
194 $(LIBPROGRAMS): lib$(MODULE).$(LIBEXT) $(DLLDIR)
196 $(LIBLINTS) $(EMULINTS): dummy
197 @cd `dirname $@` && $(MAKE) lint
199 install_programs: dummy
200 @cd programs && $(MAKE) install
202 uninstall_programs: dummy
203 @cd programs && $(MAKE) uninstall
205 install::
206 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
207 -$(LDCONFIG)
209 uninstall::
210 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
212 checklink::
213 @cd dlls && $(MAKE) checklink
215 TAGS etags:
216 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
218 manpages:
219 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
220 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
222 htmlpages:
223 -$(MKDIR) $(TOPOBJDIR)/documentation/html
224 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
226 clean::
227 $(RM) wine libwine.so.1.0 TAGS
229 distclean: clean
230 $(RM) config.* Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man
231 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
233 # We depend on configure above for checks, so we better don't use this rule.
234 #configure: configure.in
235 # autoconf
237 include/config.h.in: configure.in include/acconfig.h
238 autoheader -l include
240 ### Dependencies: