Finished separation of shell32 and wsock32.
[wine/hacks.git] / Makefile.in
blobe483b92433ded55261b166ff18d3e05a1820f0d8
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 # install: install everything
7 # uninstall: uninstall everything
8 # depend: create the dependencies
9 # etags: create a TAGS file for Emacs.
10 # manpages: compile manpages for Wine API
13 # Directories
15 TOPSRCDIR = @top_srcdir@
16 TOPOBJDIR = .
17 SRCDIR = @srcdir@
18 VPATH = @srcdir@
19 LIBEXT = @LIBEXT@
20 LDCONFIG = @LDCONFIG@
21 MODULE = wine
22 IMPORTS = ntdll
24 # Stand-alone programs
25 PROGRAMS = \
26 loader/dos/dosmod \
27 server/wineserver
29 # Programs that link with libwine
30 LIBPROGRAMS = \
31 debugger/winedbg
33 # Libraries (not dlls) to build
34 LIBRARIES = \
35 library/libwine.$(LIBEXT) \
36 unicode/libwine_unicode.$(LIBEXT)
38 # Sub-directories to run make depend/clean into
39 SUBDIRS = \
40 debugger \
41 dlls \
42 documentation \
43 include \
44 library \
45 libtest \
46 miscemu \
47 programs \
48 server \
49 tools \
50 unicode
52 # Sub-directories to run make install into
53 INSTALLSUBDIRS = \
54 debugger \
55 dlls \
56 documentation \
57 include \
58 library \
59 server \
60 tools \
61 unicode
63 EMUOBJS = \
64 miscemu/miscemu.o
66 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
68 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) wine
69 @echo "Wine build complete."
71 WINAPI_CHECK_EXTRA_FLAGS = --global
73 @MAKE_RULES@
75 Make.rules: Make.rules.in configure
76 @echo $? is newer than 'Make.rules', please rerun ./configure!
77 @exit 1
79 wine: libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) dlls $(EMUOBJS)
80 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS)
82 install:: all $(INSTALLSUBDIRS:%=%/__install__)
83 [ -d $(bindir) ] || $(MKDIR) $(bindir)
84 $(INSTALL_PROGRAM) wine $(bindir)/wine
85 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
86 -$(LDCONFIG)
88 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
89 cd $(bindir) && $(RM) wine dosmod
91 $(EMUOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
92 @cd `dirname $@` && $(MAKE) `basename $@`
94 libwine.$(LIBEXT): library/libwine.$(LIBEXT)
95 $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
97 libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
98 $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
100 # Dependencies between directories
102 $(DLLOBJS) $(PROGRAMS): tools
104 $(EMUOBJS): tools dlls
106 $(LIBPROGRAMS): tools dlls libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
108 server tools: libwine_unicode.$(LIBEXT)
110 dlls: tools libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
112 checklink::
113 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine -lwine_unicode $(LIBS) && $(RM) checklink
115 install_programs: dummy
116 @cd programs && $(MAKE) install
118 uninstall_programs: dummy
119 @cd programs && $(MAKE) uninstall
121 checklink::
122 @cd dlls && $(MAKE) checklink
124 TAGS etags:
125 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
127 manpages:
128 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
129 for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
131 htmlpages:
132 -$(MKDIR) $(TOPOBJDIR)/documentation/html
133 for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
135 clean::
136 $(RM) wine
138 distclean: clean
139 $(RM) config.* TAGS Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man tools/winelauncher
140 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
142 # We depend on configure above for checks, so we better don't use this rule.
143 #configure: configure.in
144 # autoconf
146 include/config.h.in: configure.in include/acconfig.h
147 autoheader -l include
149 ### Dependencies: