makefiles: Add a standard header for all makefiles to replace the common variable...
[wine] / Makefile.in
1 # This Makefile understands the following targets:
2 #
3 # 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
8 # crosstest:       build tests as native windows applications (requires MinGW)
9 # install-lib:     install libraries needed to run applications
10 # install-dev:     install development environment
11 # install:         install everything
12 # uninstall:       uninstall everything
13 # depend:          create the dependencies
14 # ctags:           create a tags file for vim and others.
15 # etags:           create a TAGS file for Emacs.
16 # manpages:        compile manpages for Wine API
17 # htmlpages:       compile html pages for Wine API
18 # sgmlpages:       compile sgml source for the Wine API Guide
19 # xmlpages:        compile xml source for the Wine API Guide
20
21 # Sub-directories that don't have a makefile
22 EXTRASUBDIRS = dlls libs programs
23
24 # Destination directories for make install
25 INSTALLDIRS = $(DESTDIR)$(bindir)
26
27 all: wine
28         @echo "Wine build complete."
29
30 WINAPI_CHECK_EXTRA_FLAGS = --global
31
32 @MAKE_RULES@
33
34 # Rules for re-running configure
35
36 $(SRCDIR)/configure: @MAINTAINER_MODE@ configure.ac aclocal.m4
37         cd $(SRCDIR) && autoconf --warnings=all
38
39 $(SRCDIR)/include/config.h.in: @MAINTAINER_MODE@ include/stamp-h.in
40 $(SRCDIR)/include/stamp-h.in: configure.ac aclocal.m4
41         cd $(SRCDIR) && autoheader --warnings=all
42         @echo timestamp > $@
43
44 config.status: configure
45         @./config.status --recheck
46
47 include/config.h: include/stamp-h
48 include/stamp-h: include/config.h.in config.status
49         @./config.status include/config.h include/stamp-h
50
51 # Rules for cleaning
52
53 .PHONY: __clean__
54 clean:: __clean__
55         $(RM) tools/makedep$(EXEEXT)
56
57 distclean:: clean
58         $(RM) config.* configure.lineno TAGS tags include/config.h include/stamp-h Makefile Make.tmp
59         $(RM) -r autom4te.cache
60
61 # Dependencies between directories
62
63 # dependencies needed to build any dll or program
64 __tooldeps__: libs/port libs/wine libs/wpp
65 __builddeps__: __tooldeps__ include
66 .PHONY: test crosstest __tooldeps__ __builddeps__
67
68 loader server: libs/port libs/wine tools
69 fonts: tools
70 include: tools/widl
71 libs/wine: libs/port
72 tools/wmc tools/wrc: tools
73 tools tools/wmc tools/wrc: libs/wine
74 tools/widl tools/wmc tools/wrc: libs/wpp
75
76 $(MAKEDEP): include/config.h tools/Makefile
77         @cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
78
79 # Misc rules
80
81 TAGS etags:
82         $(RM) TAGS
83         (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs etags -a
84
85 tags ctags:
86         $(RM) tags
87         (test -d .git && git ls-files '*.[chly]' '*.idl' || find -L $(TOPSRCDIR) -name '*.[ch]' -print) | xargs ctags -a