blob: 351a0c3fd640adf4ae610b13f2e0b47f788279c0 [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 \
46 dlls/wnaspi32 \
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000047 files \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000048 graphics \
Alexandre Julliardbf9130a1996-10-13 17:45:47 +000049 graphics/metafiledrv \
Huw D M Davies96508641998-11-22 12:55:24 +000050 graphics/psdrv \
Patrik Stridvall36bbd621999-02-04 10:10:59 +000051 graphics/ttydrv \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000052 ipc \
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000053 library \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000054 loader \
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000055 loader/ne \
Alexandre Julliard767e6f61998-08-09 12:47:43 +000056 loader/dos \
Alexandre Julliard2ace16a1996-04-28 15:09:19 +000057 memory \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000058 misc \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +000059 msdos \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000060 multimedia \
61 objects \
Alexandre Julliarde658d821997-11-30 17:45:40 +000062 ole \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000063 relay32 \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000064 resources \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +000065 scheduler \
Alexandre Julliard642d3131998-07-12 19:29:36 +000066 server \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000067 win32 \
Patrik Stridvallf638aef1998-12-07 09:36:13 +000068 windows \
69 windows/ttydrv
Alexandre Julliardff8331e1995-09-18 11:19:54 +000070
Patrik Stridvallea584721998-11-01 16:22:07 +000071X11SUBDIRS = \
72 graphics/x11drv \
73 tsx11 \
74 windows/x11drv
75
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000076EMUSUBDIRS = \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000077 debugger \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000078 graphics/win16drv \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000079 if1632 \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000080 miscemu
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000081
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000082PROGSUBDIRS = libtest programs
83
Alexandre Julliardd37eb361997-07-20 16:23:21 +000084DOCSUBDIRS = documentation
85
James Juranc70dc831999-02-13 12:18:33 +000086INCSUBDIRS = include
87
88# Sub-directories to run make into
89BUILDSUBDIRS = \
Alexandre Julliardd37eb361997-07-20 16:23:21 +000090 $(LIBSUBDIRS) \
Patrik Stridvallea584721998-11-01 16:22:07 +000091 $(X11SUBDIRS) \
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000092 $(EMUSUBDIRS) \
Alexandre Julliardd37eb361997-07-20 16:23:21 +000093 $(PROGSUBDIRS) \
94 $(DOCSUBDIRS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +000095
Alexandre Julliard641ee761997-08-04 16:34:36 +000096# Sub-directories to run make depend into
Patrik Stridvallea584721998-11-01 16:22:07 +000097DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
Alexandre Julliard641ee761997-08-04 16:34:36 +000098
99# Sub-directories to run make install into
James Juranc70dc831999-02-13 12:18:33 +0000100INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
Alexandre Julliard641ee761997-08-04 16:34:36 +0000101
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000102LIBOBJS = \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000103 controls/controls.o \
Joseph Pranevich791cd6a1998-12-02 19:58:08 +0000104 console/console.o \
Juergen Schmiedf7b0de31999-01-03 12:48:29 +0000105 dlls/advapi32/advapi32.o \
Marcus Meissnerb3d1a221999-03-13 18:07:44 +0000106 dlls/avifil32/avifil32.o \
Alexandre Julliarda0d77311998-09-13 16:32:00 +0000107 dlls/comctl32/comctl32.o \
Klaas van Gendc9127491999-02-28 20:05:11 +0000108 dlls/commdlg/commdlg.o \
Patrik Stridvall8295c861998-10-11 17:09:05 +0000109 dlls/imagehlp/imagehlp.o \
110 dlls/msacm/msacm.o \
111 dlls/msacm32/msacm32.o \
Marcus Meissner51505b11998-11-01 14:00:21 +0000112 dlls/ntdll/ntdll.o \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000113 dlls/psapi/psapi.o \
Marcus Meissner30ef8771998-12-11 13:26:26 +0000114 dlls/rasapi32/rasapi32.o \
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000115 dlls/shell32/shell32.o \
Andreas Mohr5aa96c11999-03-14 12:34:25 +0000116 dlls/tapi32/tapi32.o \
Ulrich Weigandd43a46a1999-01-31 10:11:04 +0000117 dlls/ver/ver.o \
118 dlls/version/version.o \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000119 dlls/winaspi/winaspi.o \
120 dlls/wnaspi32/wnaspi32.o \
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000121 files/files.o \
Alexandre Julliard0e270f41996-08-24 18:26:35 +0000122 graphics/graphics.o \
Alexandre Julliardbf9130a1996-10-13 17:45:47 +0000123 graphics/metafiledrv/metafiledrv.o \
Huw D M Davies96508641998-11-22 12:55:24 +0000124 graphics/psdrv/psdrv.o \
Patrik Stridvall36bbd621999-02-04 10:10:59 +0000125 graphics/ttydrv/ttydrv.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000126 ipc/ipc.o \
127 loader/loader.o \
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000128 loader/ne/ne.o \
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000129 loader/dos/dos.o \
Alexandre Julliard2ace16a1996-04-28 15:09:19 +0000130 memory/memory.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000131 misc/misc.o \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +0000132 msdos/msdos.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000133 multimedia/multimedia.o \
134 objects/objects.o \
Alexandre Julliarde658d821997-11-30 17:45:40 +0000135 ole/ole.o \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000136 relay32/relay32.o \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000137 resources/resources.o \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +0000138 scheduler/scheduler.o \
Alexandre Julliard642d3131998-07-12 19:29:36 +0000139 server/server.o \
Alexandre Julliardaf0bae51995-10-03 17:06:08 +0000140 win32/win32.o \
Patrik Stridvallf638aef1998-12-07 09:36:13 +0000141 windows/windows.o \
142 windows/ttydrv/ttydrv.o
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000143
Patrik Stridvallea584721998-11-01 16:22:07 +0000144X11OBJS = \
145 graphics/x11drv/x11drv.o \
146 tsx11/tsx11.o \
147 windows/x11drv/x11drv.o
148
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000149EMUOBJS = \
150 debugger/debugger.o \
Alexandre Julliard0e270f41996-08-24 18:26:35 +0000151 graphics/win16drv/win16drv.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000152 if1632/if1632.o \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000153 miscemu/miscemu.o
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000154
Alexandre Julliard642d3131998-07-12 19:29:36 +0000155LIB_TARGET = @LIB_TARGET@
156
Uwe Bonnes2a4707a1998-10-11 14:57:08 +0000157ALT_LINK = @ALT_LINK@
158
Marcus Meissnerca004e51999-01-03 12:26:22 +0000159all: Makefile Make.rules $(MAIN_TARGET)
Alexandre Julliard808cb041995-08-17 17:11:36 +0000160
Alexandre Julliard641ee761997-08-04 16:34:36 +0000161@MAKE_RULES@
162
Marcus Meissnerca004e51999-01-03 12:26:22 +0000163Make.rules: Make.rules.in configure
164 @echo $? is newer than 'Make.rules', please rerun ./configure!
165 @exit 1
166
Alexandre Julliard641ee761997-08-04 16:34:36 +0000167install:: install_$(MAIN_TARGET)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000168
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000169uninstall:: uninstall_$(MAIN_TARGET)
170
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000171emu: wine
172
Patrik Stridvallea584721998-11-01 16:22:07 +0000173lib: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000174
Patrik Stridvallea584721998-11-01 16:22:07 +0000175wine wine.sym: $(LIBSUBDIRS) $(X11SUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
Todd Vierling8beb15a1998-12-18 17:30:52 +0000176 $(CC) -o wine $(EMUOBJS) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XLIB) $(LIBS)
Alexandre Julliard902da691995-11-05 14:39:02 +0000177 nm -n wine | grep -v _compiled >wine.sym
Douglas Ridgway8b21f281998-11-01 15:14:39 +0000178 @echo "Wine build complete."
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000179
Patrik Stridvallea584721998-11-01 16:22:07 +0000180libwine.a: $(LIBOBJS) $(X11OBJS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000181 $(RM) $@
Patrik Stridvallea584721998-11-01 16:22:07 +0000182 $(AR) $@ $(LIBOBJS) $(X11OBJS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000183 $(RANLIB) $@
Alexandre Julliard808cb041995-08-17 17:11:36 +0000184
Patrik Stridvallea584721998-11-01 16:22:07 +0000185libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
Todd Vierling4b992b01998-12-15 15:26:27 +0000186 $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
Alexandre Julliard638f1691999-01-17 16:32:32 +0000187 ln -sf $@ libwine.so
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000188
Alexandre Julliard03468f71998-02-15 19:40:49 +0000189install_emu: install_lib
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000190 [ -d $(bindir) ] || $(MKDIR) $(bindir)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000191 $(INSTALL_PROGRAM) wine $(bindir)/wine
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000192 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000193
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000194uninstall_emu: uninstall_lib
195 $(RM) $(bindir)/wine $(bindir)/dosmod
196
James Juranc70dc831999-02-13 12:18:33 +0000197install_lib: dummy
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000198 [ -d $(libdir) ] || $(MKDIR) $(libdir)
James Juran50bb8791998-12-01 12:47:29 +0000199 if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
Zygo Blaxelld6cab501999-02-20 16:07:49 +0000200 if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000201
James Juranc70dc831999-02-13 12:18:33 +0000202uninstall_lib: dummy
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000203 cd $(libdir); $(RM) $(LIB_TARGET)
Zygo Blaxelld6cab501999-02-20 16:07:49 +0000204 if [ -f $(libdir)/wine.sym ]; then $(RM) $(libdir)/wine.sym; fi
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000205
James Juranc70dc831999-02-13 12:18:33 +0000206$(BUILDSUBDIRS): dummy
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000207 @cd $@; $(SUBMAKE)
Alexandre Julliard808cb041995-08-17 17:11:36 +0000208
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000209install_programs: dummy
210 @cd programs; $(SUBMAKE) install
211
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000212uninstall_programs: dummy
213 @cd programs; $(SUBMAKE) uninstall
214
Alexandre Julliard641ee761997-08-04 16:34:36 +0000215install::
216 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
Alexandre Julliard808cb041995-08-17 17:11:36 +0000217
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000218uninstall::
219 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
220
Alexandre Julliard641ee761997-08-04 16:34:36 +0000221depend:: dummy
222 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000223
Alexandre Julliard641ee761997-08-04 16:34:36 +0000224TAGS etags:
225 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
226
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000227manpages:
228 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
229 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
230
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000231htmlpages:
232 -$(MKDIR) $(TOPOBJDIR)/documentation/html
233 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
234
Alexandre Julliard641ee761997-08-04 16:34:36 +0000235clean::
James Juranc70dc831999-02-13 12:18:33 +0000236 for i in $(BUILDSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000237 for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
Alexandre Julliard638f1691999-01-17 16:32:32 +0000238 $(RM) wine wine.sym libwine.a libwine.so.1.0 libwine.so TAGS .#*
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000239
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000240distclean: clean
Alexandre Julliard18f92e71996-07-17 20:02:21 +0000241 $(RM) config.* Make.rules include/config.h
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000242 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000243
Marcus Meissnerab554421999-01-23 13:59:51 +0000244# We depend on configure above for checks, so we better don't use this rule.
245#configure: configure.in
246# autoconf
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000247
248include/config.h.in: configure.in include/acconfig.h
249 autoheader -l include
250
Alexandre Julliard641ee761997-08-04 16:34:36 +0000251### Dependencies: