GetLongPathName32A() returns dos format long filename instead of unix
[wine] / Makefile.in
1 # This Makefile understands the following targets:
2 #
3 # all (default):        build wine
4 # lib:                  build libwine
5 # clean:                remove all intermediate files
6 # distclean:            also remove all files created by configure
7 # install:              install everything
8 # uninstall:            uninstall everything
9 # depend:               create the dependencies
10 # etags:                create a TAGS file for Emacs.
11 # manpages:             compile manpages for Wine API
12 #
13
14 # Main target to build
15
16 MAIN_TARGET = @MAIN_TARGET@
17
18 # Directories
19
20 TOPSRCDIR = @top_srcdir@
21 TOPOBJDIR = .
22 SRCDIR    = @srcdir@
23 VPATH     = @srcdir@
24 MODULE    = none
25
26 LIBSUBDIRS = \
27         tools \
28         tools/wrc \
29         controls \
30         dlls/comctl32 \
31         dlls/psapi \
32         dlls/shell32 \
33         dlls/winaspi \
34         dlls/wnaspi32 \
35         files \
36         graphics \
37         graphics/metafiledrv \
38         graphics/x11drv \
39         ipc \
40         library \
41         loader \
42         loader/ne \
43         loader/dos \
44         memory \
45         misc \
46         msdos \
47         multimedia \
48         objects \
49         ole \
50         relay32 \
51         resources \
52         scheduler \
53         server \
54         tsx11 \
55         win32 \
56         windows
57
58 EMUSUBDIRS = \
59         debugger \
60         graphics/psdrv \
61         graphics/win16drv \
62         if1632 \
63         miscemu
64
65 PROGSUBDIRS = libtest programs
66
67 DOCSUBDIRS = documentation
68
69 # All sub-directories
70 ALLSUBDIRS = \
71         $(LIBSUBDIRS) \
72         $(EMUSUBDIRS) \
73         $(PROGSUBDIRS) \
74         $(DOCSUBDIRS)
75
76 # Sub-directories to run make depend into
77 DEPENDSUBDIRS = $(LIBSUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
78
79 # Sub-directories to run make install into
80 INSTALLSUBDIRS = $(DOCSUBDIRS)
81
82 LIBOBJS = \
83         controls/controls.o \
84         dlls/comctl32/comctl32.o \
85         dlls/psapi/psapi.o \
86         dlls/shell32/shell32.o \
87         dlls/winaspi/winaspi.o \
88         dlls/wnaspi32/wnaspi32.o \
89         files/files.o \
90         graphics/graphics.o \
91         graphics/metafiledrv/metafiledrv.o \
92         graphics/x11drv/x11drv.o \
93         ipc/ipc.o \
94         loader/loader.o \
95         loader/ne/ne.o \
96         loader/dos/dos.o \
97         memory/memory.o \
98         misc/misc.o \
99         msdos/msdos.o \
100         multimedia/multimedia.o \
101         objects/objects.o \
102         ole/ole.o \
103         relay32/relay32.o \
104         resources/resources.o \
105         scheduler/scheduler.o \
106         server/server.o \
107         tsx11/tsx11.o \
108         win32/win32.o \
109         windows/windows.o
110
111 EMUOBJS = \
112         debugger/debugger.o \
113         graphics/psdrv/psdrv.o \
114         graphics/win16drv/win16drv.o \
115         if1632/if1632.o \
116         miscemu/miscemu.o
117
118 LIB_TARGET  = @LIB_TARGET@
119
120 all: $(MAIN_TARGET)
121
122 @MAKE_RULES@
123
124 install:: install_$(MAIN_TARGET)
125
126 uninstall:: uninstall_$(MAIN_TARGET)
127
128 emu: wine
129
130 lib: $(LIBSUBDIRS) $(LIB_TARGET)
131
132 wine wine.sym: $(LIBSUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
133         $(CC) -o wine $(EMUOBJS) $(LIB_TARGET) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
134         nm -n wine | grep -v _compiled >wine.sym
135
136 libwine.a: $(LIBOBJS)
137         $(RM) $@
138         $(AR) $@ $(LIBOBJS)
139         $(RANLIB) $@
140
141 libwine.so.1.0: $(LIBOBJS)
142         $(CC) -shared -Wl,-soname,libwine.so -o$@ $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
143
144 install_emu: install_lib
145         [ -d $(bindir) ] || $(MKDIR) $(bindir)
146         $(INSTALL_PROGRAM) wine $(bindir)/wine
147         $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
148
149 uninstall_emu: uninstall_lib
150         $(RM) $(bindir)/wine $(bindir)/dosmod
151
152 install_lib: install_includes
153         [ -d $(libdir) ] || $(MKDIR) $(libdir)
154         $(INSTALL_DATA) $(LIB_TARGET) $(libdir)
155         $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
156
157 uninstall_lib: uninstall_includes
158         cd $(libdir); $(RM) $(LIB_TARGET)
159         $(RM) $(libdir)/wine.sym
160
161 install_includes: dummy
162         [ -d $(includedir) ] || $(MKDIR) $(includedir)
163         cd $(TOPSRCDIR)/include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
164
165 # Don't just do a rm -rf on $(includedir) -- don't want to wipe out 
166 # anything extra the user may have put there.
167 uninstall_includes: dummy
168         $(RM) $(includedir)/windows.h $(includedir)/wintypes.h
169         -rmdir $(includedir)
170
171 $(ALLSUBDIRS): dummy
172         @cd $@; $(SUBMAKE)
173
174 install_programs: dummy
175         @cd programs; $(SUBMAKE) install
176
177 uninstall_programs: dummy
178         @cd programs; $(SUBMAKE) uninstall
179
180 install::
181         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
182
183 uninstall::
184         for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
185
186 depend:: dummy
187         for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
188
189 TAGS etags:
190         etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
191
192 manpages:
193         -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
194         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
195
196 htmlpages:
197         -$(MKDIR) $(TOPOBJDIR)/documentation/html
198         for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
199
200 clean::
201         for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
202         for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
203         $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS .#*
204
205 distclean: clean
206         $(RM) config.* Make.rules include/config.h
207         $(RM) `find . \( -name Makefile -o -size 0 \) -print`
208
209 configure: configure.in
210         autoconf
211
212 include/config.h.in: configure.in include/acconfig.h
213         autoheader -l include
214
215 ### Dependencies: