]>
Commit | Line | Data |
---|---|---|
0545aa1a MW |
1 | srcdir = . |
2 | prefix = /usr/local | |
3 | ||
60100886 | 4 | program_transform_name = |
0545aa1a MW |
5 | exec_prefix = $(prefix) |
6 | bindir = $(exec_prefix)/bin | |
7 | libdir = $(exec_prefix)/lib | |
8 | tooldir = $(libdir)/$(target_alias) | |
9 | ||
10 | datadir = $(exec_prefix)/lib/deja-gnu | |
11 | mandir = $(prefix)/man | |
12 | man1dir = $(mandir)/man1 | |
13 | man2dir = $(mandir)/man2 | |
14 | man3dir = $(mandir)/man3 | |
15 | man4dir = $(mandir)/man4 | |
16 | man5dir = $(mandir)/man5 | |
17 | man6dir = $(mandir)/man6 | |
18 | man7dir = $(mandir)/man7 | |
19 | man8dir = $(mandir)/man8 | |
20 | man9dir = $(mandir)/man9 | |
21 | infodir = $(prefix)/info | |
22 | includedir = $(prefix)/include | |
23 | gxx_includedir = $(tooldir)/g++-include | |
24 | docdir = $(datadir)/doc | |
25 | targetdir = $(datadir)/$(target_alias) | |
26 | ||
27 | SHELL = /bin/sh | |
28 | ||
29 | INSTALL = install -c | |
30 | INSTALL_PROGRAM = $(INSTALL) | |
31 | INSTALL_DATA = $(INSTALL) | |
32 | ||
33 | $(start-sanitize-chill) | |
34 | CFLAGS = -g | |
35 | CHILLFLAGS = $(CFLAGS) | |
36 | CHILL_LIB = -lchill | |
37 | $(end-sanitize-chill) | |
60100886 RS |
38 | |
39 | CC_FOR_TARGET = ` \ | |
40 | if [ -f $${rootme}/../../gcc/xgcc ] ; then \ | |
41 | echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \ | |
42 | else \ | |
43 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
44 | echo $(CC); \ | |
45 | else \ | |
46 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
47 | fi; \ | |
48 | fi` | |
49 | ||
0545aa1a | 50 | CXX = gcc |
60100886 RS |
51 | CXX_FOR_TARGET = ` \ |
52 | if [ -f $${rootme}/../../gcc/xgcc ] ; then \ | |
53 | echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \ | |
54 | else \ | |
55 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
56 | echo $(CXX); \ | |
57 | else \ | |
58 | t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ | |
59 | fi; \ | |
60 | fi` | |
61 | ||
0545aa1a MW |
62 | CXXFLAGS = -g -O |
63 | ||
60100886 RS |
64 | EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; \ |
65 | then echo $${rootme}/../../expect/expect ; \ | |
66 | else echo expect; fi` | |
67 | ||
0545aa1a MW |
68 | LINK= ln -s |
69 | SUBDIRS= | |
70 | ||
c3361cd3 RS |
71 | RUNTEST = runtest |
72 | RUNTESTFLAGS = | |
4447efa2 ILT |
73 | FLAGS_TO_PASS = \ |
74 | "CC=$(CC)" \ | |
60100886 | 75 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
4447efa2 | 76 | "CFLAGS=$(CFLAGS)" |
0545aa1a MW |
77 | |
78 | #### host, target, and site specific Makefile frags come in here. | |
79 | ||
0545aa1a MW |
80 | all: subdirs |
81 | ||
82 | .NOEXPORT: | |
83 | INFODIRS=doc | |
84 | info: | |
85 | @rootme=`pwd`/ ; export rootme ; \ | |
86 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
87 | $(MAKE) subdir_do DO=info "DODIRS=$(INFODIRS)" $(FLAGS_TO_PASS) | |
9ef534b9 | 88 | |
0545aa1a MW |
89 | install-info: |
90 | @rootme=`pwd`/ ; export rootme ; \ | |
91 | $(MAKE) subdir_do DO=install-info "DODIRS=$(INFODIRS)" $(FLAGS_TO_PASS) | |
92 | ||
9ef534b9 | 93 | check: site.exp all |
60100886 | 94 | $(RUNTEST) $(RUNTESTFLAGS) |
9ef534b9 RS |
95 | |
96 | site.exp: ./config.status Makefile | |
97 | @echo "Making a new config file..." | |
98 | -@rm -f ./tmp? | |
99 | @touch site.exp | |
9ef534b9 RS |
100 | -@mv site.exp site.bak |
101 | @echo "## these variables are automatically generated by make ##" > ./tmp0 | |
102 | @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 | |
103 | @echo "# add them to the last section" >> ./tmp0 | |
9ef534b9 RS |
104 | @echo "set host_triplet ${host_canonical}" >> ./tmp0 |
105 | @echo "set target_triplet ${target_canonical}" >> ./tmp0 | |
106 | @echo "set tool binutils" >> ./tmp0 | |
60100886 RS |
107 | @echo "set srcdir ${srcdir}" >> ./tmp0 |
108 | @echo "set RANLIB [findfile \$$base_dir/../ranlib]" >> ./tmp0 | |
109 | @echo "set OBJCOPY [findfile \$$base_dir/../objcopy]" >> ./tmp0 | |
110 | @echo "set STRIP [findfile \$$base_dir/../strip]" >> ./tmp0 | |
111 | @echo "set STRINGS [findfile \$$base_dir/../strings]" >> ./tmp0 | |
112 | @echo "set NM [findfile \$$base_dir/../nm]" >> ./tmp0 | |
113 | @echo "set OBJDUMP [findfile \$$base_dir/../objdump]" >> ./tmp0 | |
114 | @echo "set SIZE [findfile \$$base_dir/../size]" >> ./tmp0 | |
9ef534b9 RS |
115 | @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 |
116 | @cat ./tmp0 > site.exp | |
117 | @cat site.bak | sed \ | |
118 | -e '1,/^## All variables above are.*##/ d' >> site.exp | |
119 | -@rm -f ./tmp? | |
0545aa1a | 120 | |
c3361cd3 | 121 | install: |
0545aa1a | 122 | uninstall: force |
0545aa1a MW |
123 | |
124 | subdir_do: force | |
125 | @for i in $(DODIRS); do \ | |
126 | if [ -d ./$$i ] ; then \ | |
127 | if (rootme=`pwd`/ ; export rootme ; \ | |
128 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
129 | cd ./$$i; \ | |
130 | $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ | |
131 | else exit 1 ; fi ; \ | |
132 | else true ; fi ; \ | |
133 | done | |
134 | force: | |
135 | ||
136 | ||
137 | subdirs: | |
138 | for dir in ${SUBDIRS}; \ | |
139 | do \ | |
140 | echo "$$dir:"; \ | |
141 | if [ -d $$dir ]; then \ | |
142 | (rootme=`pwd`/ ; export rootme ; \ | |
143 | rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \ | |
144 | cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \ | |
145 | fi; \ | |
146 | done | |
147 | ||
148 | clean: | |
149 | -rm -f *~ core *.o a.out xgdb *.x | |
150 | for dir in ${SUBDIRS}; \ | |
151 | do \ | |
152 | echo "$$dir:"; \ | |
153 | if [ -d $$dir ]; then \ | |
154 | (cd $$dir; $(MAKE) clean); \ | |
155 | fi; \ | |
156 | done | |
157 | ||
158 | distclean: clean | |
159 | -rm -f *~ core | |
160 | -rm -f Makefile config.status *-init.exp | |
161 | -rm -fr *.log summary detail | |
162 | for dir in ${SUBDIRS}; \ | |
163 | do \ | |
164 | echo "$$dir:"; \ | |
165 | (cd $$dir; $(MAKE) distclean); \ | |
166 | done | |
167 | ||
168 | Makefile : $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) | |
169 | $(SHELL) ./config.status | |
170 |