]>
Commit | Line | Data |
---|---|---|
b0b70d84 AC |
1 | # Makefile for libada. |
2 | # Copyright 2003, 2004 Free Software Foundation, Inc. | |
3 | # | |
4 | # This file is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
6 | # the Free Software Foundation; either version 2 of the License, or | |
7 | # (at your option) any later version. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
17 | ||
18 | # Default target; must be first. | |
5395b47b | 19 | all: gnatlib |
b0b70d84 AC |
20 | |
21 | # Standard autoconf-set variables. | |
22 | SHELL = @SHELL@ | |
23 | srcdir = @srcdir@ | |
24 | build = @build@ | |
25 | target = @target@ | |
80dab182 | 26 | prefix = @prefix@ |
b0b70d84 AC |
27 | |
28 | # Nonstandard autoconf-set variables. | |
80dab182 NN |
29 | enable_shared = @enable_shared@ |
30 | LN_S=@LN_S@ | |
80dab182 NN |
31 | |
32 | # Variables for the user (or the top level) to override. | |
33 | objext=.o | |
34 | GNATLIBFLAGS= -W -Wall -gnatpg | |
35 | THREAD_KIND=native | |
36 | TRACE=no | |
80dab182 NN |
37 | LDFLAGS= |
38 | STAGE_PREFIX= | |
39 | ||
40 | # The tedious process of getting CFLAGS right. | |
41 | CFLAGS=-g | |
42 | LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes | |
43 | GCC_WARN_CFLAGS = $(LOOSE_WARN) $(NOCOMMON_FLAG) | |
b0b70d84 | 44 | |
80dab182 NN |
45 | ADA_CFLAGS= |
46 | T_ADA_CFLAGS= | |
47 | # HPPA is literally the only target which sets X_ADA_CFLAGS | |
48 | X_ADA_CFLAGS=@x_ada_cflags@ | |
49 | ALL_ADA_CFLAGS=$(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS) | |
b0b70d84 | 50 | |
80dab182 | 51 | # For finding the GCC build dir, which is used far too much |
215c351a | 52 | GCC_DIR=../../$(HOST_SUBDIR)/gcc |
80dab182 NN |
53 | # Include fragment generated by GCC configure. |
54 | include $(GCC_DIR)/libada-mk | |
b0b70d84 | 55 | |
80dab182 NN |
56 | TARGET_LIBGCC2_CFLAGS= |
57 | GNATLIBCFLAGS= -g -O2 | |
58 | # Get target-specific overrides for TARGET_LIBGCC2_CFLAGS | |
59 | # and possibly GNATLIBCFLAGS. Currently this uses files | |
60 | # in gcc/config. The 'subst' call is used to rerelativize them | |
61 | # from their gcc locations. This is hackery, but there isn't | |
62 | # yet a better way to do this. | |
63 | tmake_file=$(subst /config,/../gcc/config,$(gcc_tmake_file)) | |
64 | ifneq ($(tmake_file),) | |
65 | include $(tmake_file) | |
66 | endif | |
b0b70d84 | 67 | |
80dab182 NN |
68 | FLAGS_TO_PASS = \ |
69 | "MAKEOVERRIDES=" \ | |
70 | "LDFLAGS=$(LDFLAGS)" \ | |
71 | "LN_S=$(LN_S)" \ | |
72 | "SHELL=$(SHELL)" \ | |
73 | "exeext=$(exeext)" \ | |
74 | "objext=$(objext)" \ | |
75 | "prefix=$(prefix)" \ | |
76 | "STAGE_PREFIX=$(STAGE_PREFIX)" \ | |
5395b47b | 77 | "CC=$(host_cc_for_libada)" \ |
40077270 | 78 | "GCC_FOR_TARGET=$(CC)" \ |
80dab182 NN |
79 | "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" |
80 | ||
b0b70d84 | 81 | # Rules to build gnatlib. |
c2b5e13b | 82 | .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared |
80dab182 NN |
83 | gnatlib: @default_gnatlib_target@ |
84 | ||
5395b47b NN |
85 | gnatlib-plain: $(GCC_DIR)/ada/Makefile |
86 | test -f stamp-libada || \ | |
80dab182 NN |
87 | $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \ |
88 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ | |
89 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
80dab182 NN |
90 | TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \ |
91 | THREAD_KIND="$(THREAD_KIND)" \ | |
e9f4e557 | 92 | TRACE="$(TRACE)" \ |
5395b47b NN |
93 | gnatlib \ |
94 | && touch stamp-libada | |
80dab182 | 95 | |
5395b47b NN |
96 | gnatlib-sjlj gnatlib-zcx gnatlib-shared: $(GCC_DIR)/ada/Makefile |
97 | test -f stamp-libada || \ | |
80dab182 | 98 | $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \ |
e9f4e557 NN |
99 | GNATLIBFLAGS="$(GNATLIBFLAGS)" \ |
100 | GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ | |
101 | TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \ | |
102 | THREAD_KIND="$(THREAD_KIND)" \ | |
103 | TRACE="$(TRACE)" \ | |
5395b47b NN |
104 | $@ \ |
105 | && touch stamp-libada | |
e9f4e557 | 106 | |
b0b70d84 AC |
107 | # Check uninstalled version. |
108 | check: | |
109 | ||
110 | # Check installed version. | |
111 | installcheck: | |
112 | ||
113 | # Build info (none here). | |
114 | info: | |
115 | ||
116 | # Build DVI (none here). | |
117 | dvi: | |
118 | ||
a8384928 BM |
119 | # Build PDF (none here). |
120 | pdf: | |
121 | ||
01a1e85a JW |
122 | # Build html (none here). |
123 | html: | |
124 | ||
b0b70d84 AC |
125 | # Build TAGS (none here). |
126 | TAGS: | |
127 | ||
128 | # Installation rules. | |
129 | install: | |
130 | ||
131 | install-info: | |
132 | ||
312e3fcb CD |
133 | install-html: |
134 | ||
b0b70d84 AC |
135 | # Cleaning rules. |
136 | mostlyclean: | |
137 | ||
138 | clean: | |
139 | ||
140 | distclean: | |
141 | $(RM) Makefile config.status config.log | |
142 | ||
143 | maintainer-clean: | |
144 | ||
145 | # Rules for rebuilding this Makefile. | |
146 | Makefile: $(srcdir)/Makefile.in config.status | |
147 | CONFIG_FILES=$@ ; \ | |
148 | CONFIG_HEADERS= ; \ | |
149 | $(SHELL) ./config.status | |
150 | ||
151 | config.status: $(srcdir)/configure | |
152 | $(SHELL) ./config.status --recheck | |
153 | ||
e9f4e557 | 154 | $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac |
b0b70d84 | 155 | cd $(srcdir) && autoconf |
54b2f310 DJ |
156 | |
157 | # Don't export variables to the environment, in order to not confuse | |
158 | # configure. | |
159 | .NOEXPORT: |