Makefile.in 4.4 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
# crosstest:       build tests as native windows applications (requires MinGW)
9 10
# install-lib:     install libraries needed to run applications
# install-dev:     install development environment
11 12 13 14 15
# install:         install everything
# uninstall:       uninstall everything
# depend:          create the dependencies
# etags:           create a TAGS file for Emacs.
# manpages:        compile manpages for Wine API
16
# htmlpages:       compile html pages for Wine API
Hans Leidekker's avatar
Hans Leidekker committed
17
# sgmlpages:       compile sgml source for the Wine API Guide
Alexandre Julliard's avatar
Alexandre Julliard committed
18

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

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

30 31
FONTSSUBDIRS = @FONTSSUBDIRS@

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

44 45
# Sub-directories to install for install-lib
INSTALLLIBSUBDIRS = \
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

144 145
manpages htmlpages sgmlpages:
	cd documentation && $(MAKE) $@
Alexandre Julliard's avatar
Alexandre Julliard committed
146

Alexandre Julliard's avatar
Alexandre Julliard committed
147
clean::
148
	$(RM) wine
Alexandre Julliard's avatar
Alexandre Julliard committed
149 150

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

155
.PHONY: manpages htmlpages sgmlpages distclean
156

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