blob: 1a5649d69ac7ec32341a083de7409eddd3ea03b1 [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 \
Alexandre Julliarda0d77311998-09-13 16:32:00 +000030 dlls/comctl32 \
Patrik Stridvall8295c861998-10-11 17:09:05 +000031 dlls/imagehlp \
32 dlls/msacm \
33 dlls/msacm32 \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000034 dlls/psapi \
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000035 dlls/shell32 \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000036 dlls/winaspi \
37 dlls/wnaspi32 \
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000038 files \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000039 graphics \
Alexandre Julliardbf9130a1996-10-13 17:45:47 +000040 graphics/metafiledrv \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000041 graphics/x11drv \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000042 ipc \
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000043 library \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000044 loader \
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000045 loader/ne \
Alexandre Julliard767e6f61998-08-09 12:47:43 +000046 loader/dos \
Alexandre Julliard2ace16a1996-04-28 15:09:19 +000047 memory \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000048 misc \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +000049 msdos \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000050 multimedia \
51 objects \
Alexandre Julliarde658d821997-11-30 17:45:40 +000052 ole \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000053 relay32 \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000054 resources \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +000055 scheduler \
Alexandre Julliard642d3131998-07-12 19:29:36 +000056 server \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000057 tsx11 \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000058 win32 \
59 windows
Alexandre Julliardff8331e1995-09-18 11:19:54 +000060
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000061EMUSUBDIRS = \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000062 debugger \
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +000063 graphics/psdrv \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000064 graphics/win16drv \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000065 if1632 \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000066 miscemu
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000067
Alexandre Julliard02ed4c21996-03-02 19:34:10 +000068PROGSUBDIRS = libtest programs
69
Alexandre Julliardd37eb361997-07-20 16:23:21 +000070DOCSUBDIRS = documentation
71
Alexandre Julliard641ee761997-08-04 16:34:36 +000072# All sub-directories
Alexandre Julliardd37eb361997-07-20 16:23:21 +000073ALLSUBDIRS = \
Alexandre Julliardd37eb361997-07-20 16:23:21 +000074 $(LIBSUBDIRS) \
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000075 $(EMUSUBDIRS) \
Alexandre Julliardd37eb361997-07-20 16:23:21 +000076 $(PROGSUBDIRS) \
77 $(DOCSUBDIRS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +000078
Alexandre Julliard641ee761997-08-04 16:34:36 +000079# Sub-directories to run make depend into
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000080DEPENDSUBDIRS = $(LIBSUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
Alexandre Julliard641ee761997-08-04 16:34:36 +000081
82# Sub-directories to run make install into
83INSTALLSUBDIRS = $(DOCSUBDIRS)
84
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000085LIBOBJS = \
Alexandre Julliardff8331e1995-09-18 11:19:54 +000086 controls/controls.o \
Alexandre Julliarda0d77311998-09-13 16:32:00 +000087 dlls/comctl32/comctl32.o \
Patrik Stridvall8295c861998-10-11 17:09:05 +000088 dlls/imagehlp/imagehlp.o \
89 dlls/msacm/msacm.o \
90 dlls/msacm32/msacm32.o \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000091 dlls/psapi/psapi.o \
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000092 dlls/shell32/shell32.o \
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000093 dlls/winaspi/winaspi.o \
94 dlls/wnaspi32/wnaspi32.o \
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000095 files/files.o \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000096 graphics/graphics.o \
Alexandre Julliardbf9130a1996-10-13 17:45:47 +000097 graphics/metafiledrv/metafiledrv.o \
Alexandre Julliard0e270f41996-08-24 18:26:35 +000098 graphics/x11drv/x11drv.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +000099 ipc/ipc.o \
100 loader/loader.o \
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000101 loader/ne/ne.o \
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000102 loader/dos/dos.o \
Alexandre Julliard2ace16a1996-04-28 15:09:19 +0000103 memory/memory.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000104 misc/misc.o \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +0000105 msdos/msdos.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000106 multimedia/multimedia.o \
107 objects/objects.o \
Alexandre Julliarde658d821997-11-30 17:45:40 +0000108 ole/ole.o \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000109 relay32/relay32.o \
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000110 resources/resources.o \
Alexandre Julliard9ea19e51997-01-01 17:29:55 +0000111 scheduler/scheduler.o \
Alexandre Julliard642d3131998-07-12 19:29:36 +0000112 server/server.o \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000113 tsx11/tsx11.o \
Alexandre Julliardaf0bae51995-10-03 17:06:08 +0000114 win32/win32.o \
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000115 windows/windows.o
116
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000117EMUOBJS = \
118 debugger/debugger.o \
Alexandre Julliardebfc0fe1998-06-28 18:40:26 +0000119 graphics/psdrv/psdrv.o \
Alexandre Julliard0e270f41996-08-24 18:26:35 +0000120 graphics/win16drv/win16drv.o \
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000121 if1632/if1632.o \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000122 miscemu/miscemu.o
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000123
Alexandre Julliard642d3131998-07-12 19:29:36 +0000124LIB_TARGET = @LIB_TARGET@
125
Uwe Bonnes2a4707a1998-10-11 14:57:08 +0000126ALT_LINK = @ALT_LINK@
127
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000128all: $(MAIN_TARGET)
Alexandre Julliard808cb041995-08-17 17:11:36 +0000129
Alexandre Julliard641ee761997-08-04 16:34:36 +0000130@MAKE_RULES@
131
132install:: install_$(MAIN_TARGET)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000133
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000134uninstall:: uninstall_$(MAIN_TARGET)
135
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000136emu: wine
137
Alexandre Julliarde658d821997-11-30 17:45:40 +0000138lib: $(LIBSUBDIRS) $(LIB_TARGET)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000139
Alexandre Julliarde658d821997-11-30 17:45:40 +0000140wine wine.sym: $(LIBSUBDIRS) $(LIB_TARGET) $(EMUSUBDIRS) dummy
Uwe Bonnes2a4707a1998-10-11 14:57:08 +0000141 $(CC) -o wine $(EMUOBJS) $(LIB_TARGET) $(ALT_LINK) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
Alexandre Julliard902da691995-11-05 14:39:02 +0000142 nm -n wine | grep -v _compiled >wine.sym
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000143
Alexandre Julliarde658d821997-11-30 17:45:40 +0000144libwine.a: $(LIBOBJS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000145 $(RM) $@
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000146 $(AR) $@ $(LIBOBJS)
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000147 $(RANLIB) $@
Alexandre Julliard808cb041995-08-17 17:11:36 +0000148
Alexandre Julliarde658d821997-11-30 17:45:40 +0000149libwine.so.1.0: $(LIBOBJS)
Alexandre Julliard02e90081998-01-04 17:49:09 +0000150 $(CC) -shared -Wl,-soname,libwine.so -o$@ $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LIBS)
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000151
Alexandre Julliard03468f71998-02-15 19:40:49 +0000152install_emu: install_lib
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000153 [ -d $(bindir) ] || $(MKDIR) $(bindir)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000154 $(INSTALL_PROGRAM) wine $(bindir)/wine
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000155 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000156
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000157uninstall_emu: uninstall_lib
158 $(RM) $(bindir)/wine $(bindir)/dosmod
159
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +0000160install_lib: install_includes
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000161 [ -d $(libdir) ] || $(MKDIR) $(libdir)
Uwe Bonnes2a4707a1998-10-11 14:57:08 +0000162 if [ $(LIB_TARGET) ]; then $(INSTALL_DATA) $(LIB_TARGET) $(libdir); fi
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000163 $(INSTALL_DATA) wine.sym $(libdir)/wine.sym
164
165uninstall_lib: uninstall_includes
166 cd $(libdir); $(RM) $(LIB_TARGET)
167 $(RM) $(libdir)/wine.sym
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000168
Alexandre Julliard33072e11997-06-29 18:08:02 +0000169install_includes: dummy
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000170 [ -d $(includedir) ] || $(MKDIR) $(includedir)
Alexandre Julliardc7c217b1998-04-13 12:21:30 +0000171 cd $(TOPSRCDIR)/include; $(INSTALL_DATA) windows.h wintypes.h $(includedir)
Alexandre Julliard33072e11997-06-29 18:08:02 +0000172
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000173# Don't just do a rm -rf on $(includedir) -- don't want to wipe out
174# anything extra the user may have put there.
175uninstall_includes: dummy
176 $(RM) $(includedir)/windows.h $(includedir)/wintypes.h
177 -rmdir $(includedir)
178
Alexandre Julliardff8331e1995-09-18 11:19:54 +0000179$(ALLSUBDIRS): dummy
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +0000180 @cd $@; $(SUBMAKE)
Alexandre Julliard808cb041995-08-17 17:11:36 +0000181
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000182install_programs: dummy
183 @cd programs; $(SUBMAKE) install
184
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000185uninstall_programs: dummy
186 @cd programs; $(SUBMAKE) uninstall
187
Alexandre Julliard641ee761997-08-04 16:34:36 +0000188install::
189 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) install) || exit 1; done
Alexandre Julliard808cb041995-08-17 17:11:36 +0000190
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000191uninstall::
192 for i in $(INSTALLSUBDIRS); do (cd $$i && $(MAKE) uninstall) || exit 1; done
193
Alexandre Julliard641ee761997-08-04 16:34:36 +0000194depend:: dummy
195 for i in $(DEPENDSUBDIRS); do (cd $$i && $(MAKE) depend) || exit 1; done
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000196
Alexandre Julliard641ee761997-08-04 16:34:36 +0000197TAGS etags:
198 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
199
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000200manpages:
201 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
202 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) man); done
203
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000204htmlpages:
205 -$(MKDIR) $(TOPOBJDIR)/documentation/html
206 for i in $(LIBSUBDIRS); do (cd $$i && $(MAKE) html); done
207
Alexandre Julliard641ee761997-08-04 16:34:36 +0000208clean::
Alexandre Julliard530ee841996-10-23 16:59:13 +0000209 for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000210 for i in include; do (cd $$i; $(RM) *.o \#*\# .#* *~ *% *.bak *.orig *.rej *.flc); done
211 $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS .#*
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000212
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000213distclean: clean
Alexandre Julliard18f92e71996-07-17 20:02:21 +0000214 $(RM) config.* Make.rules include/config.h
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000215 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000216
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000217configure: configure.in
218 autoconf
219
220include/config.h.in: configure.in include/acconfig.h
221 autoheader -l include
222
Alexandre Julliard641ee761997-08-04 16:34:36 +0000223### Dependencies: