1 # -----------------------------------------------------------------------------
3 # (c) 2009 The University of Glasgow
5 # This file is part of the GHC build system.
7 # To understand how the build system works and how to modify it, see
8 # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
11 # -----------------------------------------------------------------------------
18 # $4 = use GHC (YES/NO)
20 # UseGhcForCc is only relevant when not booting from HC files.
21 ifeq "$4 $$(BootingFromHc)" "YES NO"
23 $1/$2/build/%.$$($3_osuf) : $1/%.c $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
24 "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
26 $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c $$($1_$2_HC_DEP)
27 "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
29 $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s $$($1_$2_HC_DEP)
30 "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
32 $1/$2/build/%.$$($3_osuf) : $1/%.S $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/.
33 "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
35 $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c $$($1_$2_HC_DEP)
36 "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -S $$< -o $$@
38 $1/$2/build/%.$$($3_way_)s : $1/%.c $$($1_$2_HC_DEP)
39 "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -S $$< -o $$@
43 $1/$2/build/%.$$($3_osuf) : $1/%.c | $$$$(dir $$$$@)/.
44 "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
46 $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c
47 "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
49 $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s
50 "$$(AS)" $$($1_$2_$3_ALL_AS_OPTS) -o $$@ $$<
52 $1/$2/build/%.$$($3_osuf) : $1/%.S | $$$$(dir $$$$@)/.
53 "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
55 $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c
56 "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -S $$< -o $$@