Modify NE_FindTypeSection and NE_FindResourceFromType so as to be
[wine.git] / Makefile.in
blob8adb66e57fa544ceeb3e6b8406af5ccf5fe92f68
1 # This Makefile understands the following targets:
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
14 # Main target to build
16 MAIN_TARGET = @MAIN_TARGET@
18 # Directories
20 TOPSRCDIR = @top_srcdir@
21 TOPOBJDIR = .
22 SRCDIR = @srcdir@
23 VPATH = @srcdir@
24 MODULE = none
26 LIBSUBDIRS = \
27 tools \
28 tools/wrc \
29 controls \
30 console \
31 dlls/advapi32 \
32 dlls/comctl32 \
33 dlls/imagehlp \
34 dlls/msacm \
35 dlls/msacm32 \
36 dlls/ntdll \
37 dlls/psapi \
38 dlls/rasapi32 \
39 dlls/shell32 \
40 dlls/ver \
41 dlls/version \
42 dlls/winaspi \
43 dlls/wnaspi32 \
44 files \
45 graphics \
46 graphics/metafiledrv \
47 graphics/psdrv \
48 ipc \
49 library \
50 loader \
51 loader/ne \
52 loader/dos \
53 memory \
54 misc \
55 msdos \
56 multimedia \
57 objects \
58 ole \
59 relay32 \
60 resources \
61 scheduler \
62 server \
63 win32 \
64 windows \
65 windows/ttydrv
67 X11SUBDIRS = \
68 graphics/x11drv \
69 tsx11 \
70 windows/x11drv
72 EMUSUBDIRS = \
73 debugger \
74 graphics/win16drv \
75 if1632 \
76 miscemu
78 PROGSUBDIRS = libtest programs
80 DOCSUBDIRS = documentation
82 # All sub-directories
83 ALLSUBDIRS = \
84 $(LIBSUBDIRS) \
85 $(X11SUBDIRS) \
86 $(EMUSUBDIRS) \
87 $(PROGSUBDIRS) \
88 $(DOCSUBDIRS)
90 # Sub-directories to run make depend into
91 DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
93 # Sub-directories to run make install into
94 INSTALLSUBDIRS = $(DOCSUBDIRS)
96 LIBOBJS = \
97 controls/controls.o \
98 console/console.o \
99 dlls/advapi32/advapi32.o \
100 dlls/comctl32/comctl32.o \
101 dlls/imagehlp/imagehlp.o \
102 dlls/msacm/msacm.o \
103 dlls/msacm32/msacm32.o \
104 dlls/ntdll/ntdll.o \
105 dlls/psapi/psapi.o \
106 dlls/rasapi32/rasapi32.o \
107 dlls/shell32/shell32.o \
108 dlls/ver/ver.o \
109 dlls/version/version.o \
110 dlls/winaspi/winaspi.o \
111 dlls/wnaspi32/wnaspi32.o \
112 files/files.o \
113 graphics/graphics.o \
114 graphics/metafiledrv/metafiledrv.o \
115 graphics/psdrv/psdrv.o \
116 ipc/ipc.o \
117 loader/loader.o \
118 loader/ne/ne.o \
119 loader/dos/dos.o \
120 memory/memory.o \
121 misc/misc.o \
122 msdos/msdos.o \
123 multimedia/multimedia.o \
124 objects/objects.o \
125 ole/ole.o \
126 relay32/relay32.o \
127 resources/resources.o \
128 scheduler/scheduler.o \
129 server/server.o \
130 win32/win32.o \
131 windows/windows.o \
132 windows/ttydrv/ttydrv.o
134 X11OBJS = \
135 graphics/x11drv/x11drv.o \
136 tsx11/tsx11.o \
137 windows/x11drv/x11drv.o
139 EMUOBJS = \
140 debugger/debugger.o \
141 graphics/win16drv/win16drv.o \
142 if1632/if1632.o \
143 miscemu/miscemu.o
145 LIB_TARGET = @LIB_TARGET@
147 ALT_LINK = @ALT_LINK@
149 all: Makefile Make.rules $(MAIN_TARGET)
151 @MAKE_RULES@
153 Make.rules: Make.rules.in configure
154 @echo $? is newer than 'Make.rules', please rerun ./configure!
155 @exit 1
157 install:: install_$(MAIN_TARGET)
159 uninstall:: uninstall_$(MAIN_TARGET)
161 emu: wine
163 lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
165 wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
166 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
167 nm -n wine | grep -v _compiled >wine.sym
168 @echo "Wine build complete."
170 libwine.a: $(LIBOBJS) $(X11OBJS)
171 $(RM) $@
172 $(AR) $@ $(LIBOBJS) $(X11OBJS)
173 $(RANLIB) $@
175 libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
176 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
177 ln -sf $@ libwine.so
179 install_emu: install_lib
180 [ -d $(bindir) ] || $(MKDIR) $(bindir)
181 $(INSTALL_PROGRAM) wine $(bindir)/wine
182 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
184 uninstall_emu: uninstall_lib
185 $(RM) $(bindir)/wine $(bindir)/dosmod
187 install_lib: install_includes
188 [ -d $(libdir) ] || $(MKDIR) $(libdir)
189 if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
190 $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
192 uninstall_lib: uninstall_includes
193 cd $(libdir); $(RM) $(LIB_TARGET)
194 $(RM) $(libdir)/wine.sym
196 install_includes: dummy
197 # Testing LIB_TARGET prevents installing header files
198 # when --disable-lib is used.
199 if [ $(LIB_TARGET) ]; then [ -d $(includedir) ] || $(MKDIR) $(includedir); \
200 cd $(TOPSRCDIR)/include; $(INSTALL_DATA) windows.h wintypes.h $(includedir); fi
202 # Don't just do a rm -rf on $(includedir) -- don't want to wipe out
203 # anything extra the user may have put there.
204 uninstall_includes: dummy
205 $(RM) $(includedir)/windows.h $(includedir)/wintypes.h
206 -rmdir $(includedir)
208 $(ALLSUBDIRS): dummy
209 @cd $@; $(SUBMAKE)
211 install_programs: dummy
212 @cd programs; $(SUBMAKE) install
214 uninstall_programs: dummy
215 @cd programs; $(SUBMAKE) uninstall
217 install::
218 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
220 uninstall::
221 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
223 depend:: dummy
224 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
226 TAGS etags:
227 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
229 manpages:
230 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
231 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
233 htmlpages:
234 -$(MKDIR) $(TOPOBJDIR)/documentation/html
235 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
237 clean::
238 for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
239 for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
240 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
242 distclean: clean
243 $(RM) config.* Make.rules include/config.h
244 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
246 # We depend on configure above for checks, so we better don't use this rule.
247 #configure: configure.in
248 # autoconf
250 include/config.h.in: configure.in include/acconfig.h
251 autoheader -l include
253 ### Dependencies: