Moved expand.c from libtest to programs/expand.
[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 # 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
13 #
14
15 # Directories
16
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
25
26 # Stand-alone programs
27 PROGRAMS = \
28         server/wineserver
29
30 # Programs that link with libwine
31 LIBPROGRAMS = \
32         debugger \
33         programs
34
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)
41
42 # Dlls that we need to link against (should go away)
43 LINKABLE_DLLS = user32.dll gdi32.dll kernel32.dll ntdll.dll
44
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
52
53 # Sub-directories to run make depend/clean/install into
54 SUBDIRS = \
55         debugger \
56         dlls \
57         documentation \
58         include \
59         library \
60         miscemu \
61         ole \
62         programs \
63         server \
64         tools \
65         tsx11 \
66         unicode
67
68 # Sub-directories to run make test into
69 TESTSUBDIRS = \
70         dlls \
71         programs
72
73 EMUOBJS = \
74         miscemu/miscemu.o
75
76 all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) $(LIBSYMLINKS) wine
77         @echo "Wine build complete."
78
79 WINAPI_CHECK_EXTRA_FLAGS = --global
80
81 @MAKE_RULES@
82
83 Make.rules: Make.rules.in configure
84         @echo $? is newer than 'Make.rules', please rerun ./configure!
85         @exit 1
86
87 wine: $(EMUOBJS) $(LDIMPORTS:%=lib%.$(LIBEXT)) library/libwine.$(LIBEXT) unicode/libwine_unicode.$(LIBEXT)
88         $(CC) -o wine $(EMUOBJS) -L. $(LDIMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS)
89
90 install_wine: dummy
91         $(MKINSTALLDIRS) $(bindir)
92         $(INSTALL_PROGRAM) wine $(bindir)/wine
93
94 install:: all install_wine $(SUBDIRS:%=%/__install__)
95         -$(LDCONFIG)
96
97 uninstall:: $(SUBDIRS:%=%/__uninstall__)
98         $(RM) $(bindir)/wine
99
100 $(EMUOBJS) $(PROGRAMS) $(LIBRARIES): dummy
101         @cd `dirname $@` && $(MAKE) `basename $@`
102
103 # Symlinks to libraries that we need to link against
104
105 libwine.$(LIBEXT): library/libwine.$(LIBEXT)
106         $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
107
108 libwine_tsx11.$(LIBEXT): tsx11/libwine_tsx11.$(LIBEXT)
109         $(RM) $@ && $(LN_S) tsx11/libwine_tsx11.$(LIBEXT) $@
110
111 libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
112         $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
113
114 libwine_uuid.a: ole/libwine_uuid.a
115         $(RM) $@ && $(LN_S) ole/libwine_uuid.a $@
116
117 libuser32.dll.$(LIBEXT): dlls/user32.dll$(DLLEXT)
118         $(RM) $@ && $(LN_S) dlls/user32.dll$(DLLEXT) $@
119
120 libgdi32.dll.$(LIBEXT): dlls/gdi32.dll$(DLLEXT)
121         $(RM) $@ && $(LN_S) dlls/gdi32.dll$(DLLEXT) $@
122
123 libkernel32.dll.$(LIBEXT): dlls/kernel32.dll$(DLLEXT)
124         $(RM) $@ && $(LN_S) dlls/kernel32.dll$(DLLEXT) $@
125
126 libntdll.dll.$(LIBEXT): dlls/ntdll.dll$(DLLEXT)
127         $(RM) $@ && $(LN_S) dlls/ntdll.dll$(DLLEXT) $@
128
129 $(LINKABLE_DLLS:%=dlls/%$(DLLEXT)): dlls
130
131 # Dependencies between directories
132
133 $(PROGRAMS): tools
134
135 $(EMUOBJS): tools dlls
136
137 $(LIBPROGRAMS): tools dlls wine
138
139 server tools: $(LIBRARIES)
140
141 dlls: tools $(LIBRARIES)
142
143 checklink::
144         $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c && $(RM) checklink
145
146 checklink::
147         @cd dlls && $(MAKE) checklink
148         @cd debugger && $(MAKE) checklink
149
150 test_environment: dummy
151         @cd programs/winetest && $(MAKE) all
152
153 $(TESTSUBDIRS:%=%/__test__): test_environment
154
155 check test:: $(TESTSUBDIRS:%=%/__test__)
156
157 TAGS etags:
158         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
159
160 manpages:
161         $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w
162         for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
163
164 htmlpages:
165         $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html
166         for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
167
168 clean::
169         $(RM) wine
170
171 distclean: clean
172         $(RM) config.* TAGS Make.rules dlls/Makedll.rules programs/Makeprog.rules include/config.h
173         $(RM) -r autom4te.cache
174         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
175
176 ### Dependencies: