1 # This Makefile understands the following targets:
3 # all (default): build wine
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@
20 TOPSRCDIR
= @top_srcdir@
65 graphics
/enhmetafiledrv \
66 graphics
/metafiledrv \
98 PROGSUBDIRS
= libtest programs
100 DOCSUBDIRS
= documentation
104 # Sub-directories to run make into
113 # Sub-directories to run make depend into
114 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
116 # Sub-directories to run make install into
117 INSTALLSUBDIRS
= $(DOCSUBDIRS
) $(INCSUBDIRS
)
119 # Sub-directories to run make lint into
120 LINTSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
123 controls
/controls.o \
125 dlls
/advapi32
/advapi32.o \
126 dlls
/avifil32
/avifil32.o \
127 dlls
/comctl32
/comctl32.o \
128 dlls
/commdlg
/commdlg.o \
129 dlls
/crtdll
/crtdll.o \
130 dlls
/dciman32
/dciman32.o \
131 dlls
/imagehlp
/imagehlp.o \
133 dlls
/lzexpand
/lzexpand.o \
136 dlls
/msacm32
/msacm32.o \
137 dlls
/msnet32
/msnet32.o \
138 dlls
/msvideo
/msvideo.o \
141 dlls
/rasapi32
/rasapi32.o \
142 dlls
/shell32
/shell32.o \
144 dlls
/stress
/stress.o \
145 dlls
/tapi32
/tapi32.o \
147 dlls
/version
/version.o \
148 dlls
/win32s
/win32s.o \
149 dlls
/win87em
/win87em.o \
150 dlls
/winaspi
/winaspi.o \
151 dlls
/windebug
/windebug.o \
153 dlls
/winspool
/winspool.o \
154 dlls
/wnaspi32
/wnaspi32.o \
156 graphics
/graphics.o \
157 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
158 graphics
/metafiledrv
/metafiledrv.o \
159 graphics
/psdrv
/psdrv.o \
160 graphics
/ttydrv
/ttydrv.o \
161 graphics
/win16drv
/win16drv.o \
169 multimedia
/multimedia.o \
173 resources
/resources.o \
174 scheduler
/scheduler.o \
178 windows
/ttydrv
/ttydrv.o
181 graphics
/x11drv
/x11drv.o \
183 windows
/x11drv
/x11drv.o
186 debugger
/debugger.o \
189 LIB_TARGET
= @LIB_TARGET@
191 ALT_LINK
= @ALT_LINK@
193 all: Makefile Make.rules
$(MAIN_TARGET
)
194 @echo
"Wine build complete."
196 LIBLINTS
= $(LIBOBJS
:.o
=.ln
)
197 X11LINTS
= $(X11OBJS
:.o
=.ln
)
198 EMULINTS
= $(EMUOBJS
:.o
=.ln
)
200 lint
:: llib-lwine.ln
$(EMULINTS
)
201 $(LINT
) $(ALLLINTFLAGS
) -L.
-lwine
$(EMULINTS
)
205 Make.rules
: Make.rules.in configure
206 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
209 install:: install_
$(MAIN_TARGET
)
211 uninstall:: uninstall_
$(MAIN_TARGET
)
215 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
217 wine wine.sym
: $(LIB_TARGET
) $(EMUOBJS
) $(X11OBJS
) $(LIBOBJS
)
218 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
219 nm
-n wine | grep
-v _compiled
>wine.sym
221 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
223 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
226 llib-lwine.ln
: $(LIBLINTS
) $(X11LINTS
)
227 $(LINT
) $(ALLLINTFLAGS
) -owine
$(LIBLINTS
) $(X11LINTS
)
229 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
230 $(LDSHARED
) -o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
)
233 install_emu
: install_lib
234 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
235 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
236 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
238 uninstall_emu
: uninstall_lib
239 $(RM
) $(bindir)/wine
$(bindir)/dosmod
242 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
243 if
[ -f wine.sym
]; then
$(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
; fi
244 if
[ $(LIB_TARGET
) ]; then \
245 $(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); \
246 if
[ $(LIB_TARGET
) = libwine.so
.1.0 ]; then
$(LDCONFIG
); fi \
250 cd
$(libdir); $(RM
) $(LIB_TARGET
) libwine.a libwine.so wine.sym
252 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
): $(TOOLSUBDIRS
) dummy
253 @cd
`dirname $@`; $(SUBMAKE
)
255 $(BUILDSUBDIRS
): dummy
258 $(LIBLINTS
) $(X11LINTS
) $(EMULINTS
): dummy
259 @echo
$@ | sed
's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
262 install_programs
: dummy
263 @cd programs
; $(SUBMAKE
) install
265 uninstall_programs
: dummy
266 @cd programs
; $(SUBMAKE
) uninstall
269 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
272 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
275 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
278 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
281 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
282 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
285 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
286 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
289 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
290 for i in
include include/bitmaps
include/wine
; do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
291 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 libwine.so TAGS .
#*
294 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man documentation
/wine.conf.man
295 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
297 # We depend on configure above for checks, so we better don't use this rule.
298 #configure: configure.in
301 include/config.h.in
: configure.in
include/acconfig.h
302 autoheader
-l
include