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 | |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 29 | FONTSSUBDIRS = @FONTSSUBDIRS@ |
| 30 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 31 | # Sub-directories to run make depend/clean into |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 32 | SUBDIRS = \ |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 33 | dlls \ |
| 34 | documentation \ |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 35 | fonts \ |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 36 | include \ |
Alexandre Julliard | 6a9fe36 | 2003-03-19 22:09:16 +0000 | [diff] [blame] | 37 | libs \ |
Alexandre Julliard | 357c740 | 2003-11-06 01:17:56 +0000 | [diff] [blame] | 38 | loader \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 39 | programs \ |
| 40 | server \ |
Alexandre Julliard | 7ab9a71 | 2003-03-21 05:06:48 +0000 | [diff] [blame] | 41 | tools |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 42 | |
| 43 | # Sub-directories to install for install-lib |
| 44 | INSTALLLIBSUBDIRS = \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 45 | documentation \ |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 46 | $(FONTSSUBDIRS) \ |
Alexandre Julliard | 357c740 | 2003-11-06 01:17:56 +0000 | [diff] [blame] | 47 | loader \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 48 | programs \ |
Alexandre Julliard | 7ab9a71 | 2003-03-21 05:06:48 +0000 | [diff] [blame] | 49 | server |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 50 | |
| 51 | # Sub-directories to install for install-dev |
Alexandre Julliard | beac194 | 2005-03-02 12:18:55 +0000 | [diff] [blame] | 52 | INSTALLDEVSUBDIRS = include |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 53 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 54 | # Sub-directories to install for both install-lib and install-dev |
Alexandre Julliard | beac194 | 2005-03-02 12:18:55 +0000 | [diff] [blame] | 55 | INSTALLBOTHSUBDIRS = dlls libs tools |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 56 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 57 | INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS) |
| 58 | |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 59 | # Sub-directories to run make test into |
| 60 | TESTSUBDIRS = \ |
Alexandre Julliard | 019a7f3 | 2002-05-08 00:36:10 +0000 | [diff] [blame] | 61 | dlls \ |
| 62 | programs |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 63 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 64 | all: Make.rules wine |
Pavel Roskin | 74197cb | 1999-07-31 19:25:22 +0000 | [diff] [blame] | 65 | @echo "Wine build complete." |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 66 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 67 | WINAPI_CHECK_EXTRA_FLAGS = --global |
| 68 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 69 | @MAKE_RULES@ |
| 70 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 71 | Make.rules: Make.rules.in configure |
| 72 | @echo $? is newer than 'Make.rules', please rerun ./configure! |
| 73 | @exit 1 |
| 74 | |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 75 | wine: $(WINEWRAPPER) |
| 76 | $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@ |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 77 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 78 | # Installation rules |
| 79 | |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 80 | install-aclocal: dummy |
| 81 | $(MKINSTALLDIRS) $(datadir)/aclocal |
| 82 | $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4 |
| 83 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 84 | install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 85 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 86 | install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 87 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 88 | install:: install-lib install-dev install-aclocal |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 89 | -$(LDCONFIG) |
Marcus Meissner | c6476e9 | 2002-06-04 00:59:57 +0000 | [diff] [blame] | 90 | @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`"; \ |
| 91 | then \ |
| 92 | echo "*************************************************" ; \ |
| 93 | echo "*************************************************" ; \ |
| 94 | echo "The installed Wine libraries will not be found!" ; \ |
| 95 | echo "You can either:" ; \ |
Andreas Mohr | c08b948 | 2003-04-04 22:12:21 +0000 | [diff] [blame] | 96 | 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] | 97 | echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \ |
| 98 | echo "*************************************************" ; \ |
| 99 | echo "*************************************************" ; \ |
| 100 | fi |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 101 | |
Alexandre Julliard | ada5e65 | 2002-12-12 22:03:14 +0000 | [diff] [blame] | 102 | uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__) |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 103 | $(RM) $(datadir)/aclocal/wine.m4 |
Alexandre Julliard | 1af344a | 2004-02-28 01:51:18 +0000 | [diff] [blame] | 104 | -rmdir $(datadir)/wine $(datadir)/aclocal |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 105 | |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 106 | .PHONY: install-aclocal |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 107 | |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 108 | # Dependencies between directories |
| 109 | |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 110 | all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS) |
Alexandre Julliard | 233766a | 2004-09-20 21:48:42 +0000 | [diff] [blame] | 111 | dlls: include libs tools |
| 112 | fonts loader server: libs tools |
| 113 | programs: dlls include libs tools |
| 114 | include: libs tools |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 115 | tools: libs |
Alexandre Julliard | 000c13a | 2000-11-09 20:31:18 +0000 | [diff] [blame] | 116 | |
Francois Gouget | bff8cd1 | 2005-02-18 20:03:32 +0000 | [diff] [blame] | 117 | dlls/__install-lib__ dlls/__install-dev__: libs tools include |
Alexandre Julliard | 233766a | 2004-09-20 21:48:42 +0000 | [diff] [blame] | 118 | include/__install__: include libs tools |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 119 | libs/__install-lib__ libs/__install-dev__: libs |
Huw Davies | 00acb5f | 2004-08-17 22:33:14 +0000 | [diff] [blame] | 120 | fonts/__install__ loader/__install__ server/__install__: libs tools |
Francois Gouget | bff8cd1 | 2005-02-18 20:03:32 +0000 | [diff] [blame] | 121 | programs/__install__: libs tools include dlls/__install-lib__ |
Alexandre Julliard | beac194 | 2005-03-02 12:18:55 +0000 | [diff] [blame] | 122 | tools/__install-lib__ tools/__install-dev__: tools |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 123 | |
Alexandre Julliard | 3a3307d | 2004-10-07 03:12:44 +0000 | [diff] [blame] | 124 | $(SUBDIRS:%=%/__depend__): tools include |
Alexandre Julliard | 4746120 | 2004-09-21 00:35:02 +0000 | [diff] [blame] | 125 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 126 | # Test rules |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 127 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 128 | checklink:: $(TESTSUBDIRS:%=%/__checklink__) |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 129 | |
Hans Leidekker | 954a4f8 | 2004-10-05 04:10:27 +0000 | [diff] [blame] | 130 | check test:: $(TESTSUBDIRS:%=%/__test__) |
| 131 | $(TESTSUBDIRS:%=%/__test__): wine |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 132 | |
Hans Leidekker | 954a4f8 | 2004-10-05 04:10:27 +0000 | [diff] [blame] | 133 | crosstest:: $(TESTSUBDIRS:%=%/__crosstest__) |
| 134 | $(TESTSUBDIRS:%=%/__crosstest__): tools include |
Alexandre Julliard | c3c587e | 2002-09-06 19:46:00 +0000 | [diff] [blame] | 135 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 136 | # Misc rules |
| 137 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 138 | TAGS etags: |
Mike Hearn | 35645ca | 2003-11-04 04:20:02 +0000 | [diff] [blame] | 139 | 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] | 140 | |
Christoph Frick | db9692d | 2003-01-05 01:05:13 +0000 | [diff] [blame] | 141 | tags ctags: |
Shachar Shemesh | 6ce99f2 | 2003-11-26 03:36:50 +0000 | [diff] [blame] | 142 | 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] | 143 | |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 144 | manpages: |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 145 | $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w |
Alexandre Julliard | e048ada | 2003-03-23 20:00:02 +0000 | [diff] [blame] | 146 | cd dlls && $(MAKE) man |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 147 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 148 | htmlpages: |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 149 | $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html |
Jon Griffiths | 35345f2 | 2003-03-15 19:48:34 +0000 | [diff] [blame] | 150 | cd dlls && $(MAKE) doc-html |
| 151 | |
| 152 | sgmlpages: |
| 153 | $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/api-guide |
| 154 | cd dlls && $(MAKE) doc-sgml |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 155 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 156 | clean:: |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 157 | $(RM) wine |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 158 | |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 159 | distclean: clean |
Alexandre Julliard | 2e4164f | 2003-05-11 03:04:07 +0000 | [diff] [blame] | 160 | $(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] | 161 | $(RM) -r autom4te.cache |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 162 | $(RM) `find . \( -name Makefile -o -size 0 \) -print` |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 163 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 164 | .PHONY: manpages htmlpages distclean |
| 165 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 166 | ### Dependencies: |