Various cosmetic changes.
[wine/wine64.git] / Makefile.in
blobb92afde5bf6a1d28e92deb693f43f658ab4f2bb2
1 # This Makefile understands the following targets:
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 # install: install everything
9 # uninstall: uninstall everything
10 # depend: create the dependencies
11 # etags: create a TAGS file for Emacs.
12 # manpages: compile manpages for Wine API
15 # Directories
17 TOPSRCDIR = @top_srcdir@
18 TOPOBJDIR = .
19 SRCDIR = @srcdir@
20 VPATH = @srcdir@
21 LIBEXT = @LIBEXT@
22 LDCONFIG = @LDCONFIG@
23 MODULE = wine
24 IMPORTS = ntdll
26 # Stand-alone programs
27 PROGRAMS = \
28 server/wineserver
30 # Programs that link with libwine
31 LIBPROGRAMS = \
32 debugger/winedbg \
33 programs/wineconsole/wineconsole
35 # Libraries (not dlls) to build
36 LIBRARIES = \
37 library/libwine.$(LIBEXT) \
38 ole/libwine_uuid.a \
39 tsx11/libwine_tsx11.$(LIBEXT) \
40 unicode/libwine_unicode.$(LIBEXT)
42 # Libraries symlinks to create at the top level
43 LIBSYMLINKS = \
44 libwine.$(LIBEXT) \
45 libwine_tsx11.$(LIBEXT) \
46 libwine_unicode.$(LIBEXT) \
47 libwine_uuid.a
49 # Sub-directories to run make depend/clean into
50 SUBDIRS = \
51 $(INSTALLSUBDIRS) \
52 libtest \
53 miscemu \
54 programs
56 # Sub-directories to run make install into
57 INSTALLSUBDIRS = \
58 debugger \
59 dlls \
60 documentation \
61 include \
62 library \
63 ole \
64 programs/wineconsole \
65 server \
66 tools \
67 tsx11 \
68 unicode
70 EMUOBJS = \
71 miscemu/miscemu.o
73 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) $(LIBSYMLINKS) wine
74 @echo "Wine build complete."
76 WINAPI_CHECK_EXTRA_FLAGS = --global
78 @MAKE_RULES@
80 Make.rules: Make.rules.in configure
81 @echo $? is newer than 'Make.rules', please rerun ./configure!
82 @exit 1
84 wine: dlls $(EMUOBJS)
85 $(CC) -o wine $(EMUOBJS) -L$(DLLDIR) $(IMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS)
87 install_wine:
88 [ -d $(bindir) ] || $(MKDIR) $(bindir)
89 $(INSTALL_PROGRAM) wine $(bindir)/wine
91 install:: all install_wine $(INSTALLSUBDIRS:%=%/__install__)
92 -$(LDCONFIG)
94 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
95 cd $(bindir) && $(RM) wine
97 $(EMUOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
98 @cd `dirname $@` && $(MAKE) `basename $@`
100 libwine.$(LIBEXT): library/libwine.$(LIBEXT)
101 $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
103 libwine_tsx11.$(LIBEXT): tsx11/libwine_tsx11.$(LIBEXT)
104 $(RM) $@ && $(LN_S) tsx11/libwine_tsx11.$(LIBEXT) $@
106 libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
107 $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
109 libwine_uuid.a: ole/libwine_uuid.a
110 $(RM) $@ && $(LN_S) ole/libwine_uuid.a $@
112 # Dependencies between directories
114 $(PROGRAMS): tools
116 $(EMUOBJS): tools dlls
118 $(LIBPROGRAMS): tools dlls wine
120 server tools: unicode/libwine_unicode.$(LIBEXT)
122 dlls: tools $(LIBRARIES)
124 checklink::
125 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(LIBWINE) $(LIBS) && $(RM) checklink
127 install_programs: dummy
128 @cd programs && $(MAKE) install
130 uninstall_programs: dummy
131 @cd programs && $(MAKE) uninstall
133 checklink::
134 @cd dlls && $(MAKE) checklink
135 @cd debugger && $(MAKE) checklink
137 test::
138 @cd programs/winetest && $(MAKE) test
139 @cd dlls && $(MAKE) test
141 TAGS etags:
142 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
144 manpages:
145 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
146 for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
148 htmlpages:
149 -$(MKDIR) $(TOPOBJDIR)/documentation/html
150 for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
152 clean::
153 $(RM) wine
155 distclean: clean
156 $(RM) config.* TAGS Make.rules dlls/Makedll.rules programs/Makeprog.rules include/config.h include/wine/version.h
157 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
159 ### Dependencies: