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 |
Detlef Riekenberg | 79d72ce | 2005-08-03 19:15:03 +0000 | [diff] [blame] | 8 | # crosstest: build tests as native windows applications (requires MinGW) |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 9 | # install-lib: install libraries needed to run applications |
| 10 | # install-dev: install development environment |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 11 | # install: install everything |
| 12 | # uninstall: uninstall everything |
| 13 | # depend: create the dependencies |
Detlef Riekenberg | 5e5a8df | 2006-06-21 21:43:00 +0200 | [diff] [blame] | 14 | # ctags: create a tags file for vim and others. |
Alexandre Julliard | 13b0c09 | 2002-01-10 03:30:21 +0000 | [diff] [blame] | 15 | # etags: create a TAGS file for Emacs. |
| 16 | # manpages: compile manpages for Wine API |
Jon Griffiths | 35345f2 | 2003-03-15 19:48:34 +0000 | [diff] [blame] | 17 | # htmlpages: compile html pages for Wine API |
Hans Leidekker | 14a9216 | 2003-04-14 21:35:14 +0000 | [diff] [blame] | 18 | # sgmlpages: compile sgml source for the Wine API Guide |
Stefan Stranz | c89c2dd | 2009-06-05 20:57:24 -0600 | [diff] [blame] | 19 | # xmlpages: compile xml source for the Wine API Guide |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 20 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 21 | # Directories |
| 22 | |
| 23 | TOPSRCDIR = @top_srcdir@ |
| 24 | TOPOBJDIR = . |
| 25 | SRCDIR = @srcdir@ |
| 26 | VPATH = @srcdir@ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 27 | LIBEXT = @LIBEXT@ |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 28 | MODULE = none |
Alexandre Julliard | 7035aa5 | 2006-12-27 21:23:36 +0100 | [diff] [blame] | 29 | PROGRAMS = wine |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 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 | |
Alexandre Julliard | b3ec2e5 | 2008-08-25 14:27:03 +0200 | [diff] [blame] | 43 | # Sub-directories to run make install/uninstall into |
Alexandre Julliard | 6de0af1 | 2008-08-25 14:41:03 +0200 | [diff] [blame] | 44 | INSTALLSUBDIRS = @ALL_TOP_DIRS@ |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 45 | |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 46 | # Sub-directories to run make test into |
Alexandre Julliard | 15c52a7 | 2006-04-11 14:41:39 +0200 | [diff] [blame] | 47 | TESTSUBDIRS = dlls |
Alexandre Julliard | d7c606d | 2002-04-02 02:58:45 +0000 | [diff] [blame] | 48 | |
Alexandre Julliard | 7035aa5 | 2006-12-27 21:23:36 +0100 | [diff] [blame] | 49 | all: Make.rules $(PROGRAMS) |
Pavel Roskin | 74197cb | 1999-07-31 19:25:22 +0000 | [diff] [blame] | 50 | @echo "Wine build complete." |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 51 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 52 | WINAPI_CHECK_EXTRA_FLAGS = --global |
| 53 | |
Alexandre Julliard | 2886e9b | 2006-08-07 17:48:18 +0200 | [diff] [blame] | 54 | INSTALLDIRS = $(DESTDIR)$(datadir)/aclocal |
| 55 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 56 | @MAKE_RULES@ |
| 57 | |
Alexandre Julliard | 69b032b | 2008-03-20 13:01:31 +0100 | [diff] [blame] | 58 | $(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4 |
| 59 | cd $(SRCDIR) && autoconf --warnings=all |
| 60 | |
| 61 | $(SRCDIR)/include/config.h.in: @MAINTAINER_MODE@ include/stamp-h.in |
| 62 | $(SRCDIR)/include/stamp-h.in: configure.ac aclocal.m4 |
| 63 | cd $(SRCDIR) && autoheader --warnings=all |
| 64 | @echo timestamp > $@ |
| 65 | |
Alexandre Julliard | 5ea4e5b | 2006-09-14 09:41:21 +0200 | [diff] [blame] | 66 | config.status: configure |
Alexandre Julliard | 397e569 | 2006-09-14 09:41:33 +0200 | [diff] [blame] | 67 | @./config.status --recheck |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 68 | |
Alexandre Julliard | c4704c2 | 2006-09-22 09:33:00 +0200 | [diff] [blame] | 69 | include/config.h: include/stamp-h |
| 70 | include/stamp-h: include/config.h.in config.status |
| 71 | @./config.status include/config.h include/stamp-h |
| 72 | |
Alexandre Julliard | 3536316 | 2002-05-22 21:32:49 +0000 | [diff] [blame] | 73 | wine: $(WINEWRAPPER) |
| 74 | $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@ |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 75 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 76 | # Installation rules |
| 77 | |
Alexandre Julliard | 9064777 | 2009-08-13 19:48:42 +0200 | [diff] [blame] | 78 | install-aclocal: $(DESTDIR)$(datadir)/aclocal dummy |
| 79 | |
| 80 | .PHONY: install-aclocal |
| 81 | |
| 82 | @WOW64_DISABLE@ install install-dev:: install-aclocal |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 83 | |
Alexandre Julliard | b3ec2e5 | 2008-08-25 14:27:03 +0200 | [diff] [blame] | 84 | uninstall:: |
Mike Frysinger | 5392844 | 2006-02-14 13:51:38 +0100 | [diff] [blame] | 85 | $(RM) $(DESTDIR)$(datadir)/aclocal/wine.m4 |
| 86 | -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/aclocal |
Alexandre Julliard | 1d8d017 | 2002-08-02 19:34:21 +0000 | [diff] [blame] | 87 | |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 88 | # Dependencies between directories |
| 89 | |
Alexandre Julliard | b3ec2e5 | 2008-08-25 14:27:03 +0200 | [diff] [blame] | 90 | all: $(INSTALLSUBDIRS) |
Alexandre Julliard | 233766a | 2004-09-20 21:48:42 +0000 | [diff] [blame] | 91 | dlls: include libs tools |
| 92 | fonts loader server: libs tools |
| 93 | programs: dlls include libs tools |
| 94 | include: libs tools |
Alexandre Julliard | 2d1c790 | 2003-03-22 20:40:48 +0000 | [diff] [blame] | 95 | tools: libs |
Alexandre Julliard | 000c13a | 2000-11-09 20:31:18 +0000 | [diff] [blame] | 96 | |
Alexandre Julliard | b3ec2e5 | 2008-08-25 14:27:03 +0200 | [diff] [blame] | 97 | dlls/__install__ dlls/__install-lib__ dlls/__install-dev__: libs tools include |
| 98 | fonts/__install__ fonts/__install-lib__: libs tools |
| 99 | include/__install__ include/__install-dev__: include libs tools |
| 100 | libs/__install__ libs/__install-lib__ libs/__install-dev__: libs |
| 101 | loader/__install__ loader/__install-lib__: libs tools |
| 102 | server/__install__ server/__install-lib__: libs tools |
Alexandre Julliard | 78c79ba | 2008-09-08 12:37:56 +0200 | [diff] [blame] | 103 | programs/__install__: libs tools include dlls/__install__ |
| 104 | programs/__install-lib__: libs tools include dlls/__install-lib__ |
Alexandre Julliard | b3ec2e5 | 2008-08-25 14:27:03 +0200 | [diff] [blame] | 105 | tools/__install__ tools/__install-lib__ tools/__install-dev__: tools |
Alexandre Julliard | 2fa4f76 | 2000-10-31 00:20:51 +0000 | [diff] [blame] | 106 | |
Alexandre Julliard | 8598a4c | 2006-09-14 09:40:00 +0200 | [diff] [blame] | 107 | RECURSE_TARGETS = \ |
| 108 | $(SUBDIRS) \ |
| 109 | $(SUBDIRS:%=%/__clean__) \ |
| 110 | $(SUBDIRS:%=%/__depend__) \ |
| 111 | $(SUBDIRS:%=%/__install-dev__) \ |
| 112 | $(SUBDIRS:%=%/__install-lib__) \ |
| 113 | $(SUBDIRS:%=%/__install__) \ |
| 114 | $(SUBDIRS:%=%/__uninstall__) \ |
| 115 | $(TESTSUBDIRS:%=%/__crosstest__) \ |
| 116 | $(TESTSUBDIRS:%=%/__test__) \ |
| 117 | $(TESTSUBDIRS:%=%/__testclean__) |
| 118 | |
Alexandre Julliard | 69b032b | 2008-03-20 13:01:31 +0100 | [diff] [blame] | 119 | depend $(RECURSE_TARGETS): $(MAKEDEP) |
Alexandre Julliard | ade98b9 | 2006-09-11 15:43:59 +0200 | [diff] [blame] | 120 | |
Alexandre Julliard | 69b032b | 2008-03-20 13:01:31 +0100 | [diff] [blame] | 121 | $(MAKEDEP): include/config.h |
Alexandre Julliard | b860c4a | 2009-09-01 22:36:13 +0200 | [diff] [blame^] | 122 | @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT) |
Alexandre Julliard | 4746120 | 2004-09-21 00:35:02 +0000 | [diff] [blame] | 123 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 124 | # Test rules |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 125 | |
Hans Leidekker | 954a4f8 | 2004-10-05 04:10:27 +0000 | [diff] [blame] | 126 | $(TESTSUBDIRS:%=%/__test__): wine |
Hans Leidekker | 954a4f8 | 2004-10-05 04:10:27 +0000 | [diff] [blame] | 127 | $(TESTSUBDIRS:%=%/__crosstest__): tools include |
Alexandre Julliard | c3c587e | 2002-09-06 19:46:00 +0000 | [diff] [blame] | 128 | |
Alexandre Julliard | f673b71 | 2002-06-14 23:48:27 +0000 | [diff] [blame] | 129 | # Misc rules |
| 130 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 131 | TAGS etags: |
Alexandre Julliard | 7b28982 | 2007-03-27 21:45:54 +0200 | [diff] [blame] | 132 | $(RM) TAGS |
Alexandre Julliard | e43004a | 2008-07-07 12:17:00 +0200 | [diff] [blame] | 133 | (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 134 | |
Christoph Frick | db9692d | 2003-01-05 01:05:13 +0000 | [diff] [blame] | 135 | tags ctags: |
Alexandre Julliard | 7b28982 | 2007-03-27 21:45:54 +0200 | [diff] [blame] | 136 | $(RM) tags |
Alexandre Julliard | e43004a | 2008-07-07 12:17:00 +0200 | [diff] [blame] | 137 | (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a |
Christoph Frick | db9692d | 2003-01-05 01:05:13 +0000 | [diff] [blame] | 138 | |
Stefan Stranz | c89c2dd | 2009-06-05 20:57:24 -0600 | [diff] [blame] | 139 | manpages htmlpages sgmlpages xmlpages: dummy |
Alexandre Julliard | 5012c17 | 2006-08-07 13:54:09 +0200 | [diff] [blame] | 140 | @cd documentation && $(MAKE) $@ |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 141 | |
Alexandre Julliard | 5ea4e5b | 2006-09-14 09:41:21 +0200 | [diff] [blame] | 142 | distclean:: clean |
Alexandre Julliard | c4704c2 | 2006-09-22 09:33:00 +0200 | [diff] [blame] | 143 | $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h |
Alexandre Julliard | 9a2cc78 | 2002-04-12 00:11:57 +0000 | [diff] [blame] | 144 | $(RM) -r autom4te.cache |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 145 | |
Stefan Stranz | c89c2dd | 2009-06-05 20:57:24 -0600 | [diff] [blame] | 146 | .PHONY: manpages htmlpages sgmlpages xmlpages distclean |
Alexandre Julliard | 5ea4e5b | 2006-09-14 09:41:21 +0200 | [diff] [blame] | 147 | |
Alexandre Julliard | a360e93 | 2008-08-20 16:02:37 +0200 | [diff] [blame] | 148 | # Makefile rules |
Alexandre Julliard | 5ea4e5b | 2006-09-14 09:41:21 +0200 | [diff] [blame] | 149 | |
Alexandre Julliard | a360e93 | 2008-08-20 16:02:37 +0200 | [diff] [blame] | 150 | ALL_MAKERULES = @ALL_MAKERULES@ |
| 151 | ALL_MAKEFILES = @ALL_MAKEFILES@ |
Alexandre Julliard | 5ea4e5b | 2006-09-14 09:41:21 +0200 | [diff] [blame] | 152 | |
Alexandre Julliard | a360e93 | 2008-08-20 16:02:37 +0200 | [diff] [blame] | 153 | Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES): config.status |
Alexandre Julliard | 5ea4e5b | 2006-09-14 09:41:21 +0200 | [diff] [blame] | 154 | @./config.status $@ |
Alexandre Julliard | 6c0921c | 2007-03-30 12:35:25 +0200 | [diff] [blame] | 155 | .INIT: Makefile |
| 156 | .BEGIN: Makefile |
Alexandre Julliard | 566cb8c | 2009-03-03 16:34:52 +0100 | [diff] [blame] | 157 | .MAKEFILEDEPS: |
Alexandre Julliard | 5ea4e5b | 2006-09-14 09:41:21 +0200 | [diff] [blame] | 158 | |
| 159 | $(RECURSE_TARGETS) $(MAKEDEP): $(ALL_MAKEFILES) |
| 160 | |
| 161 | distclean:: |
Alexandre Julliard | a360e93 | 2008-08-20 16:02:37 +0200 | [diff] [blame] | 162 | $(RM) Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES) |
Alexandre Julliard | 5ea4e5b | 2006-09-14 09:41:21 +0200 | [diff] [blame] | 163 | |
Alexandre Julliard | a360e93 | 2008-08-20 16:02:37 +0200 | [diff] [blame] | 164 | @ALL_MAKEFILE_DEPENDS@ |