blob: 7c1a02b8a39c754610817351c27b7abf2f2c4a52 [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
14# etags: create a TAGS file for Emacs.
15# manpages: compile manpages for Wine API
Jon Griffiths35345f22003-03-15 19:48:34 +000016# htmlpages: compile html pages for Wine API
Hans Leidekker14a92162003-04-14 21:35:14 +000017# sgmlpages: compile sgml source for the Wine API Guide
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000018
Alexandre Julliard641ee761997-08-04 16:34:36 +000019# Directories
20
21TOPSRCDIR = @top_srcdir@
22TOPOBJDIR = .
23SRCDIR = @srcdir@
24VPATH = @srcdir@
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000025LIBEXT = @LIBEXT@
Alexandre Julliard35363162002-05-22 21:32:49 +000026MODULE = none
Alexandre Julliard641ee761997-08-04 16:34:36 +000027
Huw Davies00acb5f2004-08-17 22:33:14 +000028FONTSSUBDIRS = @FONTSSUBDIRS@
29
Alexandre Julliardf673b712002-06-14 23:48:27 +000030# Sub-directories to run make depend/clean into
Alexandre Julliardc53ceba2000-04-09 18:19:59 +000031SUBDIRS = \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000032 dlls \
33 documentation \
Huw Davies00acb5f2004-08-17 22:33:14 +000034 fonts \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000035 include \
Alexandre Julliard6a9fe362003-03-19 22:09:16 +000036 libs \
Alexandre Julliard357c7402003-11-06 01:17:56 +000037 loader \
Alexandre Julliardf673b712002-06-14 23:48:27 +000038 programs \
39 server \
Alexandre Julliard7ab9a712003-03-21 05:06:48 +000040 tools
Alexandre Julliardf673b712002-06-14 23:48:27 +000041
42# Sub-directories to install for install-lib
43INSTALLLIBSUBDIRS = \
Huw Davies00acb5f2004-08-17 22:33:14 +000044 $(FONTSSUBDIRS) \
Alexandre Julliard357c7402003-11-06 01:17:56 +000045 loader \
Alexandre Julliardf673b712002-06-14 23:48:27 +000046 programs \
Alexandre Julliard7ab9a712003-03-21 05:06:48 +000047 server
Alexandre Julliardf673b712002-06-14 23:48:27 +000048
49# Sub-directories to install for install-dev
Alexandre Julliardbeac1942005-03-02 12:18:55 +000050INSTALLDEVSUBDIRS = include
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000051
Alexandre Julliardada5e652002-12-12 22:03:14 +000052# Sub-directories to install for both install-lib and install-dev
Alexandre Julliardbeac1942005-03-02 12:18:55 +000053INSTALLBOTHSUBDIRS = dlls libs tools
Alexandre Julliardada5e652002-12-12 22:03:14 +000054
Alexandre Julliardf673b712002-06-14 23:48:27 +000055INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
56
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000057# Sub-directories to run make test into
58TESTSUBDIRS = \
Alexandre Julliard019a7f32002-05-08 00:36:10 +000059 dlls \
60 programs
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000061
Alexandre Julliardf673b712002-06-14 23:48:27 +000062all: Make.rules wine
Pavel Roskin74197cb1999-07-31 19:25:22 +000063 @echo "Wine build complete."
Alexandre Julliard808cb041995-08-17 17:11:36 +000064
Patrik Stridvall385dc181999-09-29 10:24:19 +000065WINAPI_CHECK_EXTRA_FLAGS = --global
66
Alexandre Julliard641ee761997-08-04 16:34:36 +000067@MAKE_RULES@
68
Marcus Meissnerca004e51999-01-03 12:26:22 +000069Make.rules: Make.rules.in configure
70 @echo $? is newer than 'Make.rules', please rerun ./configure!
71 @exit 1
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 Julliard1d8d0172002-08-02 19:34:21 +000078install-aclocal: dummy
Mike Frysinger53928442006-02-14 13:51:38 +010079 $(MKINSTALLDIRS) $(DESTDIR)$(datadir)/aclocal
80 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(DESTDIR)$(datadir)/aclocal/wine.m4
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000081
Alexandre Julliardada5e652002-12-12 22:03:14 +000082install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
Alexandre Julliardf673b712002-06-14 23:48:27 +000083
Alexandre Julliardada5e652002-12-12 22:03:14 +000084install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal
Alexandre Julliardf673b712002-06-14 23:48:27 +000085
Alexandre Julliardada5e652002-12-12 22:03:14 +000086install:: install-lib install-dev install-aclocal
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000087
Alexandre Julliardada5e652002-12-12 22:03:14 +000088uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
Mike Frysinger53928442006-02-14 13:51:38 +010089 $(RM) $(DESTDIR)$(datadir)/aclocal/wine.m4
90 -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/aclocal
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000091
Alexandre Julliard2d1c7902003-03-22 20:40:48 +000092.PHONY: install-aclocal
Alexandre Julliardc1bfca02002-03-20 22:19:06 +000093
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000094# Dependencies between directories
95
Huw Davies00acb5f2004-08-17 22:33:14 +000096all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
Alexandre Julliard233766a2004-09-20 21:48:42 +000097dlls: include libs tools
98fonts loader server: libs tools
99programs: dlls include libs tools
100include: libs tools
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000101tools: libs
Alexandre Julliard000c13a2000-11-09 20:31:18 +0000102
Francois Gougetbff8cd12005-02-18 20:03:32 +0000103dlls/__install-lib__ dlls/__install-dev__: libs tools include
Alexandre Julliard233766a2004-09-20 21:48:42 +0000104include/__install__: include libs tools
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000105libs/__install-lib__ libs/__install-dev__: libs
Huw Davies00acb5f2004-08-17 22:33:14 +0000106fonts/__install__ loader/__install__ server/__install__: libs tools
Francois Gougetbff8cd12005-02-18 20:03:32 +0000107programs/__install__: libs tools include dlls/__install-lib__
Alexandre Julliardbeac1942005-03-02 12:18:55 +0000108tools/__install-lib__ tools/__install-dev__: tools
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000109
Alexandre Julliard3a3307d2004-10-07 03:12:44 +0000110$(SUBDIRS:%=%/__depend__): tools include
Alexandre Julliard47461202004-09-21 00:35:02 +0000111
Alexandre Julliardf673b712002-06-14 23:48:27 +0000112# Test rules
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000113
Alexandre Julliardedeee892002-08-09 01:22:40 +0000114checklink:: $(TESTSUBDIRS:%=%/__checklink__)
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000115
Hans Leidekker954a4f82004-10-05 04:10:27 +0000116check test:: $(TESTSUBDIRS:%=%/__test__)
117$(TESTSUBDIRS:%=%/__test__): wine
Alexandre Julliard13b0c092002-01-10 03:30:21 +0000118
Hans Leidekker954a4f82004-10-05 04:10:27 +0000119crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
120$(TESTSUBDIRS:%=%/__crosstest__): tools include
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000121
Alexandre Julliardf673b712002-06-14 23:48:27 +0000122# Misc rules
123
Alexandre Julliard641ee761997-08-04 16:34:36 +0000124TAGS etags:
Alexandre Julliard7ddab752005-09-28 18:34:00 +0000125 find $(TOPSRCDIR) -name '*.[ch]' -print | etags -
Alexandre Julliard641ee761997-08-04 16:34:36 +0000126
Christoph Frickdb9692d2003-01-05 01:05:13 +0000127tags ctags:
Alexandre Julliard7ddab752005-09-28 18:34:00 +0000128 find $(TOPSRCDIR) -name '*.[ch]' -print | ctags --c-types=+px -L -
Christoph Frickdb9692d2003-01-05 01:05:13 +0000129
Alexandre Julliard078eb1f2005-06-15 18:12:15 +0000130manpages htmlpages sgmlpages:
131 cd documentation && $(MAKE) $@
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000132
Alexandre Julliard641ee761997-08-04 16:34:36 +0000133clean::
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000134 $(RM) wine
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000135
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000136distclean: clean
Alexandre Julliardb7edbe62005-09-02 12:28:37 +0000137 $(RM) config.* configure.lineno TAGS tags Make.rules dlls/Makedll.rules dlls/Makeimplib.rules dlls/Maketest.rules programs/Makeprog.rules libs/Makelib.rules include/config.h
Alexandre Julliard9a2cc782002-04-12 00:11:57 +0000138 $(RM) -r autom4te.cache
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000139 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000140
Alexandre Julliard078eb1f2005-06-15 18:12:15 +0000141.PHONY: manpages htmlpages sgmlpages distclean
Alexandre Julliardf673b712002-06-14 23:48:27 +0000142
Alexandre Julliard641ee761997-08-04 16:34:36 +0000143### Dependencies: