Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 1 | # 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 Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 6 | # install: install everything |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 7 | # uninstall: uninstall everything |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 8 | # depend: create the dependencies |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 9 | # etags: create a TAGS file for Emacs. |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 10 | # manpages: compile manpages for Wine API |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 11 | # |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 12 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 13 | # Directories |
| 14 | |
| 15 | TOPSRCDIR = @top_srcdir@ |
| 16 | TOPOBJDIR = . |
| 17 | SRCDIR = @srcdir@ |
| 18 | VPATH = @srcdir@ |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 19 | LIBEXT = @LIBEXT@ |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 20 | LDSHARED = @LDSHARED@ |
| 21 | LDCONFIG = @LDCONFIG@ |
Alexandre Julliard | 0adad95 | 2000-01-26 01:45:58 +0000 | [diff] [blame] | 22 | MODULE = wine |
| 23 | SOVERSION = 1.0 |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 24 | SONAME = libwine.so |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 25 | |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 26 | # Stand-alone programs |
Alexandre Julliard | d327fcb | 2000-01-29 20:02:49 +0000 | [diff] [blame] | 27 | PROGRAMS = \ |
| 28 | loader/dos/dosmod \ |
Alexandre Julliard | 59b0d7b | 2000-04-23 20:41:04 +0000 | [diff] [blame] | 29 | server/wineserver |
Alexandre Julliard | d327fcb | 2000-01-29 20:02:49 +0000 | [diff] [blame] | 30 | |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 31 | # Programs that link with libwine |
| 32 | LIBPROGRAMS = \ |
| 33 | debugger/winedbg |
| 34 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 35 | # Sub-directories to run make depend/clean into |
Alexandre Julliard | c53ceba | 2000-04-09 18:19:59 +0000 | [diff] [blame] | 36 | SUBDIRS = \ |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 37 | console \ |
| 38 | controls \ |
| 39 | debugger \ |
| 40 | dlls \ |
| 41 | dlls/advapi32 \ |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 42 | dlls/ntdll \ |
| 43 | documentation \ |
| 44 | files \ |
| 45 | graphics \ |
| 46 | graphics/enhmetafiledrv \ |
| 47 | graphics/metafiledrv \ |
| 48 | graphics/win16drv \ |
| 49 | if1632 \ |
| 50 | include \ |
| 51 | library \ |
| 52 | libtest \ |
| 53 | loader \ |
| 54 | loader/dos \ |
| 55 | loader/ne \ |
| 56 | memory \ |
| 57 | misc \ |
| 58 | miscemu \ |
| 59 | msdos \ |
| 60 | objects \ |
| 61 | ole \ |
| 62 | programs \ |
| 63 | relay32 \ |
| 64 | resources \ |
| 65 | scheduler \ |
| 66 | server \ |
| 67 | tools \ |
| 68 | unicode \ |
| 69 | win32 \ |
| 70 | windows |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 71 | |
| 72 | # Sub-directories to run make install into |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 73 | INSTALLSUBDIRS = \ |
| 74 | debugger \ |
| 75 | dlls \ |
| 76 | documentation \ |
| 77 | include \ |
| 78 | server \ |
| 79 | tools |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 80 | |
Alexandre Julliard | a0b2b1d | 1997-11-16 17:38:29 +0000 | [diff] [blame] | 81 | LIBOBJS = \ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 82 | controls/controls.o \ |
Joseph Pranevich | 791cd6a | 1998-12-02 19:58:08 +0000 | [diff] [blame] | 83 | console/console.o \ |
Juergen Schmied | f7b0de3 | 1999-01-03 12:48:29 +0000 | [diff] [blame] | 84 | dlls/advapi32/advapi32.o \ |
Marcus Meissner | 51505b1 | 1998-11-01 14:00:21 +0000 | [diff] [blame] | 85 | dlls/ntdll/ntdll.o \ |
Alexandre Julliard | 4f8c37b | 1996-01-14 18:12:01 +0000 | [diff] [blame] | 86 | files/files.o \ |
Alexandre Julliard | 0e270f4 | 1996-08-24 18:26:35 +0000 | [diff] [blame] | 87 | graphics/graphics.o \ |
Huw D M Davies | 3a24f3f | 1999-05-02 10:15:16 +0000 | [diff] [blame] | 88 | graphics/enhmetafiledrv/enhmetafiledrv.o \ |
Alexandre Julliard | bf9130a | 1996-10-13 17:45:47 +0000 | [diff] [blame] | 89 | graphics/metafiledrv/metafiledrv.o \ |
Ulrich Weigand | 4b32fd0 | 1999-07-15 14:51:40 +0000 | [diff] [blame] | 90 | graphics/win16drv/win16drv.o \ |
| 91 | if1632/if1632.o \ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 92 | loader/loader.o \ |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 93 | loader/ne/ne.o \ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 94 | loader/dos/dos.o \ |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 95 | memory/memory.o \ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 96 | misc/misc.o \ |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 97 | msdos/msdos.o \ |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 98 | objects/objects.o \ |
Alexandre Julliard | e658d82 | 1997-11-30 17:45:40 +0000 | [diff] [blame] | 99 | ole/ole.o \ |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 100 | relay32/relay32.o \ |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 101 | resources/resources.o \ |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 102 | scheduler/scheduler.o \ |
Alexandre Julliard | fb270dd | 2000-06-09 05:27:21 +0000 | [diff] [blame] | 103 | unicode/unicode.o \ |
Alexandre Julliard | af0bae5 | 1995-10-03 17:06:08 +0000 | [diff] [blame] | 104 | win32/win32.o \ |
Alexandre Julliard | 77d5ebb | 2000-03-25 14:03:50 +0000 | [diff] [blame] | 105 | windows/windows.o |
Patrik Stridvall | ea58472 | 1998-11-01 16:22:07 +0000 | [diff] [blame] | 106 | |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 107 | EMUOBJS = \ |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 108 | miscemu/miscemu.o |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 109 | |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 110 | DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@) |
| 111 | |
Alexandre Julliard | 77d5ebb | 2000-03-25 14:03:50 +0000 | [diff] [blame] | 112 | EXTRA_OBJS = $(LIBOBJS) |
Uwe Bonnes | 2a4707a | 1998-10-11 14:57:08 +0000 | [diff] [blame] | 113 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 114 | all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) wine |
Pavel Roskin | 74197cb | 1999-07-31 19:25:22 +0000 | [diff] [blame] | 115 | @echo "Wine build complete." |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 116 | |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 117 | LIBLINTS = $(LIBOBJS:.o=.ln) |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 118 | EMULINTS = $(EMUOBJS:.o=.ln) |
| 119 | |
| 120 | lint:: llib-lwine.ln $(EMULINTS) |
| 121 | $(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS) |
| 122 | |
Patrik Stridvall | 385dc18 | 1999-09-29 10:24:19 +0000 | [diff] [blame] | 123 | WINAPI_CHECK_EXTRA_FLAGS = --global |
| 124 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 125 | @MAKE_RULES@ |
| 126 | |
Marcus Meissner | ca004e5 | 1999-01-03 12:26:22 +0000 | [diff] [blame] | 127 | Make.rules: Make.rules.in configure |
| 128 | @echo $? is newer than 'Make.rules', please rerun ./configure! |
| 129 | @exit 1 |
| 130 | |
Alexandre Julliard | e1e7537 | 2000-04-24 17:17:49 +0000 | [diff] [blame] | 131 | wine: lib$(MODULE).$(LIBEXT) $(DLLDIR) $(EMUOBJS) |
| 132 | $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 133 | |
Alexandre Julliard | 77d5ebb | 2000-03-25 14:03:50 +0000 | [diff] [blame] | 134 | llib-lwine.ln : $(LIBLINTS) |
| 135 | $(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 136 | |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 137 | install_so: lib$(MODULE).so.$(SOVERSION) |
| 138 | [ -d $(libdir) ] || $(MKDIR) $(libdir) |
| 139 | $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION) $(libdir)/lib$(MODULE).so.$(SOVERSION) |
| 140 | cd $(libdir) && $(RM) lib$(MODULE).so && $(LN_S) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).so |
| 141 | |
| 142 | install_a: lib$(MODULE).a |
| 143 | [ -d $(libdir) ] || $(MKDIR) $(libdir) |
| 144 | $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a |
| 145 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 146 | install:: all $(LIBEXT:%=install_%) $(INSTALLSUBDIRS:%=%/__install__) |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 147 | [ -d $(bindir) ] || $(MKDIR) $(bindir) |
Alexandre Julliard | a0b2b1d | 1997-11-16 17:38:29 +0000 | [diff] [blame] | 148 | $(INSTALL_PROGRAM) wine $(bindir)/wine |
Alexandre Julliard | 0adad95 | 2000-01-26 01:45:58 +0000 | [diff] [blame] | 149 | $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 150 | -$(LDCONFIG) |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 151 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 152 | uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) |
Alexandre Julliard | e1e7537 | 2000-04-24 17:17:49 +0000 | [diff] [blame] | 153 | cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION) |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 154 | cd $(bindir) && $(RM) wine dosmod |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 155 | |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 156 | lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in |
| 157 | $(LDSHARED) $(OBJS) -o $@ |
| 158 | |
| 159 | lib$(MODULE).so: lib$(MODULE).so.$(SOVERSION) |
| 160 | $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@ |
| 161 | |
| 162 | lib$(MODULE).a: $(OBJS) Makefile.in Make.rules.in |
| 163 | $(RM) $@ |
| 164 | $(AR) $@ $(OBJS) |
| 165 | $(RANLIB) $@ |
| 166 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 167 | $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS): dummy |
Alexandre Julliard | 0adad95 | 2000-01-26 01:45:58 +0000 | [diff] [blame] | 168 | @cd `dirname $@` && $(MAKE) `basename $@` |
Marcus Meissner | a4d0319 | 1999-07-24 12:12:43 +0000 | [diff] [blame] | 169 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 170 | $(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) $(DLLDIR): tools |
Alexandre Julliard | e1e7537 | 2000-04-24 17:17:49 +0000 | [diff] [blame] | 171 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 172 | $(LIBPROGRAMS): tools dlls lib$(MODULE).$(LIBEXT) |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 173 | |
Alexandre Julliard | 77d5ebb | 2000-03-25 14:03:50 +0000 | [diff] [blame] | 174 | $(LIBLINTS) $(EMULINTS): dummy |
| 175 | @cd `dirname $@` && $(MAKE) lint |
Patrik Stridvall | a9be64e | 1999-07-31 17:39:44 +0000 | [diff] [blame] | 176 | |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 177 | checklink:: |
| 178 | $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine $(LIBS) && $(RM) checklink |
| 179 | |
Alexandre Julliard | 1285c2f | 1996-05-06 16:06:24 +0000 | [diff] [blame] | 180 | install_programs: dummy |
Alexandre Julliard | 0adad95 | 2000-01-26 01:45:58 +0000 | [diff] [blame] | 181 | @cd programs && $(MAKE) install |
Alexandre Julliard | 1285c2f | 1996-05-06 16:06:24 +0000 | [diff] [blame] | 182 | |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 183 | uninstall_programs: dummy |
Alexandre Julliard | 0adad95 | 2000-01-26 01:45:58 +0000 | [diff] [blame] | 184 | @cd programs && $(MAKE) uninstall |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 185 | |
Alexandre Julliard | 318f4ce | 2000-01-31 05:02:49 +0000 | [diff] [blame] | 186 | checklink:: |
| 187 | @cd dlls && $(MAKE) checklink |
| 188 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 189 | TAGS etags: |
| 190 | etags `find $(TOPSRCDIR) -name '*.[chS]' -print | grep -v dbgmain` |
| 191 | |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 192 | manpages: |
| 193 | -$(MKDIR) $(TOPOBJDIR)/documentation/man3w |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 194 | for i in $(SUBDIRS); do (cd $$i && $(MAKE) man); done |
Alexandre Julliard | 44ed71f | 1997-12-21 19:17:50 +0000 | [diff] [blame] | 195 | |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 196 | htmlpages: |
| 197 | -$(MKDIR) $(TOPOBJDIR)/documentation/html |
Alexandre Julliard | 2f158c2 | 2000-06-14 21:45:38 +0000 | [diff] [blame] | 198 | for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done |
Alexandre Julliard | 46ea8b3 | 1998-05-03 19:01:20 +0000 | [diff] [blame] | 199 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 200 | clean:: |
Alexandre Julliard | e1e7537 | 2000-04-24 17:17:49 +0000 | [diff] [blame] | 201 | $(RM) wine libwine.so.1.0 TAGS |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 202 | |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 203 | distclean: clean |
Alexandre Julliard | d0edc5f | 2000-03-04 22:31:27 +0000 | [diff] [blame] | 204 | $(RM) config.* Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 205 | $(RM) `find . \( -name Makefile -o -size 0 \) -print` |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 206 | |
Marcus Meissner | ab55442 | 1999-01-23 13:59:51 +0000 | [diff] [blame] | 207 | # We depend on configure above for checks, so we better don't use this rule. |
| 208 | #configure: configure.in |
| 209 | # autoconf |
Alexandre Julliard | 8cc3a5e | 1996-08-11 15:49:51 +0000 | [diff] [blame] | 210 | |
| 211 | include/config.h.in: configure.in include/acconfig.h |
| 212 | autoheader -l include |
| 213 | |
Alexandre Julliard | 641ee76 | 1997-08-04 16:34:36 +0000 | [diff] [blame] | 214 | ### Dependencies: |