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 |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 15 | # |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 16 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 17 | # Directories |
| 18 | |
| 19 | TOPSRCDIR = @top_srcdir@ |
| 20 | TOPOBJDIR = . |
| 21 | SRCDIR = @srcdir@ |
| 22 | VPATH = @srcdir@ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 23 | LIBEXT = @LIBEXT@ |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 24 | LDCONFIG = @LDCONFIG@ |
Marcus Meissner | c6476e9 | 2002-06-04 00:59:57 +0000 | [diff] [blame] | 25 | LDD = @LDD@ |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 26 | MODULE = none |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 27 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 28 | # Sub-directories to run make depend/clean into |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 29 | SUBDIRS = \ |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 30 | dlls \ |
| 31 | documentation \ |
| 32 | include \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 33 | library \ |
| 34 | miscemu \ |
| 35 | ole \ |
| 36 | programs \ |
| 37 | server \ |
| 38 | tools \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 39 | unicode |
| 40 | |
| 41 | # Sub-directories to install for install-lib |
| 42 | INSTALLLIBSUBDIRS = \ |
| 43 | dlls \ |
| 44 | documentation \ |
| 45 | library \ |
| 46 | miscemu \ |
| 47 | programs \ |
| 48 | server \ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 49 | unicode |
| 50 | |
| 51 | # Sub-directories to install for install-dev |
| 52 | INSTALLDEVSUBDIRS = \ |
| 53 | include \ |
| 54 | ole \ |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 55 | tools |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +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 | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 64 | EMUOBJS = \ |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 65 | miscemu/miscemu.o |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 66 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 67 | all: Make.rules wine |
Pavel Roskin | 74197cb | 1999-07-31 19:25:22 +0000 | [diff] [blame] | 68 | @echo "Wine build complete." |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 69 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 70 | WINAPI_CHECK_EXTRA_FLAGS = --global |
| 71 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 72 | @MAKE_RULES@ |
| 73 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 74 | Make.rules: Make.rules.in configure |
| 75 | @echo $? is newer than 'Make.rules', please rerun ./configure! |
| 76 | @exit 1 |
| 77 | |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 78 | wine: $(WINEWRAPPER) |
| 79 | $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@ |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 80 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 81 | # Installation rules |
| 82 | |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 83 | install-aclocal: dummy |
| 84 | $(MKINSTALLDIRS) $(datadir)/aclocal |
| 85 | $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4 |
| 86 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 87 | install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) |
| 88 | |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 89 | install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) install-aclocal |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 90 | |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 91 | install:: install-aclocal |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 92 | -$(LDCONFIG) |
Marcus Meissner | c6476e9 | 2002-06-04 00:59:57 +0000 | [diff] [blame] | 93 | @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`"; \ |
| 94 | then \ |
| 95 | echo "*************************************************" ; \ |
| 96 | echo "*************************************************" ; \ |
| 97 | echo "The installed Wine libraries will not be found!" ; \ |
| 98 | echo "You can either:" ; \ |
| 99 | echo " Add the line '$(libdir)' to /etc/ld.so.conf" ; \ |
| 100 | echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \ |
| 101 | echo "*************************************************" ; \ |
| 102 | echo "*************************************************" ; \ |
| 103 | fi |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 104 | |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 105 | uninstall:: |
| 106 | $(RM) $(datadir)/aclocal/wine.m4 |
| 107 | -rmdir $(datadir)/aclocal |
| 108 | |
| 109 | .PHONY: install-aclocal install-lib install-dev |
Alexandre Julliard | c1bfca0 | 2002-03-20 22:19:06 +0000 | [diff] [blame] | 110 | |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 111 | # Dependencies between directories |
| 112 | |
Alexandre Julliard | 5b80ce3 | 2002-07-01 18:23:38 +0000 | [diff] [blame] | 113 | all: $(SUBDIRS) |
Alexandre Julliard | 4b9344e | 2002-09-25 03:29:55 +0000 | [diff] [blame] | 114 | dlls: library ole tools unicode |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 115 | server: library tools unicode |
Alexandre Julliard | 4b9344e | 2002-09-25 03:29:55 +0000 | [diff] [blame] | 116 | miscemu programs: dlls library ole tools unicode |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 117 | tools: library unicode |
Alexandre Julliard | 000c13a | 2000-11-09 20:31:18 +0000 | [diff] [blame] | 118 | |
Alexandre Julliard | 4b9344e | 2002-09-25 03:29:55 +0000 | [diff] [blame] | 119 | dlls/__install__: library ole tools unicode |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 120 | server/__install__: library tools unicode |
Alexandre Julliard | 4b9344e | 2002-09-25 03:29:55 +0000 | [diff] [blame] | 121 | miscemu/__install__ programs/__install__: library ole tools unicode dlls/__install__ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 122 | library/__install__: library |
| 123 | ole/__install__: ole |
| 124 | tools/__install__: tools |
| 125 | unicode/__install__: unicode |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 126 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 127 | # Test rules |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 128 | |
Alexandre Julliard | edeee89 | 2002-08-09 01:22:40 +0000 | [diff] [blame] | 129 | checklink:: $(TESTSUBDIRS:%=%/__checklink__) |
Alexandre Julliard | 3245991 | 2002-05-09 00:05:48 +0000 | [diff] [blame] | 130 | $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c && $(RM) checklink |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 131 | |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 132 | check test:: $(TESTSUBDIRS:%=%/__test__) |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 133 | |
Alexandre Julliard | c3c587e | 2002-09-06 19:46:00 +0000 | [diff] [blame] | 134 | crosstest:: $(TESTSUBDIRS:%=%/__crosstest__) |
| 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: |
Alexandre Julliard | ebcf38d | 2002-05-23 02:45:29 +0000 | [diff] [blame] | 139 | etags `find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.glue.c' -a -not -name '*.dbg.c' -print` |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 140 | |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 141 | manpages: |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 142 | $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 143 | for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 144 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 145 | htmlpages: |
Alexandre Julliard | ce830a9 | 2002-05-09 04:31:39 +0000 | [diff] [blame] | 146 | $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 147 | for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 148 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 149 | clean:: |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 150 | $(RM) wine |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 151 | |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 152 | distclean: clean |
Gerald Pfeifer | 5e0a0d2 | 2002-10-23 23:35:05 +0000 | [diff] [blame] | 153 | $(RM) config.* configure.lineno TAGS Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules include/config.h |
Alexandre Julliard | 9a2cc78 | 2002-04-12 00:11:57 +0000 | [diff] [blame] | 154 | $(RM) -r autom4te.cache |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 155 | $(RM) `find . \( -name Makefile -o -size 0 \) -print` |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 156 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 157 | .PHONY: manpages htmlpages distclean |
| 158 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 159 | ### Dependencies: |