blob: 9d7a7d4be971118584d68af085b216ff98baace7 [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
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000015#
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000016
Alexandre Julliard641ee761997-08-04 16:34:36 +000017# Directories
18
19TOPSRCDIR = @top_srcdir@
20TOPOBJDIR = .
21SRCDIR = @srcdir@
22VPATH = @srcdir@
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000023LIBEXT = @LIBEXT@
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +000024LDCONFIG = @LDCONFIG@
Marcus Meissnerc6476e92002-06-04 00:59:57 +000025LDD = @LDD@
Alexandre Julliard35363162002-05-22 21:32:49 +000026MODULE = none
Alexandre Julliard641ee761997-08-04 16:34:36 +000027
Alexandre Julliardf673b712002-06-14 23:48:27 +000028# Sub-directories to run make depend/clean into
Alexandre Julliardc53ceba2000-04-09 18:19:59 +000029SUBDIRS = \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000030 dlls \
31 documentation \
32 include \
Alexandre Julliardf673b712002-06-14 23:48:27 +000033 library \
34 miscemu \
35 ole \
36 programs \
37 server \
38 tools \
Alexandre Julliardf673b712002-06-14 23:48:27 +000039 unicode
40
41# Sub-directories to install for install-lib
42INSTALLLIBSUBDIRS = \
43 dlls \
44 documentation \
45 library \
46 miscemu \
47 programs \
48 server \
Alexandre Julliardf673b712002-06-14 23:48:27 +000049 unicode
50
51# Sub-directories to install for install-dev
52INSTALLDEVSUBDIRS = \
53 include \
54 ole \
Alexandre Julliard35363162002-05-22 21:32:49 +000055 tools
Patrik Stridvalla9be64e1999-07-31 17:39:44 +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 Julliardff8331e1995-09-18 11:19:54 +000064EMUOBJS = \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000065 miscemu/miscemu.o
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000066
Alexandre Julliardf673b712002-06-14 23:48:27 +000067all: Make.rules wine
Pavel Roskin74197cb1999-07-31 19:25:22 +000068 @echo "Wine build complete."
Alexandre Julliard808cb041995-08-17 17:11:36 +000069
Patrik Stridvall385dc181999-09-29 10:24:19 +000070WINAPI_CHECK_EXTRA_FLAGS = --global
71
Alexandre Julliard641ee761997-08-04 16:34:36 +000072@MAKE_RULES@
73
Marcus Meissnerca004e51999-01-03 12:26:22 +000074Make.rules: Make.rules.in configure
75 @echo $? is newer than 'Make.rules', please rerun ./configure!
76 @exit 1
77
Alexandre Julliard35363162002-05-22 21:32:49 +000078wine: $(WINEWRAPPER)
79 $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000080
Alexandre Julliardf673b712002-06-14 23:48:27 +000081# Installation rules
82
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000083install-aclocal: dummy
84 $(MKINSTALLDIRS) $(datadir)/aclocal
85 $(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4
86
Alexandre Julliardf673b712002-06-14 23:48:27 +000087install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__)
88
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000089install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) install-aclocal
Alexandre Julliardf673b712002-06-14 23:48:27 +000090
Alexandre Julliard1d8d0172002-08-02 19:34:21 +000091install:: install-aclocal
Alexandre Julliard2f158c22000-06-14 21:45:38 +000092 -$(LDCONFIG)
Marcus Meissnerc6476e92002-06-04 00:59:57 +000093 @if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`"; \
94 then \
95 echo "*************************************************" ; \
96 echo "*************************************************" ; \
97 echo "The installed Wine libraries will not be found!" ; \
98 echo "You can either:" ; \
99 echo " Add the line '$(libdir)' to /etc/ld.so.conf" ; \
100 echo ' export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
101 echo "*************************************************" ; \
102 echo "*************************************************" ; \
103 fi
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000104
Alexandre Julliard1d8d0172002-08-02 19:34:21 +0000105uninstall::
106 $(RM) $(datadir)/aclocal/wine.m4
107 -rmdir $(datadir)/aclocal
108
109.PHONY: install-aclocal install-lib install-dev
Alexandre Julliardc1bfca02002-03-20 22:19:06 +0000110
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000111# Dependencies between directories
112
Alexandre Julliard5b80ce32002-07-01 18:23:38 +0000113all: $(SUBDIRS)
Alexandre Julliard4b9344e2002-09-25 03:29:55 +0000114dlls: library ole tools unicode
Alexandre Julliardf673b712002-06-14 23:48:27 +0000115server: library tools unicode
Alexandre Julliard4b9344e2002-09-25 03:29:55 +0000116miscemu programs: dlls library ole tools unicode
Alexandre Julliardf673b712002-06-14 23:48:27 +0000117tools: library unicode
Alexandre Julliard000c13a2000-11-09 20:31:18 +0000118
Alexandre Julliard4b9344e2002-09-25 03:29:55 +0000119dlls/__install__: library ole tools unicode
Alexandre Julliardf673b712002-06-14 23:48:27 +0000120server/__install__: library tools unicode
Alexandre Julliard4b9344e2002-09-25 03:29:55 +0000121miscemu/__install__ programs/__install__: library ole tools unicode dlls/__install__
Alexandre Julliardf673b712002-06-14 23:48:27 +0000122library/__install__: library
123ole/__install__: ole
124tools/__install__: tools
125unicode/__install__: unicode
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000126
Alexandre Julliardf673b712002-06-14 23:48:27 +0000127# Test rules
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000128
Alexandre Julliardedeee892002-08-09 01:22:40 +0000129checklink:: $(TESTSUBDIRS:%=%/__checklink__)
Alexandre Julliard32459912002-05-09 00:05:48 +0000130 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c && $(RM) checklink
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000131
Alexandre Julliardd7c606d2002-04-02 02:58:45 +0000132check test:: $(TESTSUBDIRS:%=%/__test__)
Alexandre Julliard13b0c092002-01-10 03:30:21 +0000133
Alexandre Julliardc3c587e2002-09-06 19:46:00 +0000134crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
135
Alexandre Julliardf673b712002-06-14 23:48:27 +0000136# Misc rules
137
Alexandre Julliard641ee761997-08-04 16:34:36 +0000138TAGS etags:
Alexandre Julliardebcf38d2002-05-23 02:45:29 +0000139 etags `find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.glue.c' -a -not -name '*.dbg.c' -print`
Alexandre Julliard641ee761997-08-04 16:34:36 +0000140
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000141manpages:
Alexandre Julliardce830a92002-05-09 04:31:39 +0000142 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000143 for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000144
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000145htmlpages:
Alexandre Julliardce830a92002-05-09 04:31:39 +0000146 $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000147 for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000148
Alexandre Julliard641ee761997-08-04 16:34:36 +0000149clean::
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000150 $(RM) wine
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000151
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000152distclean: clean
Gerald Pfeifer5e0a0d22002-10-23 23:35:05 +0000153 $(RM) config.* configure.lineno TAGS Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules include/config.h
Alexandre Julliard9a2cc782002-04-12 00:11:57 +0000154 $(RM) -r autom4te.cache
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000155 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000156
Alexandre Julliardf673b712002-06-14 23:48:27 +0000157.PHONY: manpages htmlpages distclean
158
Alexandre Julliard641ee761997-08-04 16:34:36 +0000159### Dependencies: