Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 1 | # This Makefile understands the following targets: |
| 2 | # |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 3 | # 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 Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 8 | # install-lib: install libraries needed to run applications |
| 9 | # install-dev: install development environment |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 10 | # 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 Griffiths | 35345f2 | 2003-03-15 19:48:34 +0000 | [diff] [blame] | 15 | # htmlpages: compile html pages for Wine API |
Hans Leidekker | 14a9216 | 2003-04-14 21:35:14 +0000 | [diff] [blame] | 16 | # sgmlpages: compile sgml source for the Wine API Guide |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 17 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 18 | # Directories |
| 19 | |
| 20 | TOPSRCDIR = @top_srcdir@ |
| 21 | TOPOBJDIR = . |
| 22 | SRCDIR = @srcdir@ |
| 23 | VPATH = @srcdir@ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 24 | LIBEXT = @LIBEXT@ |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 25 | LDCONFIG = @LDCONFIG@ |
Marcus Meissner | c6476e9 | 2002-06-04 00:59:57 +0000 | [diff] [blame] | 26 | LDD = @LDD@ |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 27 | MODULE = none |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 28 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 29 | # Sub-directories to run make depend/clean into |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 30 | SUBDIRS = \ |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 31 | dlls \ |
| 32 | documentation \ |
| 33 | include \ |
Alexandre Julliard | 6a9fe36 | 2003-03-19 22:09:16 +0000 | [diff] [blame] | 34 | libs \ |
Alexandre Julliard | 357c740 | 2003-11-06 01:17:56 +0000 | [diff] [blame] | 35 | loader \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 36 | programs \ |
| 37 | server \ |
Alexandre Julliard | 7ab9a71 | 2003-03-21 05:06:48 +0000 | [diff] [blame] | 38 | tools |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 39 | |
| 40 | # Sub-directories to install for install-lib |
| 41 | INSTALLLIBSUBDIRS = \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 42 | documentation \ |
Alexandre Julliard | 357c740 | 2003-11-06 01:17:56 +0000 | [diff] [blame] | 43 | loader \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 44 | programs \ |
Alexandre Julliard | 7ab9a71 | 2003-03-21 05:06:48 +0000 | [diff] [blame] | 45 | server |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 46 | |
| 47 | # Sub-directories to install for install-dev |
Alexandre Julliard | 6692d39 | 2003-03-20 01:30:11 +0000 | [diff] [blame] | 48 | INSTALLDEVSUBDIRS = include tools |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 49 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 50 | # Sub-directories to install for both install-lib and install-dev |
Alexandre Julliard | 6a9fe36 | 2003-03-19 22:09:16 +0000 | [diff] [blame] | 51 | INSTALLBOTHSUBDIRS = dlls libs |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 52 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 53 | INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS) |
| 54 | |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 55 | # Sub-directories to run make test into |
| 56 | TESTSUBDIRS = \ |
Alexandre Julliard | 019a7f3 | 2002-05-08 00:36:10 +0000 | [diff] [blame] | 57 | dlls \ |
| 58 | programs |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 59 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 60 | all: Make.rules wine |
Pavel Roskin | 74197cb | 1999-07-31 19:25:22 +0000 | [diff] [blame] | 61 | @echo "Wine build complete." |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 62 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 63 | WINAPI_CHECK_EXTRA_FLAGS = --global |
| 64 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 65 | @MAKE_RULES@ |
| 66 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 67 | Make.rules: Make.rules.in configure |
| 68 | @echo $? is newer than 'Make.rules', please rerun ./configure! |
| 69 | @exit 1 |
| 70 | |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 71 | wine: $(WINEWRAPPER) |
| 72 | $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@ |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 73 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 74 | # Installation rules |
| 75 | |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 76 | install-aclocal: dummy |
| 77 | $(MKINSTALLDIRS) $(datadir)/aclocal |
| 78 | $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4 |
| 79 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 80 | install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 81 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 82 | install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 83 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 84 | install:: install-lib install-dev install-aclocal |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 85 | -$(LDCONFIG) |
Marcus Meissner | c6476e9 | 2002-06-04 00:59:57 +0000 | [diff] [blame] | 86 | @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 Mohr | c08b948 | 2003-04-04 22:12:21 +0000 | [diff] [blame] | 92 | echo " Add the line '$(libdir)' to /etc/ld.so.conf and run /sbin/ldconfig" ; \ |
Marcus Meissner | c6476e9 | 2002-06-04 00:59:57 +0000 | [diff] [blame] | 93 | echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \ |
| 94 | echo "*************************************************" ; \ |
| 95 | echo "*************************************************" ; \ |
| 96 | fi |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 97 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 98 | uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__) |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 99 | $(RM) $(datadir)/aclocal/wine.m4 |
Alexandre Julliard | 1af344a | 2004-02-28 01:51:18 +0000 | [diff] [blame] | 100 | -rmdir $(datadir)/wine $(datadir)/aclocal |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 101 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 102 | .PHONY: install-aclocal |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 103 | |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 104 | # Dependencies between directories |
| 105 | |
Alexandre Julliard | 5b80ce3 | 2002-07-01 18:23:38 +0000 | [diff] [blame] | 106 | all: $(SUBDIRS) |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 107 | dlls: libs tools |
Alexandre Julliard | 357c740 | 2003-11-06 01:17:56 +0000 | [diff] [blame] | 108 | loader server: libs tools |
Alexandre Julliard | e8dae9c | 2003-10-11 01:00:35 +0000 | [diff] [blame] | 109 | programs: dlls libs tools |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 110 | tools: libs |
Alexandre Julliard | 000c13a | 2000-11-09 20:31:18 +0000 | [diff] [blame] | 111 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 112 | dlls/__install-lib__ dlls/__install-dev__: libs tools |
| 113 | libs/__install-lib__ libs/__install-dev__: libs |
Alexandre Julliard | 357c740 | 2003-11-06 01:17:56 +0000 | [diff] [blame] | 114 | loader/__install__ server/__install__: libs tools |
Alexandre Julliard | e8dae9c | 2003-10-11 01:00:35 +0000 | [diff] [blame] | 115 | programs/__install__: libs tools dlls/__install-lib__ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 116 | tools/__install__: tools |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 117 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 118 | # Test rules |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 119 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 120 | checklink:: $(TESTSUBDIRS:%=%/__checklink__) |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 121 | |
Alexandre Julliard | 44519bd | 2002-11-11 21:14:25 +0000 | [diff] [blame] | 122 | check test:: wine $(TESTSUBDIRS:%=%/__test__) |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 123 | |
Alexandre Julliard | af9e293 | 2004-04-19 23:10:11 +0000 | [diff] [blame] | 124 | crosstest:: tools $(TESTSUBDIRS:%=%/__crosstest__) |
Alexandre Julliard | c3c587e | 2002-09-06 19:46:00 +0000 | [diff] [blame] | 125 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 126 | # Misc rules |
| 127 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 128 | TAGS etags: |
Mike Hearn | 35645ca | 2003-11-04 04:20:02 +0000 | [diff] [blame] | 129 | find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | etags - |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 130 | |
Christoph Frick | db9692d | 2003-01-05 01:05:13 +0000 | [diff] [blame] | 131 | tags ctags: |
Shachar Shemesh | 6ce99f2 | 2003-11-26 03:36:50 +0000 | [diff] [blame] | 132 | find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | ctags --c-types=+px -L - |
Christoph Frick | db9692d | 2003-01-05 01:05:13 +0000 | [diff] [blame] | 133 | |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 134 | manpages: |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 135 | $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w |
Alexandre Julliard | e048ada | 2003-03-23 20:00:02 +0000 | [diff] [blame] | 136 | cd dlls && $(MAKE) man |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 137 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 138 | htmlpages: |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 139 | $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html |
Jon Griffiths | 35345f2 | 2003-03-15 19:48:34 +0000 | [diff] [blame] | 140 | cd dlls && $(MAKE) doc-html |
| 141 | |
| 142 | sgmlpages: |
| 143 | $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/api-guide |
| 144 | cd dlls && $(MAKE) doc-sgml |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 145 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 146 | clean:: |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 147 | $(RM) wine |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 148 | |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 149 | distclean: clean |
Alexandre Julliard | 2e4164f | 2003-05-11 03:04:07 +0000 | [diff] [blame] | 150 | $(RM) config.* configure.lineno TAGS tags Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules libs/Makelib.rules include/config.h |
Alexandre Julliard | 9a2cc78 | 2002-04-12 00:11:57 +0000 | [diff] [blame] | 151 | $(RM) -r autom4te.cache |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 152 | $(RM) `find . \( -name Makefile -o -size 0 \) -print` |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 153 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 154 | .PHONY: manpages htmlpages distclean |
| 155 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 156 | ### Dependencies: |