blob: 2d2d8b77fd5cd6b67c19c93aae5111940a7a2713 [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
Detlef Riekenberg79d72ce2005-08-03 19:15:03 +00008# crosstest: build tests as native windows applications (requires MinGW)
Alexandre Julliardf673b712002-06-14 23:48:27 +00009# install-lib: install libraries needed to run applications
10# install-dev: install development environment
Alexandre Julliard13b0c092002-01-10 03:30:21 +000011# install: install everything
12# uninstall: uninstall everything
13# depend: create the dependencies
Detlef Riekenberg5e5a8df2006-06-21 21:43:00 +020014# ctags: create a tags file for vim and others.
Alexandre Julliard13b0c092002-01-10 03:30:21 +000015# etags: create a TAGS file for Emacs.
16# manpages: compile manpages for Wine API
Jon Griffiths35345f22003-03-15 19:48:34 +000017# htmlpages: compile html pages for Wine API
Hans Leidekker14a92162003-04-14 21:35:14 +000018# sgmlpages: compile sgml source for the Wine API Guide
Stefan Stranzc89c2dd2009-06-05 20:57:24 -060019# xmlpages: compile xml source for the Wine API Guide
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000020
Alexandre Julliard641ee761997-08-04 16:34:36 +000021# Directories
22
23TOPSRCDIR = @top_srcdir@
24TOPOBJDIR = .
25SRCDIR = @srcdir@
26VPATH = @srcdir@
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000027LIBEXT = @LIBEXT@
Alexandre Julliard35363162002-05-22 21:32:49 +000028MODULE = none
Alexandre Julliard7035aa52006-12-27 21:23:36 +010029PROGRAMS = wine
Alexandre Julliard641ee761997-08-04 16:34:36 +000030
Alexandre Julliardf673b712002-06-14 23:48:27 +000031# Sub-directories to run make depend/clean into
Alexandre Julliardc53ceba2000-04-09 18:19:59 +000032SUBDIRS = \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000033 dlls \
34 documentation \
Huw Davies00acb5f2004-08-17 22:33:14 +000035 fonts \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000036 include \
Alexandre Julliard6a9fe362003-03-19 22:09:16 +000037 libs \
Alexandre Julliard357c7402003-11-06 01:17:56 +000038 loader \
Alexandre Julliardf673b712002-06-14 23:48:27 +000039 programs \
40 server \
Alexandre Julliard7ab9a712003-03-21 05:06:48 +000041 tools
Alexandre Julliardf673b712002-06-14 23:48:27 +000042
Alexandre Julliardb3ec2e52008-08-25 14:27:03 +020043# Sub-directories to run make install/uninstall into
Alexandre Julliard6de0af12008-08-25 14:41:03 +020044INSTALLSUBDIRS = @ALL_TOP_DIRS@
Alexandre Julliardf673b712002-06-14 23:48:27 +000045
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000046# Sub-directories to run make test into
Alexandre Julliard15c52a72006-04-11 14:41:39 +020047TESTSUBDIRS = dlls
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000048
Alexandre Julliard7035aa52006-12-27 21:23:36 +010049all: Make.rules $(PROGRAMS)
Pavel Roskin74197cb1999-07-31 19:25:22 +000050 @echo "Wine build complete."
Alexandre Julliard808cb041995-08-17 17:11:36 +000051
Patrik Stridvall385dc181999-09-29 10:24:19 +000052WINAPI_CHECK_EXTRA_FLAGS = --global
53
Alexandre Julliard2886e9b2006-08-07 17:48:18 +020054INSTALLDIRS = $(DESTDIR)$(datadir)/aclocal
55
Alexandre Julliard641ee761997-08-04 16:34:36 +000056@MAKE_RULES@
57
Alexandre Julliard69b032b2008-03-20 13:01:31 +010058$(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 Julliard5ea4e5b2006-09-14 09:41:21 +020066config.status: configure
Alexandre Julliard397e5692006-09-14 09:41:33 +020067 @./config.status --recheck
Marcus Meissnerca004e51999-01-03 12:26:22 +000068
Alexandre Julliardc4704c22006-09-22 09:33:00 +020069include/config.h: include/stamp-h
70include/stamp-h: include/config.h.in config.status
71 @./config.status include/config.h include/stamp-h
72
Alexandre Julliard35363162002-05-22 21:32:49 +000073wine: $(WINEWRAPPER)
74 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000075
Alexandre Julliardf673b712002-06-14 23:48:27 +000076# Installation rules
77
Alexandre Julliard90647772009-08-13 19:48:42 +020078install-aclocal: $(DESTDIR)$(datadir)/aclocal dummy
79
80.PHONY: install-aclocal
81
82@WOW64_DISABLE@ install install-dev:: install-aclocal
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000083
Alexandre Julliardb3ec2e52008-08-25 14:27:03 +020084uninstall::
Mike Frysinger53928442006-02-14 13:51:38 +010085 $(RM) $(DESTDIR)$(datadir)/aclocal/wine.m4
86 -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/aclocal
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000087
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000088# Dependencies between directories
89
Alexandre Julliardb3ec2e52008-08-25 14:27:03 +020090all: $(INSTALLSUBDIRS)
Alexandre Julliard233766a2004-09-20 21:48:42 +000091dlls: include libs tools
92fonts loader server: libs tools
93programs: dlls include libs tools
94include: libs tools
Alexandre Julliard2d1c7902003-03-22 20:40:48 +000095tools: libs
Alexandre Julliard000c13a2000-11-09 20:31:18 +000096
Alexandre Julliardb3ec2e52008-08-25 14:27:03 +020097dlls/__install__ dlls/__install-lib__ dlls/__install-dev__: libs tools include
98fonts/__install__ fonts/__install-lib__: libs tools
99include/__install__ include/__install-dev__: include libs tools
100libs/__install__ libs/__install-lib__ libs/__install-dev__: libs
101loader/__install__ loader/__install-lib__: libs tools
102server/__install__ server/__install-lib__: libs tools
Alexandre Julliard78c79ba2008-09-08 12:37:56 +0200103programs/__install__: libs tools include dlls/__install__
104programs/__install-lib__: libs tools include dlls/__install-lib__
Alexandre Julliardb3ec2e52008-08-25 14:27:03 +0200105tools/__install__ tools/__install-lib__ tools/__install-dev__: tools
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000106
Alexandre Julliard8598a4c2006-09-14 09:40:00 +0200107RECURSE_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 Julliard69b032b2008-03-20 13:01:31 +0100119depend $(RECURSE_TARGETS): $(MAKEDEP)
Alexandre Julliardade98b92006-09-11 15:43:59 +0200120
Alexandre Julliard69b032b2008-03-20 13:01:31 +0100121$(MAKEDEP): include/config.h
Alexandre Julliardb860c4a2009-09-01 22:36:13 +0200122 @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
Alexandre Julliard47461202004-09-21 00:35:02 +0000123
Alexandre Julliardf673b712002-06-14 23:48:27 +0000124# Test rules
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000125
Hans Leidekker954a4f82004-10-05 04:10:27 +0000126$(TESTSUBDIRS:%=%/__test__): wine
Hans Leidekker954a4f82004-10-05 04:10:27 +0000127$(TESTSUBDIRS:%=%/__crosstest__): tools include
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000128
Alexandre Julliardf673b712002-06-14 23:48:27 +0000129# Misc rules
130
Alexandre Julliard641ee761997-08-04 16:34:36 +0000131TAGS etags:
Alexandre Julliard7b289822007-03-27 21:45:54 +0200132 $(RM) TAGS
Alexandre Julliarde43004a2008-07-07 12:17:00 +0200133 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
Alexandre Julliard641ee761997-08-04 16:34:36 +0000134
Christoph Frickdb9692d2003-01-05 01:05:13 +0000135tags ctags:
Alexandre Julliard7b289822007-03-27 21:45:54 +0200136 $(RM) tags
Alexandre Julliarde43004a2008-07-07 12:17:00 +0200137 (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a
Christoph Frickdb9692d2003-01-05 01:05:13 +0000138
Stefan Stranzc89c2dd2009-06-05 20:57:24 -0600139manpages htmlpages sgmlpages xmlpages: dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200140 @cd documentation && $(MAKE) $@
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000141
Alexandre Julliard5ea4e5b2006-09-14 09:41:21 +0200142distclean:: clean
Alexandre Julliardc4704c22006-09-22 09:33:00 +0200143 $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h
Alexandre Julliard9a2cc782002-04-12 00:11:57 +0000144 $(RM) -r autom4te.cache
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000145
Stefan Stranzc89c2dd2009-06-05 20:57:24 -0600146.PHONY: manpages htmlpages sgmlpages xmlpages distclean
Alexandre Julliard5ea4e5b2006-09-14 09:41:21 +0200147
Alexandre Julliarda360e932008-08-20 16:02:37 +0200148# Makefile rules
Alexandre Julliard5ea4e5b2006-09-14 09:41:21 +0200149
Alexandre Julliarda360e932008-08-20 16:02:37 +0200150ALL_MAKERULES = @ALL_MAKERULES@
151ALL_MAKEFILES = @ALL_MAKEFILES@
Alexandre Julliard5ea4e5b2006-09-14 09:41:21 +0200152
Alexandre Julliarda360e932008-08-20 16:02:37 +0200153Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES): config.status
Alexandre Julliard5ea4e5b2006-09-14 09:41:21 +0200154 @./config.status $@
Alexandre Julliard6c0921c2007-03-30 12:35:25 +0200155.INIT: Makefile
156.BEGIN: Makefile
Alexandre Julliard566cb8c2009-03-03 16:34:52 +0100157.MAKEFILEDEPS:
Alexandre Julliard5ea4e5b2006-09-14 09:41:21 +0200158
159$(RECURSE_TARGETS) $(MAKEDEP): $(ALL_MAKEFILES)
160
161distclean::
Alexandre Julliarda360e932008-08-20 16:02:37 +0200162 $(RM) Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES)
Alexandre Julliard5ea4e5b2006-09-14 09:41:21 +0200163
Alexandre Julliarda360e932008-08-20 16:02:37 +0200164@ALL_MAKEFILE_DEPENDS@