blob: 9aee218d4f25f9a025acc418138e880c10fb6407 [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
Alexandre Julliardf673b712002-06-14 23:48:27 +00008# install-lib: install libraries needed to run applications
9# install-dev: install development environment
Alexandre Julliard13b0c092002-01-10 03:30:21 +000010# 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
Jon Griffiths35345f22003-03-15 19:48:34 +000015# htmlpages: compile html pages for Wine API
Hans Leidekker14a92162003-04-14 21:35:14 +000016# sgmlpages: compile sgml source for the Wine API Guide
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000017
Alexandre Julliard641ee761997-08-04 16:34:36 +000018# Directories
19
20TOPSRCDIR = @top_srcdir@
21TOPOBJDIR = .
22SRCDIR = @srcdir@
23VPATH = @srcdir@
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000024LIBEXT = @LIBEXT@
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +000025LDCONFIG = @LDCONFIG@
Marcus Meissnerc6476e92002-06-04 00:59:57 +000026LDD = @LDD@
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 = \
Alexandre Julliardf673b712002-06-14 23:48:27 +000045 documentation \
Huw Davies00acb5f2004-08-17 22:33:14 +000046 $(FONTSSUBDIRS) \
Alexandre Julliard357c7402003-11-06 01:17:56 +000047 loader \
Alexandre Julliardf673b712002-06-14 23:48:27 +000048 programs \
Alexandre Julliard7ab9a712003-03-21 05:06:48 +000049 server
Alexandre Julliardf673b712002-06-14 23:48:27 +000050
51# Sub-directories to install for install-dev
Alexandre Julliardbeac1942005-03-02 12:18:55 +000052INSTALLDEVSUBDIRS = include
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000053
Alexandre Julliardada5e652002-12-12 22:03:14 +000054# Sub-directories to install for both install-lib and install-dev
Alexandre Julliardbeac1942005-03-02 12:18:55 +000055INSTALLBOTHSUBDIRS = dlls libs tools
Alexandre Julliardada5e652002-12-12 22:03:14 +000056
Alexandre Julliardf673b712002-06-14 23:48:27 +000057INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
58
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000059# Sub-directories to run make test into
60TESTSUBDIRS = \
Alexandre Julliard019a7f32002-05-08 00:36:10 +000061 dlls \
62 programs
Alexandre Julliardd7c606d2002-04-02 02:58:45 +000063
Alexandre Julliardf673b712002-06-14 23:48:27 +000064all: Make.rules wine
Pavel Roskin74197cb1999-07-31 19:25:22 +000065 @echo "Wine build complete."
Alexandre Julliard808cb041995-08-17 17:11:36 +000066
Patrik Stridvall385dc181999-09-29 10:24:19 +000067WINAPI_CHECK_EXTRA_FLAGS = --global
68
Alexandre Julliard641ee761997-08-04 16:34:36 +000069@MAKE_RULES@
70
Marcus Meissnerca004e51999-01-03 12:26:22 +000071Make.rules: Make.rules.in configure
72 @echo $? is newer than 'Make.rules', please rerun ./configure!
73 @exit 1
74
Alexandre Julliard35363162002-05-22 21:32:49 +000075wine: $(WINEWRAPPER)
76 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000077
Alexandre Julliardf673b712002-06-14 23:48:27 +000078# Installation rules
79
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000080install-aclocal: dummy
81 $(MKINSTALLDIRS) $(datadir)/aclocal
82 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
83
Alexandre Julliardada5e652002-12-12 22:03:14 +000084install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
Alexandre Julliardf673b712002-06-14 23:48:27 +000085
Alexandre Julliardada5e652002-12-12 22:03:14 +000086install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal
Alexandre Julliardf673b712002-06-14 23:48:27 +000087
Alexandre Julliardada5e652002-12-12 22:03:14 +000088install:: install-lib install-dev install-aclocal
Alexandre Julliard2f158c22000-06-14 21:45:38 +000089 -$(LDCONFIG)
Marcus Meissnerc6476e92002-06-04 00:59:57 +000090 @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`"; \
91 then \
92 echo "*************************************************" ; \
93 echo "*************************************************" ; \
94 echo "The installed Wine libraries will not be found!" ; \
95 echo "You can either:" ; \
Andreas Mohrc08b9482003-04-04 22:12:21 +000096 echo " Add the line '$(libdir)' to /etc/ld.so.conf and run /sbin/ldconfig" ; \
Marcus Meissnerc6476e92002-06-04 00:59:57 +000097 echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
98 echo "*************************************************" ; \
99 echo "*************************************************" ; \
100 fi
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000101
Alexandre Julliardada5e652002-12-12 22:03:14 +0000102uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
Alexandre Julliard1d8d0172002-08-02 19:34:21 +0000103 $(RM) $(datadir)/aclocal/wine.m4
Alexandre Julliard1af344a2004-02-28 01:51:18 +0000104 -rmdir $(datadir)/wine $(datadir)/aclocal
Alexandre Julliard1d8d0172002-08-02 19:34:21 +0000105
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000106.PHONY: install-aclocal
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000107
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000108# Dependencies between directories
109
Huw Davies00acb5f2004-08-17 22:33:14 +0000110all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
Alexandre Julliard233766a2004-09-20 21:48:42 +0000111dlls: include libs tools
112fonts loader server: libs tools
113programs: dlls include libs tools
114include: libs tools
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000115tools: libs
Alexandre Julliard000c13a2000-11-09 20:31:18 +0000116
Francois Gougetbff8cd12005-02-18 20:03:32 +0000117dlls/__install-lib__ dlls/__install-dev__: libs tools include
Alexandre Julliard233766a2004-09-20 21:48:42 +0000118include/__install__: include libs tools
Alexandre Julliard2d1c7902003-03-22 20:40:48 +0000119libs/__install-lib__ libs/__install-dev__: libs
Huw Davies00acb5f2004-08-17 22:33:14 +0000120fonts/__install__ loader/__install__ server/__install__: libs tools
Francois Gougetbff8cd12005-02-18 20:03:32 +0000121programs/__install__: libs tools include dlls/__install-lib__
Alexandre Julliardbeac1942005-03-02 12:18:55 +0000122tools/__install-lib__ tools/__install-dev__: tools
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000123
Alexandre Julliard3a3307d2004-10-07 03:12:44 +0000124$(SUBDIRS:%=%/__depend__): tools include
Alexandre Julliard47461202004-09-21 00:35:02 +0000125
Alexandre Julliardf673b712002-06-14 23:48:27 +0000126# Test rules
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000127
Alexandre Julliardedeee892002-08-09 01:22:40 +0000128checklink:: $(TESTSUBDIRS:%=%/__checklink__)
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000129
Hans Leidekker954a4f82004-10-05 04:10:27 +0000130check test:: $(TESTSUBDIRS:%=%/__test__)
131$(TESTSUBDIRS:%=%/__test__): wine
Alexandre Julliard13b0c092002-01-10 03:30:21 +0000132
Hans Leidekker954a4f82004-10-05 04:10:27 +0000133crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
134$(TESTSUBDIRS:%=%/__crosstest__): tools include
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000135
Alexandre Julliardf673b712002-06-14 23:48:27 +0000136# Misc rules
137
Alexandre Julliard641ee761997-08-04 16:34:36 +0000138TAGS etags:
Mike Hearn35645ca2003-11-04 04:20:02 +0000139 find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | etags -
Alexandre Julliard641ee761997-08-04 16:34:36 +0000140
Christoph Frickdb9692d2003-01-05 01:05:13 +0000141tags ctags:
Shachar Shemesh6ce99f22003-11-26 03:36:50 +0000142 find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | ctags --c-types=+px -L -
Christoph Frickdb9692d2003-01-05 01:05:13 +0000143
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000144manpages:
Alexandre Julliardce830a92002-05-09 04:31:39 +0000145 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
Alexandre Julliarde048ada2003-03-23 20:00:02 +0000146 cd dlls && $(MAKE) man
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000147
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000148htmlpages:
Alexandre Julliardce830a92002-05-09 04:31:39 +0000149 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
Jon Griffiths35345f22003-03-15 19:48:34 +0000150 cd dlls && $(MAKE) doc-html
151
152sgmlpages:
153 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/api-guide
154 cd dlls && $(MAKE) doc-sgml
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000155
Alexandre Julliard641ee761997-08-04 16:34:36 +0000156clean::
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000157 $(RM) wine
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000158
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000159distclean: clean
Alexandre Julliard2e4164f2003-05-11 03:04:07 +0000160 $(RM) config.* configure.lineno TAGS tags Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules libs/Makelib.rules include/config.h
Alexandre Julliard9a2cc782002-04-12 00:11:57 +0000161 $(RM) -r autom4te.cache
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000162 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000163
Alexandre Julliardf673b712002-06-14 23:48:27 +0000164.PHONY: manpages htmlpages distclean
165
Alexandre Julliard641ee761997-08-04 16:34:36 +0000166### Dependencies: