Merged display.dll into USER.
[wine.git] / Makefile.in
blobdc61207d76570b4ba31ba72ac3fd70547e28c9dd
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/mouse \
35 dlls/ntdll \
36 files \
37 graphics \
38 graphics/enhmetafiledrv \
39 graphics/metafiledrv \
40 graphics/win16drv \
41 if1632 \
42 library \
43 loader \
44 loader/ne \
45 loader/dos \
46 memory \
47 misc \
48 msdos \
49 objects \
50 ole \
51 relay32 \
52 resources \
53 scheduler \
54 win32 \
55 windows
57 EMUSUBDIRS = \
58 miscemu \
59 server
61 PROGSUBDIRS = \
62 debugger \
63 libtest \
64 programs
66 DOCSUBDIRS = documentation
68 INCSUBDIRS = include
70 # Stand-alone programs
71 PROGRAMS = \
72 loader/dos/dosmod \
73 server/wineserver
75 # Programs that link with libwine
76 LIBPROGRAMS = \
77 debugger/winedbg
79 # Sub-directories to run make into
80 SUBDIRS = \
81 $(TOOLSUBDIRS) \
82 $(LIBSUBDIRS) \
83 $(DLLDIR) \
84 $(EMUSUBDIRS) \
85 $(PROGSUBDIRS) \
86 $(DOCSUBDIRS) \
87 include
89 # Sub-directories to run make install into
90 INSTALLSUBDIRS = $(DLLDIR) $(DOCSUBDIRS) $(INCSUBDIRS)
92 # Sub-directories to run make lint into
93 LINTSUBDIRS = $(LIBSUBDIRS) $(DLLDIR) $(EMUSUBDIRS) $(DOCSUBDIRS)
95 LIBOBJS = \
96 controls/controls.o \
97 console/console.o \
98 dlls/advapi32/advapi32.o \
99 dlls/crtdll/crtdll.o \
100 dlls/mouse/mouse.o \
101 dlls/ntdll/ntdll.o \
102 files/files.o \
103 graphics/graphics.o \
104 graphics/enhmetafiledrv/enhmetafiledrv.o \
105 graphics/metafiledrv/metafiledrv.o \
106 graphics/win16drv/win16drv.o \
107 if1632/if1632.o \
108 loader/loader.o \
109 loader/ne/ne.o \
110 loader/dos/dos.o \
111 memory/memory.o \
112 misc/misc.o \
113 msdos/msdos.o \
114 objects/objects.o \
115 ole/ole.o \
116 relay32/relay32.o \
117 resources/resources.o \
118 scheduler/scheduler.o \
119 win32/win32.o \
120 windows/windows.o
122 EMUOBJS = \
123 miscemu/miscemu.o
125 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
127 EXTRA_OBJS = $(LIBOBJS)
129 EMU_TARGET = @EMU_TARGET@
131 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) lib$(MODULE).$(LIBEXT) $(DLLDIR) $(EMU_TARGET)
132 @echo "Wine build complete."
134 LIBLINTS = $(LIBOBJS:.o=.ln)
135 EMULINTS = $(EMUOBJS:.o=.ln)
137 lint:: llib-lwine.ln $(EMULINTS)
138 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
140 WINAPI_CHECK_EXTRA_FLAGS = --global
142 @MAKE_RULES@
144 Make.rules: Make.rules.in configure
145 @echo $? is newer than 'Make.rules', please rerun ./configure!
146 @exit 1
148 wine: lib$(MODULE).$(LIBEXT) $(DLLDIR) $(EMUOBJS)
149 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS)
151 llib-lwine.ln : $(LIBLINTS)
152 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS)
154 install_so: lib$(MODULE).so.$(SOVERSION)
155 [ -d $(libdir) ] || $(MKDIR) $(libdir)
156 $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION)
157 cd $(libdir) && $(RM) lib$(MODULE).so && $(LN_S) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).so
159 install_a: lib$(MODULE).a
160 [ -d $(libdir) ] || $(MKDIR) $(libdir)
161 $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
163 install_wine: wine
164 [ -d $(bindir) ] || $(MKDIR) $(bindir)
165 $(INSTALL_PROGRAM) wine $(bindir)/wine
167 install:: $(PROGRAMS) $(LIBPROGRAMS) $(EMU_TARGET:%=install_%) $(LIBEXT:%=install_%)
168 [ -d $(bindir) ] || $(MKDIR) $(bindir)
169 $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver
170 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
171 $(INSTALL_PROGRAM) debugger/winedbg $(bindir)/winedbg
173 uninstall::
174 cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION)
175 cd $(bindir) && $(RM) wine wineserver dosmod winedbg
177 lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in
178 $(LDSHARED) $(OBJS) -o $@
180 lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION)
181 $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
183 lib$(MODULE).a: $(OBJS) Makefile.in Make.rules.in
184 $(RM) $@
185 $(AR) $@ $(OBJS)
186 $(RANLIB) $@
188 checklink::
189 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LIBS) && $(RM) checklink
191 $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS): $(TOOLSUBDIRS) dummy
192 @cd `dirname $@` && $(MAKE) `basename $@`
194 $(DLLDIR): $(TOOLSUBDIRS) dummy
196 $(LIBPROGRAMS): lib$(MODULE).$(LIBEXT) $(DLLDIR)
198 $(LIBLINTS) $(EMULINTS): dummy
199 @cd `dirname $@` && $(MAKE) lint
201 install_programs: dummy
202 @cd programs && $(MAKE) install
204 uninstall_programs: dummy
205 @cd programs && $(MAKE) uninstall
207 install::
208 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
209 -$(LDCONFIG)
211 uninstall::
212 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
214 checklink::
215 @cd dlls && $(MAKE) checklink
217 TAGS etags:
218 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
220 manpages:
221 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
222 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
224 htmlpages:
225 -$(MKDIR) $(TOPOBJDIR)/documentation/html
226 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
228 clean::
229 $(RM) wine libwine.so.1.0 TAGS
231 distclean: clean
232 $(RM) config.* Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man
233 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
235 # We depend on configure above for checks, so we better don't use this rule.
236 #configure: configure.in
237 # autoconf
239 include/config.h.in: configure.in include/acconfig.h
240 autoheader -l include
242 ### Dependencies: