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