blob: 14f414b331f12c540925b43e5c03ad4dbd925d16 [file] [log] [blame]
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001# This Makefile understands the following targets:
2#
3# all (default): build wine
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +00004# lib: build libwine
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00005# clean: remove all intermediate files
6# distclean: also remove all files created by configure
Alexandre Julliard641ee761997-08-04 16:34:36 +00007# install: install everything
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00008# uninstall: uninstall everything
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00009# depend: create the dependencies
Alexandre Julliard641ee761997-08-04 16:34:36 +000010# etags: create a TAGS file for Emacs.
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000011# manpages: compile manpages for Wine API
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000012#
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000013
14# Main target to build
15
Alexandre Julliardff8331e1995-09-18 11:19:54 +000016MAIN_TARGET = @MAIN_TARGET@
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000017
Alexandre Julliard641ee761997-08-04 16:34:36 +000018# Directories
19
20TOPSRCDIR = @top_srcdir@
21TOPOBJDIR = .
22SRCDIR = @srcdir@
23VPATH = @srcdir@
24MODULE = none
25
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000026LIBSUBDIRS = \
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000027 tools \
Alexandre Julliarda845b881998-06-01 10:44:35 +000028 tools/wrc \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000029 controls \
Joseph Pranevich791cd6a1998-12-02 19:58:08 +000030 console \
Juergen Schmiedf7b0de31999-01-03 12:48:29 +000031 dlls/advapi32 \
Marcus Meissnerb3d1a221999-03-13 18:07:44 +000032 dlls/avifil32 \
Alexandre Julliarda0d77311998-09-13 16:32:00 +000033 dlls/comctl32 \
Klaas van Gendc9127491999-02-28 20:05:11 +000034 dlls/commdlg \
Patrik Stridvall8295c861998-10-11 17:09:05 +000035 dlls/imagehlp \
36 dlls/msacm \
37 dlls/msacm32 \
Marcus Meissner51505b11998-11-01 14:00:21 +000038 dlls/ntdll \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000039 dlls/psapi \
Marcus Meissner30ef8771998-12-11 13:26:26 +000040 dlls/rasapi32 \
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000041 dlls/shell32 \
Andreas Mohr5aa96c11999-03-14 12:34:25 +000042 dlls/tapi32 \
Ulrich Weigandd43a46a1999-01-31 10:11:04 +000043 dlls/ver \
44 dlls/version \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000045 dlls/winaspi \
Huw D M Daviese39b6761999-05-17 16:20:51 +000046 dlls/winspool \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000047 dlls/wnaspi32 \
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000048 files \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000049 graphics \
Huw D M Davies3a24f3f1999-05-02 10:15:16 +000050 graphics/enhmetafiledrv \
Alexandre Julliardbf9130a1996-10-13 17:45:47 +000051 graphics/metafiledrv \
Huw D M Davies96508641998-11-22 12:55:24 +000052 graphics/psdrv \
Patrik Stridvall36bbd621999-02-04 10:10:59 +000053 graphics/ttydrv \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000054 ipc \
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000055 library \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000056 loader \
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000057 loader/ne \
Alexandre Julliard767e6f61998-08-09 12:47:43 +000058 loader/dos \
Alexandre Julliard2ace16a1996-04-28 15:09:19 +000059 memory \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000060 misc \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +000061 msdos \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000062 multimedia \
63 objects \
Alexandre Julliarde658d821997-11-30 17:45:40 +000064 ole \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000065 relay32 \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000066 resources \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +000067 scheduler \
Alexandre Julliard642d3131998-07-12 19:29:36 +000068 server \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000069 win32 \
Patrik Stridvallf638aef1998-12-07 09:36:13 +000070 windows \
71 windows/ttydrv
Alexandre Julliardff8331e1995-09-18 11:19:54 +000072
Patrik Stridvallea584721998-11-01 16:22:07 +000073X11SUBDIRS = \
74 graphics/x11drv \
75 tsx11 \
76 windows/x11drv
77
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000078EMUSUBDIRS = \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000079 debugger \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000080 graphics/win16drv \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000081 if1632 \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000082 miscemu
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000083
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000084PROGSUBDIRS = libtest programs
85
Alexandre Julliardd37eb361997-07-20 16:23:21 +000086DOCSUBDIRS = documentation
87
James Juranc70dc831999-02-13 12:18:33 +000088INCSUBDIRS = include
89
90# Sub-directories to run make into
91BUILDSUBDIRS = \
Alexandre Julliardd37eb361997-07-20 16:23:21 +000092 $(LIBSUBDIRS) \
Patrik Stridvallea584721998-11-01 16:22:07 +000093 $(X11SUBDIRS) \
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000094 $(EMUSUBDIRS) \
Alexandre Julliardd37eb361997-07-20 16:23:21 +000095 $(PROGSUBDIRS) \
96 $(DOCSUBDIRS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +000097
Alexandre Julliard641ee761997-08-04 16:34:36 +000098# Sub-directories to run make depend into
Patrik Stridvallea584721998-11-01 16:22:07 +000099DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
Alexandre Julliard641ee761997-08-04 16:34:36 +0000100
101# Sub-directories to run make install into
James Juranc70dc831999-02-13 12:18:33 +0000102INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
Alexandre Julliard641ee761997-08-04 16:34:36 +0000103
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000104LIBOBJS = \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000105 controls/controls.o \
Joseph Pranevich791cd6a1998-12-02 19:58:08 +0000106 console/console.o \
Juergen Schmiedf7b0de31999-01-03 12:48:29 +0000107 dlls/advapi32/advapi32.o \
Marcus Meissnerb3d1a221999-03-13 18:07:44 +0000108 dlls/avifil32/avifil32.o \
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000109 dlls/comctl32/comctl32.o \
Klaas van Gendc9127491999-02-28 20:05:11 +0000110 dlls/commdlg/commdlg.o \
Patrik Stridvall8295c861998-10-11 17:09:05 +0000111 dlls/imagehlp/imagehlp.o \
112 dlls/msacm/msacm.o \
113 dlls/msacm32/msacm32.o \
Marcus Meissner51505b11998-11-01 14:00:21 +0000114 dlls/ntdll/ntdll.o \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000115 dlls/psapi/psapi.o \
Marcus Meissner30ef8771998-12-11 13:26:26 +0000116 dlls/rasapi32/rasapi32.o \
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000117 dlls/shell32/shell32.o \
Andreas Mohr5aa96c11999-03-14 12:34:25 +0000118 dlls/tapi32/tapi32.o \
Ulrich Weigandd43a46a1999-01-31 10:11:04 +0000119 dlls/ver/ver.o \
120 dlls/version/version.o \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000121 dlls/winaspi/winaspi.o \
Huw D M Daviese39b6761999-05-17 16:20:51 +0000122 dlls/winspool/winspool.o \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000123 dlls/wnaspi32/wnaspi32.o \
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000124 files/files.o \
Alexandre Julliard0e270f41996-08-24 18:26:35 +0000125 graphics/graphics.o \
Huw D M Davies3a24f3f1999-05-02 10:15:16 +0000126 graphics/enhmetafiledrv/enhmetafiledrv.o \
Alexandre Julliardbf9130a1996-10-13 17:45:47 +0000127 graphics/metafiledrv/metafiledrv.o \
Huw D M Davies96508641998-11-22 12:55:24 +0000128 graphics/psdrv/psdrv.o \
Patrik Stridvall36bbd621999-02-04 10:10:59 +0000129 graphics/ttydrv/ttydrv.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000130 ipc/ipc.o \
131 loader/loader.o \
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000132 loader/ne/ne.o \
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000133 loader/dos/dos.o \
Alexandre Julliard2ace16a1996-04-28 15:09:19 +0000134 memory/memory.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000135 misc/misc.o \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +0000136 msdos/msdos.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000137 multimedia/multimedia.o \
138 objects/objects.o \
Alexandre Julliarde658d821997-11-30 17:45:40 +0000139 ole/ole.o \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000140 relay32/relay32.o \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000141 resources/resources.o \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +0000142 scheduler/scheduler.o \
Alexandre Julliard642d3131998-07-12 19:29:36 +0000143 server/server.o \
Alexandre Julliardaf0bae51995-10-03 17:06:08 +0000144 win32/win32.o \
Patrik Stridvallf638aef1998-12-07 09:36:13 +0000145 windows/windows.o \
146 windows/ttydrv/ttydrv.o
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000147
Patrik Stridvallea584721998-11-01 16:22:07 +0000148X11OBJS = \
149 graphics/x11drv/x11drv.o \
150 tsx11/tsx11.o \
151 windows/x11drv/x11drv.o
152
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000153EMUOBJS = \
154 debugger/debugger.o \
Alexandre Julliard0e270f41996-08-24 18:26:35 +0000155 graphics/win16drv/win16drv.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000156 if1632/if1632.o \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000157 miscemu/miscemu.o
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000158
Alexandre Julliard642d3131998-07-12 19:29:36 +0000159LIB_TARGET = @LIB_TARGET@
160
Uwe Bonnes2a4707a1998-10-11 14:57:08 +0000161ALT_LINK = @ALT_LINK@
162
Marcus Meissnerca004e51999-01-03 12:26:22 +0000163all: Makefile Make.rules $(MAIN_TARGET)
Alexandre Julliard808cb041995-08-17 17:11:36 +0000164
Alexandre Julliard641ee761997-08-04 16:34:36 +0000165@MAKE_RULES@
166
Marcus Meissnerca004e51999-01-03 12:26:22 +0000167Make.rules: Make.rules.in configure
168 @echo $? is newer than 'Make.rules', please rerun ./configure!
169 @exit 1
170
Alexandre Julliard641ee761997-08-04 16:34:36 +0000171install:: install_$(MAIN_TARGET)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000172
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000173uninstall:: uninstall_$(MAIN_TARGET)
174
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000175emu: wine
176
Patrik Stridvallea584721998-11-01 16:22:07 +0000177lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000178
Patrik Stridvallea584721998-11-01 16:22:07 +0000179wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
Todd Vierling8beb15a1998-12-18 17:30:52 +0000180 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
Alexandre Julliard902da691995-11-05 14:39:02 +0000181 nm -n wine | grep -v _compiled >wine.sym
Douglas Ridgway8b21f281998-11-01 15:14:39 +0000182 @echo "Wine build complete."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000183
Patrik Stridvallea584721998-11-01 16:22:07 +0000184libwine.a: $(LIBOBJS) $(X11OBJS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000185 $(RM) $@
Patrik Stridvallea584721998-11-01 16:22:07 +0000186 $(AR) $@ $(LIBOBJS) $(X11OBJS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000187 $(RANLIB) $@
Alexandre Julliard808cb041995-08-17 17:11:36 +0000188
Patrik Stridvallea584721998-11-01 16:22:07 +0000189libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
Todd Vierling4b992b01998-12-15 15:26:27 +0000190 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
Alexandre Julliard638f1691999-01-17 16:32:32 +0000191 ln -sf $@ libwine.so
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000192
Alexandre Julliard03468f71998-02-15 19:40:49 +0000193install_emu: install_lib
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000194 [ -d $(bindir) ] || $(MKDIR) $(bindir)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000195 $(INSTALL_PROGRAM) wine $(bindir)/wine
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000196 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000197
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000198uninstall_emu: uninstall_lib
199 $(RM) $(bindir)/wine $(bindir)/dosmod
200
James Juranc70dc831999-02-13 12:18:33 +0000201install_lib: dummy
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000202 [ -d $(libdir) ] || $(MKDIR) $(libdir)
James Juran50bb8791998-12-01 12:47:29 +0000203 if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
Zygo Blaxelld6cab501999-02-20 16:07:49 +0000204 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
James Juranffe6b761999-06-12 08:21:57 +0000205 if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000206
James Juranc70dc831999-02-13 12:18:33 +0000207uninstall_lib: dummy
James Juranb199b191999-05-08 10:43:13 +0000208 cd $(libdir); $(RM) $(LIB_TARGET) libwine.a libwine.so wine.sym
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000209
James Juranc70dc831999-02-13 12:18:33 +0000210$(BUILDSUBDIRS): dummy
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000211 @cd $@; $(SUBMAKE)
Alexandre Julliard808cb041995-08-17 17:11:36 +0000212
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000213install_programs: dummy
214 @cd programs; $(SUBMAKE) install
215
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000216uninstall_programs: dummy
217 @cd programs; $(SUBMAKE) uninstall
218
Alexandre Julliard641ee761997-08-04 16:34:36 +0000219install::
220 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
Alexandre Julliard808cb041995-08-17 17:11:36 +0000221
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000222uninstall::
223 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
224
Alexandre Julliard641ee761997-08-04 16:34:36 +0000225depend:: dummy
226 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000227
Alexandre Julliard641ee761997-08-04 16:34:36 +0000228TAGS etags:
229 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
230
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000231manpages:
232 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
233 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
234
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000235htmlpages:
236 -$(MKDIR) $(TOPOBJDIR)/documentation/html
237 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
238
Alexandre Julliard641ee761997-08-04 16:34:36 +0000239clean::
James Juranc70dc831999-02-13 12:18:33 +0000240 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
Joerg Mayer03b55291999-04-02 10:33:21 +0000241 for i in include include/bitmaps include/server include/wine; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
Alexandre Julliard638f1691999-01-17 16:32:32 +0000242 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000243
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000244distclean: clean
Alexandre Julliard18f92e71996-07-17 20:02:21 +0000245 $(RM) config.* Make.rules include/config.h
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000246 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000247
Marcus Meissnerab554421999-01-23 13:59:51 +0000248# We depend on configure above for checks, so we better don't use this rule.
249#configure: configure.in
250# autoconf
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000251
252include/config.h.in: configure.in include/acconfig.h
253 autoheader -l include
254
Alexandre Julliard641ee761997-08-04 16:34:36 +0000255### Dependencies: