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@
46 graphics
/metafiledrv \
78 PROGSUBDIRS
= libtest programs
80 DOCSUBDIRS
= documentation
90 # Sub-directories to run make depend into
91 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
93 # Sub-directories to run make install into
94 INSTALLSUBDIRS
= $(DOCSUBDIRS
)
99 dlls
/advapi32
/advapi32.o \
100 dlls
/comctl32
/comctl32.o \
101 dlls
/imagehlp
/imagehlp.o \
103 dlls
/msacm32
/msacm32.o \
106 dlls
/rasapi32
/rasapi32.o \
107 dlls
/shell32
/shell32.o \
109 dlls
/version
/version.o \
110 dlls
/winaspi
/winaspi.o \
111 dlls
/wnaspi32
/wnaspi32.o \
113 graphics
/graphics.o \
114 graphics
/metafiledrv
/metafiledrv.o \
115 graphics
/psdrv
/psdrv.o \
123 multimedia
/multimedia.o \
127 resources
/resources.o \
128 scheduler
/scheduler.o \
132 windows
/ttydrv
/ttydrv.o
135 graphics
/x11drv
/x11drv.o \
137 windows
/x11drv
/x11drv.o
140 debugger
/debugger.o \
141 graphics
/win16drv
/win16drv.o \
145 LIB_TARGET
= @LIB_TARGET@
147 ALT_LINK
= @ALT_LINK@
149 all: Makefile Make.rules
$(MAIN_TARGET
)
153 Make.rules
: Make.rules.in configure
154 @echo
$? is newer than
'Make.rules', please rerun .
/configure
!
157 install:: install_
$(MAIN_TARGET
)
159 uninstall:: uninstall_
$(MAIN_TARGET
)
163 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
165 wine wine.sym
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
) $(EMUSUBDIRS
) dummy
166 $(CC
) -o wine
$(EMUOBJS
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
167 nm
-n wine | grep
-v _compiled
>wine.sym
168 @echo
"Wine build complete."
170 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
172 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
175 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
176 $(LDSHARED
) -o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
)
179 install_emu
: install_lib
180 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
181 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
182 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
184 uninstall_emu
: uninstall_lib
185 $(RM
) $(bindir)/wine
$(bindir)/dosmod
187 install_lib
: install_includes
188 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
189 if
[ $(LIB_TARGET
) ]; then
$(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); fi
190 $(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
192 uninstall_lib
: uninstall_includes
193 cd
$(libdir); $(RM
) $(LIB_TARGET
)
194 $(RM
) $(libdir)/wine.sym
196 install_includes
: dummy
197 # Testing LIB_TARGET prevents installing header files
198 # when --disable-lib is used.
199 if
[ $(LIB_TARGET
) ]; then
[ -d
$(includedir) ] ||
$(MKDIR
) $(includedir); \
200 cd
$(TOPSRCDIR
)/include; $(INSTALL_DATA
) windows.h wintypes.h
$(includedir); fi
202 # Don't just do a rm -rf on $(includedir) -- don't want to wipe out
203 # anything extra the user may have put there.
204 uninstall_includes
: dummy
205 $(RM
) $(includedir)/windows.h
$(includedir)/wintypes.h
211 install_programs
: dummy
212 @cd programs
; $(SUBMAKE
) install
214 uninstall_programs
: dummy
215 @cd programs
; $(SUBMAKE
) uninstall
218 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
221 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
224 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
227 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
230 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
231 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
234 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
235 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
238 for i in
$(ALLSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
239 for i in
include; do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
240 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 libwine.so TAGS .
#*
243 $(RM
) config.
* Make.rules
include/config.h
244 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
246 # We depend on configure above for checks, so we better don't use this rule.
247 #configure: configure.in
250 include/config.h.in
: configure.in
include/acconfig.h
251 autoheader
-l
include