Makefile.in 4.53 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2
# This Makefile understands the following targets:
#
3 4 5 6 7
# all (default):   build wine
# clean:           remove all intermediate files
# distclean:       also remove all files created by configure
# test:            run tests
# testclean:       clean test results to force running all tests again
8 9
# install-lib:     install libraries needed to run applications
# install-dev:     install development environment
10 11 12 13 14
# install:         install everything
# uninstall:       uninstall everything
# depend:          create the dependencies
# etags:           create a TAGS file for Emacs.
# manpages:        compile manpages for Wine API
15
# htmlpages:       compile html pages for Wine API
Hans Leidekker's avatar
Hans Leidekker committed
16
# sgmlpages:       compile sgml source for the Wine API Guide
Alexandre Julliard's avatar
Alexandre Julliard committed
17

Alexandre Julliard's avatar
Alexandre Julliard committed
18 19 20 21 22 23
# Directories

TOPSRCDIR = @top_srcdir@
TOPOBJDIR = .
SRCDIR    = @srcdir@
VPATH     = @srcdir@
24
LIBEXT    = @LIBEXT@
25
LDCONFIG  = @LDCONFIG@
26
LDD       = @LDD@
27
MODULE    = none
Alexandre Julliard's avatar
Alexandre Julliard committed
28

29 30
FONTSSUBDIRS = @FONTSSUBDIRS@

31 32 33 34
# Sub-directories to run make depend/clean into
SUBDIRS = \
	dlls \
	documentation \
35
	fonts \
36
	include \
37
	libs \
38
	loader \
39 40
	programs \
	server \
41
	tools
42

43 44
# Sub-directories to install for install-lib
INSTALLLIBSUBDIRS = \
45
	documentation \
46
	$(FONTSSUBDIRS) \
47
	loader \
48
	programs \
49
	server
50 51

# Sub-directories to install for install-dev
52
INSTALLDEVSUBDIRS = include
53

54
# Sub-directories to install for both install-lib and install-dev
55
INSTALLBOTHSUBDIRS = dlls libs tools
56

57 58
INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)

59 60
# Sub-directories to run make test into
TESTSUBDIRS = \
61 62
	dlls \
	programs
63

64
all: Make.rules wine
65
	@echo "Wine build complete."
Alexandre Julliard's avatar
Alexandre Julliard committed
66

67 68
WINAPI_CHECK_EXTRA_FLAGS = --global

Alexandre Julliard's avatar
Alexandre Julliard committed
69 70
@MAKE_RULES@

71 72 73 74
Make.rules: Make.rules.in configure
	@echo $? is newer than 'Make.rules', please rerun ./configure!
	@exit 1

75 76
wine: $(WINEWRAPPER)
	$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
77

78 79
# Installation rules

80 81 82 83
install-aclocal: dummy
	$(MKINSTALLDIRS) $(datadir)/aclocal
	$(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(datadir)/aclocal/wine.m4

84
install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
85

86
install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-dev__) install-aclocal
87

88
install:: install-lib install-dev install-aclocal
89
	-$(LDCONFIG)
90 91 92 93 94 95
	@if test -n "`LANG=C $(LDD) $(bindir)/wine|grep not.found`";	\
	then								\
		echo "*************************************************" ; \
		echo "*************************************************" ; \
		echo "The installed Wine libraries will not be found!" ; \
		echo "You can either:" ; 				\
96
		echo "   Add the line '$(libdir)' to /etc/ld.so.conf and run /sbin/ldconfig" ;	\
97 98 99 100
		echo '   export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(libdir)' ; \
		echo "*************************************************" ; \
		echo "*************************************************" ; \
	fi
101

102
uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
103
	$(RM) $(datadir)/aclocal/wine.m4
104
	-rmdir $(datadir)/wine $(datadir)/aclocal
105

106
.PHONY: install-aclocal
107

108 109
# Dependencies between directories

110
all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
111 112 113 114
dlls: include libs tools
fonts loader server: libs tools
programs: dlls include libs tools
include: libs tools
115 116
tools: libs

117
dlls/__install-lib__ dlls/__install-dev__: libs tools include
118
include/__install__: include libs tools
119
libs/__install-lib__ libs/__install-dev__: libs
120
fonts/__install__ loader/__install__ server/__install__: libs tools
121
programs/__install__: libs tools include dlls/__install-lib__
122
tools/__install-lib__ tools/__install-dev__: tools
123

124
$(SUBDIRS:%=%/__depend__): tools include
125

126
# Test rules
127

128
checklink:: $(TESTSUBDIRS:%=%/__checklink__)
129

130 131
check test:: $(TESTSUBDIRS:%=%/__test__)
$(TESTSUBDIRS:%=%/__test__): wine
132

133 134
crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
$(TESTSUBDIRS:%=%/__crosstest__): tools include
135

136 137
# Misc rules

Alexandre Julliard's avatar
Alexandre Julliard committed
138
TAGS etags:
139
	find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | etags -
Alexandre Julliard's avatar
Alexandre Julliard committed
140

141
tags ctags:
142
	find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.spec.c' -a -not -name '*.dbg.c' -print | ctags --c-types=+px -L -
143

Alexandre Julliard's avatar
Alexandre Julliard committed
144
manpages:
145
	$(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
146
	cd dlls && $(MAKE) man
Alexandre Julliard's avatar
Alexandre Julliard committed
147

Alexandre Julliard's avatar
Alexandre Julliard committed
148
htmlpages:
149
	$(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
150 151 152 153 154
	cd dlls && $(MAKE) doc-html

sgmlpages:
	$(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/api-guide
	cd dlls && $(MAKE) doc-sgml
Alexandre Julliard's avatar
Alexandre Julliard committed
155

Alexandre Julliard's avatar
Alexandre Julliard committed
156
clean::
157
	$(RM) wine
Alexandre Julliard's avatar
Alexandre Julliard committed
158 159

distclean: clean
160
	$(RM) config.* configure.lineno TAGS tags Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules libs/Makelib.rules include/config.h
161
	$(RM) -r autom4te.cache
Alexandre Julliard's avatar
Alexandre Julliard committed
162
	$(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliard's avatar
Alexandre Julliard committed
163

164 165
.PHONY: manpages htmlpages distclean

Alexandre Julliard's avatar
Alexandre Julliard committed
166
### Dependencies: