Moved imports specification from the .spec into the Makefile so that
[wine/multimedia.git] / Makefile.in
blob7aa0bd3c8e69906e37f60f4ad54f6af105cf43d5
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 LDIMPORTS = ntdll.dll
26 # Stand-alone programs
27 PROGRAMS = \
28 server/wineserver
30 # Programs that link with libwine
31 LIBPROGRAMS = \
32 debugger \
33 programs
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 # Dlls that we need to link against (should go away)
43 LINKABLE_DLLS = user32.dll gdi32.dll kernel32.dll ntdll.dll
45 # Libraries symlinks to create at the top level
46 LIBSYMLINKS = \
47 $(LINKABLE_DLLS:%=lib%.$(LIBEXT)) \
48 libwine.$(LIBEXT) \
49 libwine_tsx11.$(LIBEXT) \
50 libwine_unicode.$(LIBEXT) \
51 libwine_uuid.a
53 # Sub-directories to run make depend/clean into
54 SUBDIRS = \
55 $(INSTALLSUBDIRS) \
56 libtest \
57 miscemu
59 # Sub-directories to run make install into
60 INSTALLSUBDIRS = \
61 debugger \
62 dlls \
63 documentation \
64 include \
65 library \
66 ole \
67 programs \
68 server \
69 tools \
70 tsx11 \
71 unicode
73 # Sub-directories to run make test into
74 TESTSUBDIRS = \
75 dlls \
76 programs
78 EMUOBJS = \
79 miscemu/miscemu.o
81 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) $(LIBSYMLINKS) wine
82 @echo "Wine build complete."
84 WINAPI_CHECK_EXTRA_FLAGS = --global
86 @MAKE_RULES@
88 Make.rules: Make.rules.in configure
89 @echo $? is newer than 'Make.rules', please rerun ./configure!
90 @exit 1
92 wine: $(EMUOBJS) $(LDIMPORTS:%=lib%.$(LIBEXT)) library/libwine.$(LIBEXT) unicode/libwine_unicode.$(LIBEXT)
93 $(CC) -o wine $(EMUOBJS) -L. $(LDIMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS)
95 install_wine: dummy
96 [ -d $(bindir) ] || $(MKDIR) $(bindir)
97 $(INSTALL_PROGRAM) wine $(bindir)/wine
99 install:: all install_wine $(INSTALLSUBDIRS:%=%/__install__)
100 -$(LDCONFIG)
102 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
103 cd $(bindir) && $(RM) wine
105 $(EMUOBJS) $(PROGRAMS) $(LIBRARIES): dummy
106 @cd `dirname $@` && $(MAKE) `basename $@`
108 # Symlinks to libraries that we need to link against
110 libwine.$(LIBEXT): library/libwine.$(LIBEXT)
111 $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
113 libwine_tsx11.$(LIBEXT): tsx11/libwine_tsx11.$(LIBEXT)
114 $(RM) $@ && $(LN_S) tsx11/libwine_tsx11.$(LIBEXT) $@
116 libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
117 $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
119 libwine_uuid.a: ole/libwine_uuid.a
120 $(RM) $@ && $(LN_S) ole/libwine_uuid.a $@
122 libuser32.dll.$(LIBEXT): dlls/user32.dll$(DLLEXT)
123 $(RM) $@ && $(LN_S) dlls/user32.dll$(DLLEXT) $@
125 libgdi32.dll.$(LIBEXT): dlls/gdi32.dll$(DLLEXT)
126 $(RM) $@ && $(LN_S) dlls/gdi32.dll$(DLLEXT) $@
128 libkernel32.dll.$(LIBEXT): dlls/kernel32.dll$(DLLEXT)
129 $(RM) $@ && $(LN_S) dlls/kernel32.dll$(DLLEXT) $@
131 libntdll.dll.$(LIBEXT): dlls/ntdll.dll$(DLLEXT)
132 $(RM) $@ && $(LN_S) dlls/ntdll.dll$(DLLEXT) $@
134 $(LINKABLE_DLLS:%=dlls/%$(DLLEXT)): dlls
136 # Dependencies between directories
138 $(PROGRAMS): tools
140 $(EMUOBJS): tools dlls
142 $(LIBPROGRAMS): tools dlls wine
144 server tools: $(LIBRARIES)
146 dlls: tools $(LIBRARIES)
148 checklink::
149 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c && $(RM) checklink
151 checklink::
152 @cd dlls && $(MAKE) checklink
153 @cd debugger && $(MAKE) checklink
155 test_environment: dummy
156 @cd programs/winetest && $(MAKE) all
158 $(TESTSUBDIRS:%=%/__test__): test_environment
160 check test:: $(TESTSUBDIRS:%=%/__test__)
162 TAGS etags:
163 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
165 manpages:
166 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
167 for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
169 htmlpages:
170 -$(MKDIR) $(TOPOBJDIR)/documentation/html
171 for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
173 clean::
174 $(RM) wine
176 distclean: clean
177 $(RM) config.* TAGS Make.rules dlls/Makedll.rules programs/Makeprog.rules include/config.h
178 $(RM) -r autom4te.cache
179 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
181 ### Dependencies: