* ext-compile.am: New file.
[platform/upstream/automake.git] / depend2.am
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
3 ## Free Software Foundation, Inc.
4
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
8 ## any later version.
9
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
14
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 ## 02111-1307, USA.
19
20 ## This file is read several times:
21 ## - once per language for generic compilation rules
22 ## - once for each file which requires specific flags.
23
24 ## Note it is on purpose we wrote `if %AMDEP%', since %AMDEP% becomes
25 ## '@AMDEP_TRUE@' if dependencies are to be used, otherwise FALSE.
26
27 if %AMDEP%
28 ?GENERIC?%FPFX%DEPMODE = @%FPFX%DEPMODE@
29 endif %AMDEP%
30
31 ?GENERIC?%EXT%.o:
32 ?!GENERIC?%OBJ%: %SOURCE%
33 if %AMDEP%
34         source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
35         depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' @AMDEPBACKSLASH@
36         $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
37 endif %AMDEP%
38         %COMPILE% -c -o %OBJ% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE%
39
40 if %?LIBTOOL?%
41 ?GENERIC?%EXT%.lo:
42 ?!GENERIC?%LTOBJ%: %SOURCE%
43 if  %AMDEP%
44         source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
45         depfile='$(DEPDIR)/%BASE%.Plo' tmpdepfile='$(DEPDIR)/%BASE%.TPlo' @AMDEPBACKSLASH@
46         $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
47 endif  %AMDEP%
48         %LTCOMPILE% -c -o %LTOBJ% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE%
49 endif %?LIBTOOL?%
50
51 ?GENERIC?%EXT%.obj:
52 ?!GENERIC?%OBJOBJ%: %SOURCE%
53 if %AMDEP%
54         source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
55         depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' @AMDEPBACKSLASH@
56         $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
57 endif %AMDEP%
58         %COMPILE% -c -o %OBJOBJ% `cygpath -w %SOURCE%`