blob: ede2e78fcc88921b63e037c099b6fce0648e98aa [file] [log] [blame]
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001# This Makefile understands the following targets:
2#
Alexandre Julliard13b0c092002-01-10 03:30:21 +00003# all (default): build wine
4# clean: remove all intermediate files
5# distclean: also remove all files created by configure
6# test: run tests
7# testclean: clean test results to force running all tests again
Alexandre Julliardf673b712002-06-14 23:48:27 +00008# install-lib: install libraries needed to run applications
9# install-dev: install development environment
Alexandre Julliard13b0c092002-01-10 03:30:21 +000010# install: install everything
11# uninstall: uninstall everything
12# depend: create the dependencies
13# etags: create a TAGS file for Emacs.
14# manpages: compile manpages for Wine API
Jon Griffiths35345f22003-03-15 19:48:34 +000015# htmlpages: compile html pages for Wine API
Hans Leidekker14a92162003-04-14 21:35:14 +000016# sgmlpages: compile sgml source for the Wine API Guide
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000017
Alexandre Julliard641ee761997-08-04 16:34:36 +000018# Directories
19
20TOPSRCDIR = @top_srcdir@
21TOPOBJDIR = .
22SRCDIR = @srcdir@
23VPATH = @srcdir@
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000024LIBEXT = @LIBEXT@
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +000025LDCONFIG = @LDCONFIG@
Marcus Meissnerc6476e92002-06-04 00:59:57 +000026LDD = @LDD@
Alexandre Julliard35363162002-05-22 21:32:49 +000027MODULE = none
Alexandre Julliard641ee761997-08-04 16:34:36 +000028
Alexandre Julliardf673b712002-06-14 23:48:27 +000029# Sub-directories to run make depend/clean into
Alexandre Julliardc53ceba2000-04-09 18:19:59 +000030SUBDIRS = \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000031 dlls \
32 documentation \
33 include \
Alexandre Julliard6a9fe362003-03-19 22:09:16 +000034 libs \
Alexandre Julliard357c7402003-11-06 01:17:56 +000035 loader \
Alexandre Julliardf673b712002-06-14 23:48:27 +000036 programs \
37 server \
Alexandre Julliard7ab9a712003-03-21 05:06:48 +000038 tools
Alexandre Julliardf673b712002-06-14 23:48:27 +000039
40# Sub-directories to install for install-lib
41INSTALLLIBSUBDIRS = \
Alexandre Julliardf673b712002-06-14 23:48:27 +000042 documentation \
Alexandre Julliard357c7402003-11-06 01:17:56 +000043 loader \
Alexandre Julliardf673b712002-06-14 23:48:27 +000044 programs \
Alexandre Julliard7ab9a712003-03-21 05:06:48 +000045 server
Alexandre Julliardf673b712002-06-14 23:48:27 +000046
47# Sub-directories to install for install-dev
Alexandre Julliard6692d392003-03-20 01:30:11 +000048INSTALLDEVSUBDIRS = include tools
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000049
Alexandre Julliardada5e652002-12-12 22:03:14 +000050# Sub-directories to install for both install-lib and install-dev
Alexandre Julliard6a9fe362003-03-19 22:09:16 +000051INSTALLBOTHSUBDIRS = dlls libs
Alexandre Julliardada5e652002-12-12 22:03:14 +000052
Alexandre Julliardf673b712002-06-14 23:48:27 +000053INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
54
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000055# Sub-directories to run make test into
56TESTSUBDIRS = \
Alexandre Julliard019a7f32002-05-08 00:36:10 +000057 dlls \
58 programs
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000059
Alexandre Julliardf673b712002-06-14 23:48:27 +000060all: Make.rules wine
Pavel Roskin74197cb1999-07-31 19:25:22 +000061 @echo "Wine build complete."
Alexandre Julliard808cb041995-08-17 17:11:36 +000062
Patrik Stridvall385dc181999-09-29 10:24:19 +000063WINAPI_CHECK_EXTRA_FLAGS = --global
64
Alexandre Julliard641ee761997-08-04 16:34:36 +000065@MAKE_RULES@
66
Marcus Meissnerca004e51999-01-03 12:26:22 +000067Make.rules: Make.rules.in configure
68 @echo $? is newer than 'Make.rules', please rerun ./configure!
69 @exit 1
70
Alexandre Julliard35363162002-05-22 21:32:49 +000071wine: $(WINEWRAPPER)
72 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000073
Alexandre Julliardf673b712002-06-14 23:48:27 +000074# Installation rules
75
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000076install-aclocal: dummy
77 $(MKINSTALLDIRS) $(datadir)/aclocal
78 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
79
Alexandre Julliardada5e652002-12-12 22:03:14 +000080install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
Alexandre Julliardf673b712002-06-14 23:48:27 +000081
Alexandre Julliardada5e652002-12-12 22:03:14 +000082install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal
Alexandre Julliardf673b712002-06-14 23:48:27 +000083
Alexandre Julliardada5e652002-12-12 22:03:14 +000084install:: install-lib install-dev install-aclocal
Alexandre Julliard2f158c22000-06-14 21:45:38 +000085 -$(LDCONFIG)
Marcus Meissnerc6476e92002-06-04 00:59:57 +000086 @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`"; \
87 then \
88 echo "*************************************************" ; \
89 echo "*************************************************" ; \
90 echo "The installed Wine libraries will not be found!" ; \
91 echo "You can either:" ; \
Andreas Mohrc08b9482003-04-04 22:12:21 +000092 echo " Add the line '$(libdir)' to /etc/ld.so.conf and run /sbin/ldconfig" ; \
Marcus Meissnerc6476e92002-06-04 00:59:57 +000093 echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
94 echo "*************************************************" ; \
95 echo "*************************************************" ; \
96 fi
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000097
Alexandre Julliardada5e652002-12-12 22:03:14 +000098uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000099 $(RM) $(datadir)/aclocal/wine.m4
Alexandre Julliard1af344a2004-02-28 01:51:18 +0000100 -rmdir $(datadir)/wine $(datadir)/aclocal
Alexandre Julliard1d8d0172002-08-02 19:34:21 +0000101
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000102.PHONY: install-aclocal
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000103
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000104# Dependencies between directories
105
Alexandre Julliard5b80ce32002-07-01 18:23:38 +0000106all: $(SUBDIRS)
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000107dlls: libs tools
Alexandre Julliard357c7402003-11-06 01:17:56 +0000108loader server: libs tools
Alexandre Julliarde8dae9c2003-10-11 01:00:35 +0000109programs: dlls libs tools
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000110tools: libs
Alexandre Julliard000c13a2000-11-09 20:31:18 +0000111
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000112dlls/__install-lib__ dlls/__install-dev__: libs tools
113libs/__install-lib__ libs/__install-dev__: libs
Alexandre Julliard357c7402003-11-06 01:17:56 +0000114loader/__install__ server/__install__: libs tools
Alexandre Julliarde8dae9c2003-10-11 01:00:35 +0000115programs/__install__: libs tools dlls/__install-lib__
Alexandre Julliardf673b712002-06-14 23:48:27 +0000116tools/__install__: tools
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000117
Alexandre Julliardf673b712002-06-14 23:48:27 +0000118# Test rules
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000119
Alexandre Julliardedeee892002-08-09 01:22:40 +0000120checklink:: $(TESTSUBDIRS:%=%/__checklink__)
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000121
Alexandre Julliard44519bd2002-11-11 21:14:25 +0000122check test:: wine $(TESTSUBDIRS:%=%/__test__)
Alexandre Julliard13b0c092002-01-10 03:30:21 +0000123
Alexandre Julliardaf9e2932004-04-19 23:10:11 +0000124crosstest:: tools $(TESTSUBDIRS:%=%/__crosstest__)
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000125
Alexandre Julliardf673b712002-06-14 23:48:27 +0000126# Misc rules
127
Alexandre Julliard641ee761997-08-04 16:34:36 +0000128TAGS etags:
Mike Hearn35645ca2003-11-04 04:20:02 +0000129 find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | etags -
Alexandre Julliard641ee761997-08-04 16:34:36 +0000130
Christoph Frickdb9692d2003-01-05 01:05:13 +0000131tags ctags:
Shachar Shemesh6ce99f22003-11-26 03:36:50 +0000132 find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | ctags --c-types=+px -L -
Christoph Frickdb9692d2003-01-05 01:05:13 +0000133
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000134manpages:
Alexandre Julliardce830a92002-05-09 04:31:39 +0000135 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
Alexandre Julliarde048ada2003-03-23 20:00:02 +0000136 cd dlls && $(MAKE) man
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000137
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000138htmlpages:
Alexandre Julliardce830a92002-05-09 04:31:39 +0000139 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
Jon Griffiths35345f22003-03-15 19:48:34 +0000140 cd dlls && $(MAKE) doc-html
141
142sgmlpages:
143 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/api-guide
144 cd dlls && $(MAKE) doc-sgml
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000145
Alexandre Julliard641ee761997-08-04 16:34:36 +0000146clean::
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000147 $(RM) wine
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000148
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000149distclean: clean
Alexandre Julliard2e4164f2003-05-11 03:04:07 +0000150 $(RM) config.* configure.lineno TAGS tags Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules libs/Makelib.rules include/config.h
Alexandre Julliard9a2cc782002-04-12 00:11:57 +0000151 $(RM) -r autom4te.cache
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000152 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000153
Alexandre Julliardf673b712002-06-14 23:48:27 +0000154.PHONY: manpages htmlpages distclean
155
Alexandre Julliard641ee761997-08-04 16:34:36 +0000156### Dependencies: