Makefile.in 3.75 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
MODULE    = none
Alexandre Julliard's avatar
Alexandre Julliard committed
27

28 29
FONTSSUBDIRS = @FONTSSUBDIRS@

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

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

# Sub-directories to install for install-dev
50
INSTALLDEVSUBDIRS = include
51

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

55 56
INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)

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

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

65 66
WINAPI_CHECK_EXTRA_FLAGS = --global

Alexandre Julliard's avatar
Alexandre Julliard committed
67 68
@MAKE_RULES@

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

73 74
wine: $(WINEWRAPPER)
	$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
75

76 77
# Installation rules

78
install-aclocal: dummy
79 80
	$(MKINSTALLDIRS) $(DESTDIR)$(datadir)/aclocal
	$(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(DESTDIR)$(datadir)/aclocal/wine.m4
81

82
install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__) $(INSTALLBOTHSUBDIRS:%=%/__install-lib__)
83

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

86
install:: install-lib install-dev install-aclocal
87

88
uninstall:: $(INSTALLBOTHSUBDIRS:%=%/__uninstall__)
89 90
	$(RM) $(DESTDIR)$(datadir)/aclocal/wine.m4
	-rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/aclocal
91

92
.PHONY: install-aclocal
93

94 95
# Dependencies between directories

96
all: $(INSTALLSUBDIRS) $(INSTALLBOTHSUBDIRS)
97 98 99 100
dlls: include libs tools
fonts loader server: libs tools
programs: dlls include libs tools
include: libs tools
101 102
tools: libs

103
dlls/__install-lib__ dlls/__install-dev__: libs tools include
104
include/__install__: include libs tools
105
libs/__install-lib__ libs/__install-dev__: libs
106
fonts/__install__ loader/__install__ server/__install__: libs tools
107
programs/__install__: libs tools include dlls/__install-lib__
108
tools/__install-lib__ tools/__install-dev__: tools
109

110
$(SUBDIRS:%=%/__depend__): tools include
111

112
# Test rules
113

114
checklink:: $(TESTSUBDIRS:%=%/__checklink__)
115

116 117
check test:: $(TESTSUBDIRS:%=%/__test__)
$(TESTSUBDIRS:%=%/__test__): wine
118

119 120
crosstest:: $(TESTSUBDIRS:%=%/__crosstest__)
$(TESTSUBDIRS:%=%/__crosstest__): tools include
121

122 123
# Misc rules

Alexandre Julliard's avatar
Alexandre Julliard committed
124
TAGS etags:
125
	find $(TOPSRCDIR) -name '*.[ch]' -print | etags -
Alexandre Julliard's avatar
Alexandre Julliard committed
126

127
tags ctags:
128
	find $(TOPSRCDIR) -name '*.[ch]' -print | ctags --c-types=+px -L -
129

130 131
manpages htmlpages sgmlpages:
	cd documentation && $(MAKE) $@
Alexandre Julliard's avatar
Alexandre Julliard committed
132

Alexandre Julliard's avatar
Alexandre Julliard committed
133
clean::
134
	$(RM) wine
Alexandre Julliard's avatar
Alexandre Julliard committed
135 136

distclean: clean
137
	$(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
138
	$(RM) -r autom4te.cache
Alexandre Julliard's avatar
Alexandre Julliard committed
139
	$(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliard's avatar
Alexandre Julliard committed
140

141
.PHONY: manpages htmlpages sgmlpages distclean
142

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