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
)
108 controls
/controls.o \
110 dlls
/advapi32
/advapi32.o \
111 dlls
/avifil32
/avifil32.o \
112 dlls
/comctl32
/comctl32.o \
113 dlls
/commdlg
/commdlg.o \
114 dlls
/imagehlp
/imagehlp.o \
116 dlls
/msacm32
/msacm32.o \
119 dlls
/rasapi32
/rasapi32.o \
120 dlls
/shell32
/shell32.o \
121 dlls
/tapi32
/tapi32.o \
123 dlls
/version
/version.o \
124 dlls
/win87em
/win87em.o \
125 dlls
/winaspi
/winaspi.o \
126 dlls
/winspool
/winspool.o \
127 dlls
/wnaspi32
/wnaspi32.o \
129 graphics
/graphics.o \
130 graphics
/enhmetafiledrv
/enhmetafiledrv.o \
131 graphics
/metafiledrv
/metafiledrv.o \
132 graphics
/psdrv
/psdrv.o \
133 graphics
/ttydrv
/ttydrv.o \
134 graphics
/win16drv
/win16drv.o \
142 multimedia
/multimedia.o \
146 resources
/resources.o \
147 scheduler
/scheduler.o \
151 windows
/ttydrv
/ttydrv.o
154 graphics
/x11drv
/x11drv.o \
156 windows
/x11drv
/x11drv.o
159 debugger
/debugger.o \
162 LIB_TARGET
= @LIB_TARGET@
164 ALT_LINK
= @ALT_LINK@
166 all: Makefile Make.rules
$(MAIN_TARGET
)
170 Make.rules
: Make.rules.in configure
171 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
174 install:: install_
$(MAIN_TARGET
)
176 uninstall:: uninstall_
$(MAIN_TARGET
)
180 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
182 wine wine.sym
: $(LIB_TARGET
) $(EMUOBJS
) $(X11OBJS
) $(LIBOBJS
) dummy
183 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
184 nm
-n wine | grep
-v _compiled
>wine.sym
185 @echo
"Wine build complete."
187 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
189 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
192 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
193 $(LDSHARED
) -o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
)
196 install_emu
: install_lib
197 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
198 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
199 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
201 uninstall_emu
: uninstall_lib
202 $(RM
) $(bindir)/wine
$(bindir)/dosmod
205 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
206 if
[ -f wine.sym
]; then
$(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
; fi
207 if
[ $(LIB_TARGET
) ]; then \
208 $(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); \
209 if
[ $(LIB_TARGET
) = libwine.so
.1.0 ]; then
$(LDCONFIG
); fi \
213 cd
$(libdir); $(RM
) $(LIB_TARGET
) libwine.a libwine.so wine.sym
215 $(X11OBJS
) $(EMUOBJS
) $(LIBOBJS
): $(TOOLSUBDIRS
) dummy
216 @cd
`dirname $@`; $(SUBMAKE
)
218 $(BUILDSUBDIRS
): dummy
221 install_programs
: dummy
222 @cd programs
; $(SUBMAKE
) install
224 uninstall_programs
: dummy
225 @cd programs
; $(SUBMAKE
) uninstall
228 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
231 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
234 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
237 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
240 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
241 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
244 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
245 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
248 for i in
$(BUILDSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
249 for i in
include include/bitmaps
include/wine
; do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
250 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 libwine.so TAGS .
#*
253 $(RM
) config.
* Make.rules
include/config.h documentation
/wine.man
254 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
256 # We depend on configure above for checks, so we better don't use this rule.
257 #configure: configure.in
260 include/config.h.in
: configure.in
include/acconfig.h
261 autoheader
-l
include