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@
41 graphics
/metafiledrv \
72 PROGSUBDIRS
= libtest programs
74 DOCSUBDIRS
= documentation
84 # Sub-directories to run make depend into
85 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
87 # Sub-directories to run make install into
88 INSTALLSUBDIRS
= $(DOCSUBDIRS
)
92 dlls
/comctl32
/comctl32.o \
93 dlls
/imagehlp
/imagehlp.o \
95 dlls
/msacm32
/msacm32.o \
98 dlls
/shell32
/shell32.o \
99 dlls
/winaspi
/winaspi.o \
100 dlls
/wnaspi32
/wnaspi32.o \
102 graphics
/graphics.o \
103 graphics
/metafiledrv
/metafiledrv.o \
104 graphics
/psdrv
/psdrv.o \
112 multimedia
/multimedia.o \
116 resources
/resources.o \
117 scheduler
/scheduler.o \
123 graphics
/x11drv
/x11drv.o \
125 windows
/x11drv
/x11drv.o
128 debugger
/debugger.o \
129 graphics
/win16drv
/win16drv.o \
133 LIB_TARGET
= @LIB_TARGET@
135 ALT_LINK
= @ALT_LINK@
141 install:: install_
$(MAIN_TARGET
)
143 uninstall:: uninstall_
$(MAIN_TARGET
)
147 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
149 wine wine.sym
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
) $(EMUSUBDIRS
) dummy
150 $(CC
) -o wine
$(EMUOBJS
) $(LIB_TARGET
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
151 nm
-n wine | grep
-v _compiled
>wine.sym
152 @echo
"Wine build complete."
154 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
156 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
159 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
160 $(CC
) -shared
-Wl
,-soname
,libwine.so
-o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
162 install_emu
: install_lib
163 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
164 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
165 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
167 uninstall_emu
: uninstall_lib
168 $(RM
) $(bindir)/wine
$(bindir)/dosmod
170 install_lib
: install_includes
171 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
172 if
[ $(LIB_TARGET
) ]; then
$(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); fi
173 $(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
175 uninstall_lib
: uninstall_includes
176 cd
$(libdir); $(RM
) $(LIB_TARGET
)
177 $(RM
) $(libdir)/wine.sym
179 install_includes
: dummy
180 [ -d
$(includedir) ] ||
$(MKDIR
) $(includedir)
181 cd
$(TOPSRCDIR
)/include; $(INSTALL_DATA
) windows.h wintypes.h
$(includedir)
183 # Don't just do a rm -rf on $(includedir) -- don't want to wipe out
184 # anything extra the user may have put there.
185 uninstall_includes
: dummy
186 $(RM
) $(includedir)/windows.h
$(includedir)/wintypes.h
192 install_programs
: dummy
193 @cd programs
; $(SUBMAKE
) install
195 uninstall_programs
: dummy
196 @cd programs
; $(SUBMAKE
) uninstall
199 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
202 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
205 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
208 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
211 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
212 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
215 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
216 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
219 for i in
$(ALLSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
220 for i in
include; do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
221 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 TAGS .
#*
224 $(RM
) config.
* Make.rules
include/config.h
225 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
227 configure
: configure.in
230 include/config.h.in
: configure.in
include/acconfig.h
231 autoheader
-l
include