forked from lccc-project/lccc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.tpl
172 lines (123 loc) · 4.36 KB
/
Makefile.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[+ AutoGen5 template -*- Mode: Makefile -*-
in
+]
[+ dne -D # +]
# Makefile.in for lccc, toplevel
## Variables
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
docdir = @docdir@
infodir = @infodir@
localedir = @localedir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
runstatedir = @runstatedir@
sharedstatedir = @sharedstatedir@
lcccdir = @lcccdir@
xlangplugindir = @xlangplugindir@
builddir = @builddir@
abs_builddir = @abs_builddir@
target = @target@
host = @host@
build = @build@
CC = @CC@
RUSTC = @RUSTC@
CC_FOR_BUILD = @CC_FOR_BUILD@
RUSTC_FOR_BUILD = @RUSTC_FOR_BUILD@
CFLAGS = @CFLAGS@
RUSTFLAGS = @RUSTFLAGS@
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
RUSTFLAGS_FOR_BUILD = @RUSTFLAGS_FOR_BUILD@
INSTALL = @INSTALL@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
MKDIR_P = @MKDIR_P@
## Bootstrapping Variables
lccc_stage = @lccc_stage@
stage0_target = @rustc_build_target@
stage1_target = @stage1_target@
stage2_targets = @stage2_targets@
### Targets to be built during each stage
stage0_goals = @lccc_stage0_targets@
stage1_goals = @lccc_stage1_targets@
stage2_goals = @lccc_stage2_targets@
stage0_RUSTC = $(RUSTC_FOR_BUILD)
stage0_CC = $(CC_FOR_BUILD)
stage0_CFLAGS = $(CFLAGS_FOR_BUILD)
stage0_RUSTFLAGS = $(RUSTFLAGS_FOR_BUILD)
stage1_RUSTC = @stage1_RUSTC@
stage1_CC = @stage1_CC@
stage1_CFLAGS = @stage1_CFLAGS@
stage1_RUSTFLAGS = @stage1_RUSTFLAGS@
stage1_RUSTC_FOR_BUILD = @stage1_RUSTC_FOR_BUILD@
stage1_CC_FOR_BUILD = @stage1_CC_FOR_BUILD@
stage1_CFLAGS_FOR_BUILD = @stage1_CFLAGS_FOR_BUILD@
stage1_RUSTFLAGS_FOR_BUILD = @stage1_RUSTFLAGS_FOR_BUILD@
stage2_RUSTC = @stage2_RUSTC@
stage2_CC = @stage2_CC@
stage2_CFLAGS = @stage2_CFLAGS@
stage2_RUSTFLAGS = @stage2_RUSTFLAGS@
##
# Do not Edit past this point
.DEFAULT_GOAL = all
stage0_builddir = ${builddir}/build
stage0_abs_builddir = ${abs_builddir}/build
stage1_builddir = ${builddir}/
stage1_abs_builddir = ${abs_builddir}/
vendor_STEM = vendor
vendor_SRCDIR = ${srcdir}/vendor
vendor_STAGE0_GOAL = all
vendor_STAGE1_GOAL = all
vendor_STAGE2_GOAL =
vendor_DEPS =
steps = vendor @steps@
[+ foreach main +]
[+name+]_STEM = [+subdir+]
[+name+]_SRCDIR = ${srcdir}/[+subdir+]
[+name+]_BUILDDIR = ${abs_builddir}/[+subdir+]
[+name+]_STAGE0_BUILDDIR = ${stage0_builddir}/vendor
[+name+]_STAGE0_GOAL = all
[+name+]_STAGE1_GOAL = all
[+name+]_STAGE2_GOAL =
[+name+]_DEPS = vendor [+deps+]
[+ endfor +]
[+ foreach codegen +]
[+name+]_STEM = [+subdir+]
[+name+]_SRCDIR = ${srcdir}/[+subdir+]
[+name+]_BUILDDIR = ${abs_builddir}/[+subdir+]
[+name+]_STAGE0_BUILDDIR = ${stage0_builddir}/vendor
[+name+]_STAGE0_GOAL = all
[+name+]_STAGE1_GOAL = all
[+name+]_STAGE2_GOAL =
[+name+]_DEPS = vendor [+deps+]
[+ endfor +]
[+ foreach frontend +]
[+name+]_STEM = [+subdir+]
[+name+]_STAGE0_GOAL = all
[+name+]_STAGE1_GOAL = @stage1_libs@ all
[+name+]_STAGE2_GOAL = libraries
[+name+]_DEPS = vendor [+deps+]
[+ endfor +]
COMMON_EXPORTS = export INSTALL=$(INSTALL)
STAGE0_EXPORTS = $(COMMON_EXPORTS); export CC=$(stage0_CC); export CFLAGS=$(stage0_CFLAGS); export RUSTC=$(stage0_RUSTC); export RUSTFLAGS=$(stage0_RUSTFLAGS); \
export CC_FOR_BUILD=$(stage0_CC); export CFLAGS_FOR_BUILD=$(stage0_CFLAGS); export RUSTC_FOR_BUILD=$(stage0_RUSTC); export RUSTFLAGS_FOR_BUILD=$(stage0_RUSTFLAGS)
STAGE0_CONFIGURE = --prefix=$(prefix) --exec-prefix=$(exec_prefix) --bindir=$(bindir) --sbindir=$(sbindir) --libdir=$(libdir) --libexecdir=$(libexecdir)
[+ define gen_goals +]
.PHONY: [+name+]_[+builddir+]-configure [+name+]_[+builddir+]/all [+name+]_[+builddir+]/install [+name+]_[+builddir+]/install-strip [+name+]_[+builddir+]/clean [+name+]_[+builddir+]/libraries
[+name+]_[+builddir+]-configure: [+srcdir+]/configure $(foreach dep,[+deps], $($(dep)_DEPS)_[+builddir+]/stamp)
@+$(MKDIR_P) $([+name+]_[+builddir+]); cd [+builddir+]; [+exports+]; [+extra_exports+]; ../[+srcdir+]/configure [+configure+] [+extra_configure+]
$([+name+]_[+builddir+])/:
@+[+exports+]; [+extra_exports+]; $(MAKE) [+name+]_[+builddir+]-configure
$([+name+]_[+builddir+])/%: $([+name+]_[+builddir+])/ $(foreach dep,[+deps], $($(dep)_DEPS)_[+builddir+]/stamp)
@+[+exports+]; [+extra_exports+]; $(MAKE) -C [+name+]_[+builddir+] $*
[+ enddef +]
[+ foreach main +]
[+ endfor +]