Makefile.in 4.34 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
# install:         install everything
# uninstall:       uninstall everything
# depend:          create the dependencies
14
# ctags:           create a tags file for vim and others.
15 16
# etags:           create a TAGS file for Emacs.
# manpages:        compile manpages for Wine API
17
# htmlpages:       compile html pages for Wine API
Hans Leidekker's avatar
Hans Leidekker committed
18
# sgmlpages:       compile sgml source for the Wine API Guide
Alexandre Julliard's avatar
Alexandre Julliard committed
19

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

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

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
# Sub-directories to run make install/uninstall into
43
INSTALLSUBDIRS = @ALL_TOP_DIRS@
44

45
# Sub-directories to run make test into
46
TESTSUBDIRS = dlls
47

48
all: Make.rules $(PROGRAMS)
49
	@echo "Wine build complete."
Alexandre Julliard's avatar
Alexandre Julliard committed
50

51 52
WINAPI_CHECK_EXTRA_FLAGS = --global

53 54
INSTALLDIRS = $(DESTDIR)$(datadir)/aclocal

Alexandre Julliard's avatar
Alexandre Julliard committed
55 56
@MAKE_RULES@

57 58 59 60 61 62 63 64
$(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4
	cd $(SRCDIR) && autoconf --warnings=all

$(SRCDIR)/include/config.h.in: @MAINTAINER_MODE@ include/stamp-h.in
$(SRCDIR)/include/stamp-h.in: configure.ac aclocal.m4
	cd $(SRCDIR) && autoheader --warnings=all
	@echo timestamp > $@

65
config.status: configure
66
	@./config.status --recheck
67

68 69 70 71
include/config.h: include/stamp-h
include/stamp-h: include/config.h.in config.status
	@./config.status include/config.h include/stamp-h

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

75 76
# Installation rules

77
install install-dev:: $(DESTDIR)$(datadir)/aclocal dummy
78
	$(INSTALL_DATA) $(SRCDIR)/aclocal.m4 $(DESTDIR)$(datadir)/aclocal/wine.m4
79

80
uninstall::
81 82
	$(RM) $(DESTDIR)$(datadir)/aclocal/wine.m4
	-rmdir $(DESTDIR)$(datadir)/wine $(DESTDIR)$(datadir)/aclocal
83

84 85
# Dependencies between directories

86
all: $(INSTALLSUBDIRS)
87 88 89 90
dlls: include libs tools
fonts loader server: libs tools
programs: dlls include libs tools
include: libs tools
91 92
tools: libs

93 94 95 96 97 98
dlls/__install__ dlls/__install-lib__ dlls/__install-dev__: libs tools include
fonts/__install__ fonts/__install-lib__: libs tools
include/__install__ include/__install-dev__: include libs tools
libs/__install__ libs/__install-lib__ libs/__install-dev__: libs
loader/__install__ loader/__install-lib__: libs tools
server/__install__ server/__install-lib__: libs tools
99 100
programs/__install__: libs tools include dlls/__install__
programs/__install-lib__: libs tools include dlls/__install-lib__
101
tools/__install__ tools/__install-lib__ tools/__install-dev__: tools
102

103 104 105 106 107 108 109 110 111 112 113 114
RECURSE_TARGETS = \
	$(SUBDIRS) \
	$(SUBDIRS:%=%/__clean__) \
	$(SUBDIRS:%=%/__depend__) \
	$(SUBDIRS:%=%/__install-dev__) \
	$(SUBDIRS:%=%/__install-lib__) \
	$(SUBDIRS:%=%/__install__) \
	$(SUBDIRS:%=%/__uninstall__) \
	$(TESTSUBDIRS:%=%/__crosstest__) \
	$(TESTSUBDIRS:%=%/__test__) \
	$(TESTSUBDIRS:%=%/__testclean__)

115
depend $(RECURSE_TARGETS): $(MAKEDEP)
116

117
$(MAKEDEP): include/config.h
118
	@cd $(TOOLSDIR)/tools && $(MAKE) makedep
119

120
# Test rules
121

122 123
$(TESTSUBDIRS:%=%/__test__): wine
$(TESTSUBDIRS:%=%/__crosstest__): tools include
124

125 126
# Misc rules

Alexandre Julliard's avatar
Alexandre Julliard committed
127
TAGS etags:
128
	$(RM) TAGS
129
	(test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
Alexandre Julliard's avatar
Alexandre Julliard committed
130

131
tags ctags:
132
	$(RM) tags
133
	(test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a
134

135
manpages htmlpages sgmlpages: dummy
136
	@cd documentation && $(MAKE) $@
Alexandre Julliard's avatar
Alexandre Julliard committed
137

138
distclean:: clean
139
	$(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h
140
	$(RM) -r autom4te.cache
Alexandre Julliard's avatar
Alexandre Julliard committed
141

142
.PHONY: manpages htmlpages sgmlpages distclean
143

144 145 146 147 148 149
# Makefile rules

ALL_MAKERULES = @ALL_MAKERULES@
ALL_MAKEFILES = @ALL_MAKEFILES@

Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES): config.status
150
	@./config.status $@
151 152
.INIT: Makefile
.BEGIN: Makefile
153 154 155 156

$(RECURSE_TARGETS) $(MAKEDEP): $(ALL_MAKEFILES)

distclean::
157 158 159
	$(RM) Makefile $(ALL_MAKERULES) $(ALL_MAKEFILES)

@ALL_MAKEFILE_DEPENDS@