blob: df2acbbb2357a59bedae97fe5fa756002bec2f45 [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
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000019
Alexandre Julliard641ee761997-08-04 16:34:36 +000020# Directories
21
22TOPSRCDIR = @top_srcdir@
23TOPOBJDIR = .
24SRCDIR = @srcdir@
25VPATH = @srcdir@
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000026LIBEXT = @LIBEXT@
Alexandre Julliard35363162002-05-22 21:32:49 +000027MODULE = none
Alexandre Julliard641ee761997-08-04 16:34:36 +000028
Huw Davies00acb5f2004-08-17 22:33:14 +000029FONTSSUBDIRS = @FONTSSUBDIRS@
30
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
43# Sub-directories to install for install-lib
44INSTALLLIBSUBDIRS = \
Huw Davies00acb5f2004-08-17 22:33:14 +000045 $(FONTSSUBDIRS) \
Alexandre Julliard357c7402003-11-06 01:17:56 +000046 loader \
Alexandre Julliardf673b712002-06-14 23:48:27 +000047 programs \
Alexandre Julliard7ab9a712003-03-21 05:06:48 +000048 server
Alexandre Julliardf673b712002-06-14 23:48:27 +000049
50# Sub-directories to install for install-dev
Alexandre Julliardbeac1942005-03-02 12:18:55 +000051INSTALLDEVSUBDIRS = include
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000052
Alexandre Julliardada5e652002-12-12 22:03:14 +000053# Sub-directories to install for both install-lib and install-dev
Alexandre Julliardbeac1942005-03-02 12:18:55 +000054INSTALLBOTHSUBDIRS = dlls libs tools
Alexandre Julliardada5e652002-12-12 22:03:14 +000055
Alexandre Julliardf673b712002-06-14 23:48:27 +000056INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
57
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000058# Sub-directories to run make test into
Alexandre Julliard15c52a72006-04-11 14:41:39 +020059TESTSUBDIRS = dlls
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000060
Alexandre Julliardf673b712002-06-14 23:48:27 +000061all: Make.rules wine
Pavel Roskin74197cb1999-07-31 19:25:22 +000062 @echo "Wine build complete."
Alexandre Julliard808cb041995-08-17 17:11:36 +000063
Patrik Stridvall385dc181999-09-29 10:24:19 +000064WINAPI_CHECK_EXTRA_FLAGS = --global
65
Alexandre Julliard2886e9b2006-08-07 17:48:18 +020066INSTALLDIRS = $(DESTDIR)$(datadir)/aclocal
67
Alexandre Julliard641ee761997-08-04 16:34:36 +000068@MAKE_RULES@
69
Marcus Meissnerca004e51999-01-03 12:26:22 +000070Make.rules: Make.rules.in configure
71 @echo $? is newer than 'Make.rules', please rerun ./configure!
72 @exit 1
73
Alexandre Julliard35363162002-05-22 21:32:49 +000074wine: $(WINEWRAPPER)
75 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000076
Alexandre Julliardf673b712002-06-14 23:48:27 +000077# Installation rules
78
Alexandre Julliard2886e9b2006-08-07 17:48:18 +020079install install-dev:: $(DESTDIR)$(datadir)/aclocal dummy
Mike Frysinger53928442006-02-14 13:51:38 +010080 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(DESTDIR)$(datadir)/aclocal/wine.m4
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000081
Alexandre Julliard2886e9b2006-08-07 17:48:18 +020082install install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
Alexandre Julliardf673b712002-06-14 23:48:27 +000083
Alexandre Julliard2886e9b2006-08-07 17:48:18 +020084install install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000085
Alexandre Julliardada5e652002-12-12 22:03:14 +000086uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
Mike Frysinger53928442006-02-14 13:51:38 +010087 $(RM) $(DESTDIR)$(datadir)/aclocal/wine.m4
88 -rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/aclocal
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000089
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000090# Dependencies between directories
91
Huw Davies00acb5f2004-08-17 22:33:14 +000092all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
Alexandre Julliard233766a2004-09-20 21:48:42 +000093dlls: include libs tools
94fonts loader server: libs tools
95programs: dlls include libs tools
96include: libs tools
Alexandre Julliard2d1c7902003-03-22 20:40:48 +000097tools: libs
Alexandre Julliard000c13a2000-11-09 20:31:18 +000098
Francois Gougetbff8cd12005-02-18 20:03:32 +000099dlls/__install-lib__ dlls/__install-dev__: libs tools include
Alexandre Julliard233766a2004-09-20 21:48:42 +0000100include/__install__: include libs tools
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000101libs/__install-lib__ libs/__install-dev__: libs
Huw Davies00acb5f2004-08-17 22:33:14 +0000102fonts/__install__ loader/__install__ server/__install__: libs tools
Francois Gougetbff8cd12005-02-18 20:03:32 +0000103programs/__install__: libs tools include dlls/__install-lib__
Alexandre Julliardbeac1942005-03-02 12:18:55 +0000104tools/__install-lib__ tools/__install-dev__: tools
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000105
Alexandre Julliardade98b92006-09-11 15:43:59 +0200106depend $(SUBDIRS:%=%/__depend__): $(MAKEDEP)
107
108$(MAKEDEP):
109 @cd $(TOOLSDIR)/tools && $(MAKE) makedep
Alexandre Julliard47461202004-09-21 00:35:02 +0000110
Alexandre Julliardf673b712002-06-14 23:48:27 +0000111# Test rules
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000112
Hans Leidekker954a4f82004-10-05 04:10:27 +0000113$(TESTSUBDIRS:%=%/__test__): wine
Hans Leidekker954a4f82004-10-05 04:10:27 +0000114$(TESTSUBDIRS:%=%/__crosstest__): tools include
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000115
Alexandre Julliardf673b712002-06-14 23:48:27 +0000116# Misc rules
117
Alexandre Julliard641ee761997-08-04 16:34:36 +0000118TAGS etags:
Detlef Riekenberg0076e332006-05-21 21:54:48 +0200119 find $(TOPSRCDIR)/ -name '*.[ch]' -print | etags -
Alexandre Julliard641ee761997-08-04 16:34:36 +0000120
Christoph Frickdb9692d2003-01-05 01:05:13 +0000121tags ctags:
Detlef Riekenberg0076e332006-05-21 21:54:48 +0200122 find $(TOPSRCDIR)/ -name '*.[ch]' -print | ctags --c-types=+px -L -
Christoph Frickdb9692d2003-01-05 01:05:13 +0000123
Alexandre Julliarddc8c76a2006-09-09 23:09:04 +0200124manpages htmlpages sgmlpages: dummy
Alexandre Julliard5012c172006-08-07 13:54:09 +0200125 @cd documentation && $(MAKE) $@
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000126
Alexandre Julliard641ee761997-08-04 16:34:36 +0000127clean::
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000128 $(RM) wine
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000129
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000130distclean: clean
Alexandre Julliardb7edbe62005-09-02 12:28:37 +0000131 $(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 +0000132 $(RM) -r autom4te.cache
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000133 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000134
Alexandre Julliard078eb1f2005-06-15 18:12:15 +0000135.PHONY: manpages htmlpages sgmlpages distclean
Alexandre Julliardf673b712002-06-14 23:48:27 +0000136
Alexandre Julliard641ee761997-08-04 16:34:36 +0000137### Dependencies: