Added support for Solaris Lint.
[wine/wine-kai.git] / Makefile.in
blob29bf3045c450ea8f2ccb4ce7b534dfee360a97e5
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 TOOLSUBDIRS = \
27 tools \
28 tools/wrc
30 LIBSUBDIRS = \
31 controls \
32 console \
33 dlls/advapi32 \
34 dlls/avifil32 \
35 dlls/comctl32 \
36 dlls/commdlg \
37 dlls/imagehlp \
38 dlls/msacm \
39 dlls/msacm32 \
40 dlls/ntdll \
41 dlls/psapi \
42 dlls/rasapi32 \
43 dlls/shell32 \
44 dlls/tapi32 \
45 dlls/ver \
46 dlls/version \
47 dlls/win87em \
48 dlls/winaspi \
49 dlls/winspool \
50 dlls/wnaspi32 \
51 files \
52 graphics \
53 graphics/enhmetafiledrv \
54 graphics/metafiledrv \
55 graphics/psdrv \
56 graphics/ttydrv \
57 graphics/win16drv \
58 if1632 \
59 library \
60 loader \
61 loader/ne \
62 loader/dos \
63 memory \
64 misc \
65 msdos \
66 multimedia \
67 objects \
68 ole \
69 relay32 \
70 resources \
71 scheduler \
72 server \
73 win32 \
74 windows \
75 windows/ttydrv
77 X11SUBDIRS = \
78 graphics/x11drv \
79 tsx11 \
80 windows/x11drv
82 EMUSUBDIRS = \
83 debugger \
84 miscemu
86 PROGSUBDIRS = libtest programs
88 DOCSUBDIRS = documentation
90 INCSUBDIRS = include
92 # Sub-directories to run make into
93 BUILDSUBDIRS = \
94 $(TOOLSUBDIRS) \
95 $(LIBSUBDIRS) \
96 $(X11SUBDIRS) \
97 $(EMUSUBDIRS) \
98 $(PROGSUBDIRS) \
99 $(DOCSUBDIRS)
101 # Sub-directories to run make depend into
102 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
104 # Sub-directories to run make install into
105 INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
107 # Sub-directories to run make lint into
108 LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
110 LIBOBJS = \
111 controls/controls.o \
112 console/console.o \
113 dlls/advapi32/advapi32.o \
114 dlls/avifil32/avifil32.o \
115 dlls/comctl32/comctl32.o \
116 dlls/commdlg/commdlg.o \
117 dlls/imagehlp/imagehlp.o \
118 dlls/msacm/msacm.o \
119 dlls/msacm32/msacm32.o \
120 dlls/ntdll/ntdll.o \
121 dlls/psapi/psapi.o \
122 dlls/rasapi32/rasapi32.o \
123 dlls/shell32/shell32.o \
124 dlls/tapi32/tapi32.o \
125 dlls/ver/ver.o \
126 dlls/version/version.o \
127 dlls/win87em/win87em.o \
128 dlls/winaspi/winaspi.o \
129 dlls/winspool/winspool.o \
130 dlls/wnaspi32/wnaspi32.o \
131 files/files.o \
132 graphics/graphics.o \
133 graphics/enhmetafiledrv/enhmetafiledrv.o \
134 graphics/metafiledrv/metafiledrv.o \
135 graphics/psdrv/psdrv.o \
136 graphics/ttydrv/ttydrv.o \
137 graphics/win16drv/win16drv.o \
138 if1632/if1632.o \
139 loader/loader.o \
140 loader/ne/ne.o \
141 loader/dos/dos.o \
142 memory/memory.o \
143 misc/misc.o \
144 msdos/msdos.o \
145 multimedia/multimedia.o \
146 objects/objects.o \
147 ole/ole.o \
148 relay32/relay32.o \
149 resources/resources.o \
150 scheduler/scheduler.o \
151 server/server.o \
152 win32/win32.o \
153 windows/windows.o \
154 windows/ttydrv/ttydrv.o
156 X11OBJS = \
157 graphics/x11drv/x11drv.o \
158 tsx11/tsx11.o \
159 windows/x11drv/x11drv.o
161 EMUOBJS = \
162 debugger/debugger.o \
163 miscemu/miscemu.o
165 LIB_TARGET = @LIB_TARGET@
167 ALT_LINK = @ALT_LINK@
169 all: Makefile Make.rules $(MAIN_TARGET)
171 LIBLINTS = $(LIBOBJS:.o=.ln)
172 X11LINTS = $(X11OBJS:.o=.ln)
173 EMULINTS = $(EMUOBJS:.o=.ln)
175 lint:: llib-lwine.ln $(EMULINTS)
176 $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
178 @MAKE_RULES@
180 Make.rules: Make.rules.in configure
181 @echo $? is newer than 'Make.rules', please rerun ./configure!
182 @exit 1
184 install:: install_$(MAIN_TARGET)
186 uninstall:: uninstall_$(MAIN_TARGET)
188 emu: wine
190 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
192 wine wine.sym: $(LIB_TARGET) $(EMUOBJS) $(X11OBJS) $(LIBOBJS) dummy
193 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
194 nm -n wine | grep -v _compiled >wine.sym
195 @echo "Wine build complete."
197 libwine.a: $(LIBOBJS) $(X11OBJS)
198 $(RM) $@
199 $(AR) $@ $(LIBOBJS) $(X11OBJS)
200 $(RANLIB) $@
202 llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
203 $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
205 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
206 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
207 ln -sf $@ libwine.so
209 install_emu: install_lib
210 [ -d $(bindir) ] || $(MKDIR) $(bindir)
211 $(INSTALL_PROGRAM) wine $(bindir)/wine
212 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
214 uninstall_emu: uninstall_lib
215 $(RM) $(bindir)/wine $(bindir)/dosmod
217 install_lib: dummy
218 [ -d $(libdir) ] || $(MKDIR) $(libdir)
219 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
220 if [ $(LIB_TARGET) ]; then \
221 $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \
222 if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \
225 uninstall_lib: dummy
226 cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
228 $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
229 @cd `dirname $@`; $(SUBMAKE)
231 $(BUILDSUBDIRS): dummy
232 @cd $@; $(SUBMAKE)
234 $(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
235 @echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
238 install_programs: dummy
239 @cd programs; $(SUBMAKE) install
241 uninstall_programs: dummy
242 @cd programs; $(SUBMAKE) uninstall
244 install::
245 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
247 uninstall::
248 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
250 depend:: dummy
251 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
253 TAGS etags:
254 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
256 manpages:
257 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
258 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
260 htmlpages:
261 -$(MKDIR) $(TOPOBJDIR)/documentation/html
262 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
264 clean::
265 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
266 for i in include include/bitmaps include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
267 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
269 distclean: clean
270 $(RM) config.* Make.rules include/config.h documentation/wine.man
271 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
273 # We depend on configure above for checks, so we better don't use this rule.
274 #configure: configure.in
275 # autoconf
277 include/config.h.in: configure.in include/acconfig.h
278 autoheader -l include
280 ### Dependencies: