Added a prototype for closesocket.
[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 # 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
11 #
12
13 # Directories
14
15 TOPSRCDIR = @top_srcdir@
16 TOPOBJDIR = .
17 SRCDIR    = @srcdir@
18 VPATH     = @srcdir@
19 LIBEXT    = @LIBEXT@
20 LDCONFIG  = @LDCONFIG@
21 MODULE    = wine
22 IMPORTS   = ntdll
23
24 # Stand-alone programs
25 PROGRAMS = \
26         loader/dos/dosmod \
27         server/wineserver
28
29 # Programs that link with libwine
30 LIBPROGRAMS = \
31         debugger/winedbg
32
33 # Libraries (not dlls) to build
34 LIBRARIES = \
35         library/libwine.$(LIBEXT) \
36         ole/libuuid.a \
37         tsx11/libwine_tsx11.$(LIBEXT) \
38         unicode/libwine_unicode.$(LIBEXT)
39
40 # Libraries symlinks to create at the top level
41 LIBSYMLINKS = \
42         libwine.$(LIBEXT) \
43         libwine_tsx11.$(LIBEXT) \
44         libwine_unicode.$(LIBEXT)
45
46 # Sub-directories to run make depend/clean into
47 SUBDIRS = \
48         $(INSTALLSUBDIRS) \
49         libtest \
50         miscemu \
51         programs
52
53 # Sub-directories to run make install into
54 INSTALLSUBDIRS = \
55         debugger \
56         dlls \
57         documentation \
58         include \
59         library \
60         ole \
61         server \
62         tools \
63         tsx11 \
64         unicode
65
66 EMUOBJS = \
67         miscemu/miscemu.o
68
69 DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
70
71 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) $(LIBSYMLINKS) wine
72         @echo "Wine build complete."
73
74 WINAPI_CHECK_EXTRA_FLAGS = --global
75
76 @MAKE_RULES@
77
78 Make.rules: Make.rules.in configure
79         @echo $? is newer than 'Make.rules', please rerun ./configure!
80         @exit 1
81
82 wine: dlls $(EMUOBJS)
83         $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS)
84
85 install:: all $(INSTALLSUBDIRS:%=%/__install__)
86         [ -d $(bindir) ] || $(MKDIR) $(bindir)
87         $(INSTALL_PROGRAM) wine $(bindir)/wine
88         $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
89         -$(LDCONFIG)
90
91 uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
92         cd $(bindir) && $(RM) wine dosmod
93
94 $(EMUOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
95         @cd `dirname $@` && $(MAKE) `basename $@`
96
97 libwine.$(LIBEXT): library/libwine.$(LIBEXT)
98         $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
99
100 libwine_tsx11.$(LIBEXT): tsx11/libwine_tsx11.$(LIBEXT)
101         $(RM) $@ && $(LN_S) tsx11/libwine_tsx11.$(LIBEXT) $@
102
103 libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
104         $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
105
106 # Dependencies between directories
107
108 $(DLLOBJS) $(PROGRAMS): tools
109
110 $(EMUOBJS): tools dlls
111
112 $(LIBPROGRAMS): tools dlls
113
114 server tools: unicode/libwine_unicode.$(LIBEXT)
115
116 dlls: tools $(LIBRARIES)
117
118 checklink::
119         $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(LIBWINE) $(LIBS) && $(RM) checklink
120
121 install_programs: dummy
122         @cd programs && $(MAKE) install
123
124 uninstall_programs: dummy
125         @cd programs && $(MAKE) uninstall
126
127 checklink::
128         @cd dlls && $(MAKE) checklink
129         @cd debugger && $(MAKE) checklink
130
131 TAGS etags:
132         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
133
134 manpages:
135         -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
136         for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
137
138 htmlpages:
139         -$(MKDIR) $(TOPOBJDIR)/documentation/html
140         for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
141
142 clean::
143         $(RM) wine
144
145 distclean: clean
146         $(RM) config.* TAGS Make.rules dlls/Makedll.rules programs/Makeprog.rules include/config.h documentation/wine.man documentation/wine.conf.man tools/winelauncher
147         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
148
149 # We depend on configure above for checks, so we better don't use this rule.
150 #configure: configure.in
151 #       autoconf
152
153 include/config.h.in: configure.in include/acconfig.h
154         autoheader -l include
155
156 ### Dependencies: