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@
53 graphics
/enhmetafiledrv \
54 graphics
/metafiledrv \
86 PROGSUBDIRS
= libtest programs
88 DOCSUBDIRS
= documentation
92 # Sub-directories to run make into
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
)
111 controls
/controls.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 \
119 dlls
/msacm32
/msacm32.o \
122 dlls
/rasapi32
/rasapi32.o \
123 dlls
/shell32
/shell32.o \
124 dlls
/tapi32
/tapi32.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 \
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 \
145 multimedia
/multimedia.o \
149 resources
/resources.o \
150 scheduler
/scheduler.o \
154 windows
/ttydrv
/ttydrv.o
157 graphics
/x11drv
/x11drv.o \
159 windows
/x11drv
/x11drv.o
162 debugger
/debugger.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
)
180 Make.rules
: Make.rules.in configure
181 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
184 install:: install_
$(MAIN_TARGET
)
186 uninstall:: uninstall_
$(MAIN_TARGET
)
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
)
199 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
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
)
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
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 \
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
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
245 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
248 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
251 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
254 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
257 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
258 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
261 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
262 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
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 .
#*
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
277 include/config.h.in
: configure.in
include/acconfig.h
278 autoheader
-l
include