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@
42 graphics
/metafiledrv \
74 PROGSUBDIRS
= libtest programs
76 DOCSUBDIRS
= documentation
86 # Sub-directories to run make depend into
87 DEPENDSUBDIRS
= $(LIBSUBDIRS
) $(X11SUBDIRS
) $(EMUSUBDIRS
) $(DOCSUBDIRS
)
89 # Sub-directories to run make install into
90 INSTALLSUBDIRS
= $(DOCSUBDIRS
)
95 dlls
/comctl32
/comctl32.o \
96 dlls
/imagehlp
/imagehlp.o \
98 dlls
/msacm32
/msacm32.o \
101 dlls
/shell32
/shell32.o \
102 dlls
/winaspi
/winaspi.o \
103 dlls
/wnaspi32
/wnaspi32.o \
105 graphics
/graphics.o \
106 graphics
/metafiledrv
/metafiledrv.o \
107 graphics
/psdrv
/psdrv.o \
115 multimedia
/multimedia.o \
119 resources
/resources.o \
120 scheduler
/scheduler.o \
124 windows
/ttydrv
/ttydrv.o
127 graphics
/x11drv
/x11drv.o \
129 windows
/x11drv
/x11drv.o
132 debugger
/debugger.o \
133 graphics
/win16drv
/win16drv.o \
137 LIB_TARGET
= @LIB_TARGET@
139 ALT_LINK
= @ALT_LINK@
145 install:: install_
$(MAIN_TARGET
)
147 uninstall:: uninstall_
$(MAIN_TARGET
)
151 lib
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
)
153 wine wine.sym
: $(LIBSUBDIRS
) $(X11SUBDIRS
) $(LIB_TARGET
) $(EMUSUBDIRS
) dummy
154 $(CC
) -o wine
$(EMUOBJS
) $(LIB_TARGET
) $(ALT_LINK
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
155 nm
-n wine | grep
-v _compiled
>wine.sym
156 @echo
"Wine build complete."
158 libwine.a
: $(LIBOBJS
) $(X11OBJS
)
160 $(AR
) $@
$(LIBOBJS
) $(X11OBJS
)
163 libwine.so
.1.0: $(LIBOBJS
) $(X11OBJS
)
164 $(CC
) -shared
-Wl
,-soname
,libwine.so
-o
$@
$(LIBOBJS
) $(X11OBJS
) $(LDOPTIONS
) $(X_LIBS
) $(XLIB
) $(LIBS
)
166 install_emu
: install_lib
167 [ -d
$(bindir) ] ||
$(MKDIR
) $(bindir)
168 $(INSTALL_PROGRAM
) wine
$(bindir)/wine
169 $(INSTALL_PROGRAM
) loader
/dos
/dosmod
$(bindir)/dosmod
171 uninstall_emu
: uninstall_lib
172 $(RM
) $(bindir)/wine
$(bindir)/dosmod
174 install_lib
: install_includes
175 [ -d
$(libdir) ] ||
$(MKDIR
) $(libdir)
176 if
[ $(LIB_TARGET
) ]; then
$(INSTALL_DATA
) $(LIB_TARGET
) $(libdir); fi
177 $(INSTALL_DATA
) wine.sym
$(libdir)/wine.sym
179 uninstall_lib
: uninstall_includes
180 cd
$(libdir); $(RM
) $(LIB_TARGET
)
181 $(RM
) $(libdir)/wine.sym
183 install_includes
: dummy
184 [ -d
$(includedir) ] ||
$(MKDIR
) $(includedir)
185 cd
$(TOPSRCDIR
)/include; $(INSTALL_DATA
) windows.h wintypes.h
$(includedir)
187 # Don't just do a rm -rf on $(includedir) -- don't want to wipe out
188 # anything extra the user may have put there.
189 uninstall_includes
: dummy
190 $(RM
) $(includedir)/windows.h
$(includedir)/wintypes.h
196 install_programs
: dummy
197 @cd programs
; $(SUBMAKE
) install
199 uninstall_programs
: dummy
200 @cd programs
; $(SUBMAKE
) uninstall
203 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) install) || exit
1; done
206 for i in
$(INSTALLSUBDIRS
); do
(cd
$$i && $(MAKE
) uninstall) || exit
1; done
209 for i in
$(DEPENDSUBDIRS
); do
(cd
$$i && $(MAKE
) depend
) || exit
1; done
212 etags
`find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
215 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/man3w
216 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) man
); done
219 -$(MKDIR
) $(TOPOBJDIR
)/documentation
/html
220 for i in
$(LIBSUBDIRS
); do
(cd
$$i && $(MAKE
) html
); done
223 for i in
$(ALLSUBDIRS
); do
(cd
$$i; $(MAKE
) clean) || exit
1; done
224 for i in
include; do
(cd
$$i; $(RM
) *.o \
#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
225 $(RM
) wine wine.sym libwine.a libwine.so
.1.0 TAGS .
#*
228 $(RM
) config.
* Make.rules
include/config.h
229 $(RM
) `find . \( -name Makefile -o -size 0 \) -print`
231 configure
: configure.in
234 include/config.h.in
: configure.in
include/acconfig.h
235 autoheader
-l
include