blob: e483b92433ded55261b166ff18d3e05a1820f0d8 [file] [log] [blame]
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00001# This Makefile understands the following targets:
2#
3# all (default): build wine
4# clean: remove all intermediate files
5# distclean: also remove all files created by configure
Alexandre Julliard641ee761997-08-04 16:34:36 +00006# install: install everything
Alexandre Julliard85ed45e1998-08-22 19:03:56 +00007# uninstall: uninstall everything
Alexandre Julliarde2991ea1995-07-29 13:09:43 +00008# depend: create the dependencies
Alexandre Julliard641ee761997-08-04 16:34:36 +00009# etags: create a TAGS file for Emacs.
Alexandre Julliard44ed71f1997-12-21 19:17:50 +000010# manpages: compile manpages for Wine API
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000011#
Alexandre Julliardd7d4fdf1995-12-26 15:05:24 +000012
Alexandre Julliard641ee761997-08-04 16:34:36 +000013# Directories
14
15TOPSRCDIR = @top_srcdir@
16TOPOBJDIR = .
17SRCDIR = @srcdir@
18VPATH = @srcdir@
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000019LIBEXT = @LIBEXT@
Alexandre Julliardd0edc5f2000-03-04 22:31:27 +000020LDCONFIG = @LDCONFIG@
Alexandre Julliard0adad952000-01-26 01:45:58 +000021MODULE = wine
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000022IMPORTS = ntdll
Alexandre Julliard641ee761997-08-04 16:34:36 +000023
Eric Poueche5efa0c2000-04-13 19:31:58 +000024# Stand-alone programs
Alexandre Julliardd327fcb2000-01-29 20:02:49 +000025PROGRAMS = \
26 loader/dos/dosmod \
Alexandre Julliard59b0d7b2000-04-23 20:41:04 +000027 server/wineserver
Alexandre Julliardd327fcb2000-01-29 20:02:49 +000028
Eric Poueche5efa0c2000-04-13 19:31:58 +000029# Programs that link with libwine
30LIBPROGRAMS = \
31 debugger/winedbg
32
Alexandre Julliard7e495e12000-07-25 21:01:59 +000033# Libraries (not dlls) to build
34LIBRARIES = \
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000035 library/libwine.$(LIBEXT) \
Alexandre Julliard7e495e12000-07-25 21:01:59 +000036 unicode/libwine_unicode.$(LIBEXT)
37
Alexandre Julliard2f158c22000-06-14 21:45:38 +000038# Sub-directories to run make depend/clean into
Alexandre Julliardc53ceba2000-04-09 18:19:59 +000039SUBDIRS = \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000040 debugger \
41 dlls \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000042 documentation \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000043 include \
44 library \
45 libtest \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000046 miscemu \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000047 programs \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000048 server \
49 tools \
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000050 unicode
Alexandre Julliard641ee761997-08-04 16:34:36 +000051
52# Sub-directories to run make install into
Alexandre Julliard2f158c22000-06-14 21:45:38 +000053INSTALLSUBDIRS = \
54 debugger \
55 dlls \
56 documentation \
57 include \
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000058 library \
Alexandre Julliard2f158c22000-06-14 21:45:38 +000059 server \
Alexandre Julliard7e495e12000-07-25 21:01:59 +000060 tools \
61 unicode
Patrik Stridvalla9be64e1999-07-31 17:39:44 +000062
Alexandre Julliardff8331e1995-09-18 11:19:54 +000063EMUOBJS = \
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000064 miscemu/miscemu.o
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000065
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000066DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
67
Alexandre Julliard2f158c22000-06-14 21:45:38 +000068all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) wine
Pavel Roskin74197cb1999-07-31 19:25:22 +000069 @echo "Wine build complete."
Alexandre Julliard808cb041995-08-17 17:11:36 +000070
Patrik Stridvall385dc181999-09-29 10:24:19 +000071WINAPI_CHECK_EXTRA_FLAGS = --global
72
Alexandre Julliard641ee761997-08-04 16:34:36 +000073@MAKE_RULES@
74
Marcus Meissnerca004e51999-01-03 12:26:22 +000075Make.rules: Make.rules.in configure
76 @echo $? is newer than 'Make.rules', please rerun ./configure!
77 @exit 1
78
Alexandre Julliard7e495e12000-07-25 21:01:59 +000079wine: libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) dlls $(EMUOBJS)
Marcus Meissnera387aa42000-09-26 23:09:47 +000080 $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS)
Alexandre Julliarde2991ea1995-07-29 13:09:43 +000081
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000082install:: all $(INSTALLSUBDIRS:%=%/__install__)
Alexandre Julliard318f4ce2000-01-31 05:02:49 +000083 [ -d $(bindir) ] || $(MKDIR) $(bindir)
Alexandre Julliarda0b2b1d1997-11-16 17:38:29 +000084 $(INSTALL_PROGRAM) wine $(bindir)/wine
Alexandre Julliard0adad952000-01-26 01:45:58 +000085 $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
Alexandre Julliard2f158c22000-06-14 21:45:38 +000086 -$(LDCONFIG)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000087
Alexandre Julliard2f158c22000-06-14 21:45:38 +000088uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
Alexandre Julliard2f158c22000-06-14 21:45:38 +000089 cd $(bindir) && $(RM) wine dosmod
Alexandre Julliard7e56f681996-01-31 19:02:28 +000090
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000091$(EMUOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
Alexandre Julliard0adad952000-01-26 01:45:58 +000092 @cd `dirname $@` && $(MAKE) `basename $@`
Marcus Meissnera4d03191999-07-24 12:12:43 +000093
Alexandre Julliard2fa4f762000-10-31 00:20:51 +000094libwine.$(LIBEXT): library/libwine.$(LIBEXT)
95 $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
Alexandre Julliard7e495e12000-07-25 21:01:59 +000096
97libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
98 $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
Eric Poueche5efa0c2000-04-13 19:31:58 +000099
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000100# Dependencies between directories
101
Alexandre Julliard000c13a2000-11-09 20:31:18 +0000102$(DLLOBJS) $(PROGRAMS): tools
103
104$(EMUOBJS): tools dlls
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000105
106$(LIBPROGRAMS): tools dlls libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
107
108server tools: libwine_unicode.$(LIBEXT)
109
110dlls: tools libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
Patrik Stridvalla9be64e1999-07-31 17:39:44 +0000111
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000112checklink::
Alexandre Julliard7e495e12000-07-25 21:01:59 +0000113 $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine -lwine_unicode $(LIBS) && $(RM) checklink
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000114
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000115install_programs: dummy
Alexandre Julliard0adad952000-01-26 01:45:58 +0000116 @cd programs && $(MAKE) install
Alexandre Julliard1285c2f1996-05-06 16:06:24 +0000117
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000118uninstall_programs: dummy
Alexandre Julliard0adad952000-01-26 01:45:58 +0000119 @cd programs && $(MAKE) uninstall
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000120
Alexandre Julliard318f4ce2000-01-31 05:02:49 +0000121checklink::
122 @cd dlls && $(MAKE) checklink
123
Alexandre Julliard641ee761997-08-04 16:34:36 +0000124TAGS etags:
125 etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain`
126
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000127manpages:
128 -$(MKDIR) $(TOPOBJDIR)/documentation/man3w
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000129 for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000130
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000131htmlpages:
132 -$(MKDIR) $(TOPOBJDIR)/documentation/html
Alexandre Julliard2f158c22000-06-14 21:45:38 +0000133 for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000134
Alexandre Julliard641ee761997-08-04 16:34:36 +0000135clean::
Alexandre Julliard2fa4f762000-10-31 00:20:51 +0000136 $(RM) wine
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000137
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000138distclean: clean
Jeremy Whitef9f030b2000-11-05 20:06:56 +0000139 $(RM) config.* TAGS Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man tools/winelauncher
Alexandre Julliard7e56f681996-01-31 19:02:28 +0000140 $(RM) `find . \( -name Makefile -o -size 0 \) -print`
Alexandre Julliarde2991ea1995-07-29 13:09:43 +0000141
Marcus Meissnerab554421999-01-23 13:59:51 +0000142# We depend on configure above for checks, so we better don't use this rule.
143#configure: configure.in
144# autoconf
Alexandre Julliard8cc3a5e1996-08-11 15:49:51 +0000145
146include/config.h.in: configure.in include/acconfig.h
147 autoheader -l include
148
Alexandre Julliard641ee761997-08-04 16:34:36 +0000149### Dependencies: