Commit | Line | Data |
---|---|---|
eb02fd64 | 1 | # |
131a3881 | 2 | # Makefile for directory with subdirs to build. |
eb02fd64 | 3 | # |
2b34da49 | 4 | # Last Mod Tue Apr 16 12:57:52 PDT 1991, by rich@sendai |
eb02fd64 RP |
5 | # |
6 | ||
f149eb99 RP |
7 | # $Id$ |
8 | ||
eb02fd64 | 9 | srcdir = . |
ec342d7d | 10 | destdir = /usr/local |
eb02fd64 | 11 | |
ec342d7d RP |
12 | #CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/ |
13 | #CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE) | |
eb02fd64 RP |
14 | |
15 | # These are roughly topologically sorted in order to make porting more | |
16 | # streamlined. | |
17 | ||
18 | SUBDIRS = | |
19 | NONSUBDIRS = | |
20 | SUBDIRS_INCLUDE = machine-dep | |
21 | ||
eb02fd64 | 22 | RANLIB = ranlib |
ec342d7d RP |
23 | AR = ar |
24 | AR_FLAGS = cqv | |
eb02fd64 RP |
25 | |
26 | #### host and target specific makefile fragments come in here. | |
ec342d7d | 27 | ### |
eb02fd64 RP |
28 | |
29 | subdir_do: $(SUBDIRS) $(TARGETDIRS) | |
30 | for i in $(SUBDIRS); \ | |
31 | do \ | |
32 | if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \ | |
ec342d7d RP |
33 | then echo .$(target) ; fi`$(subdir); \ |
34 | $(MAKE) \ | |
35 | "destdir=$(destdir)" \ | |
131a3881 | 36 | "AR=$(AR)" \ |
ec342d7d | 37 | "AR_FLAGS=$(AR_FLAGS)" \ |
eb02fd64 RP |
38 | "RANLIB=$(RANLIB)" $(DO)) ; \ |
39 | then true ; \ | |
40 | else exit 1 ; \ | |
41 | fi ;\ | |
42 | done | |
43 | ||
ec342d7d RP |
44 | all: |
45 | $(MAKE) subdir_do DO=all | |
eb02fd64 | 46 | |
2b34da49 RP |
47 | stage1: |
48 | $(MAKE) subdir_do DO=stage1 | |
49 | ||
50 | bootstrap: | |
51 | $(MAKE) all | |
52 | $(MAKE) stage1 | |
53 | ||
eb02fd64 RP |
54 | clean: |
55 | rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E | |
56 | $(MAKE) subdir_do DO=clean | |
57 | ||
bb335cf4 | 58 | install: |
ec342d7d | 59 | $(MAKE) subdir_do DO=install |
eb02fd64 RP |
60 | |
61 | # When installing include files, be sure that machine-dependent | |
62 | # files override machine-independent files. | |
63 | # Might be better to check for collisions? FIXME | |
64 | install_crt: | |
65 | $(MAKE) SUBDIRS=machine-dep DO=install_crt | |
66 | ||
67 | install_gnulib: | |
68 | $(MAKE) SUBDIRS=gnulib DO=install_gnulib | |
69 | ||
70 | install_include: | |
71 | $(MAKE) SUBDIRS=$(SUBDIRS_INCLUDE) DO=install_include | |
72 | ||
73 | install_lib: libc.a | |
74 | cp libc.a $(DESTDIR)/lib/libc.a | |
75 | ||
76 | etags tags: TAGS | |
77 | ||
78 | TAGS: FORCE | |
79 | etags `$(MAKE) ls` | |
80 | ||
81 | ls: | |
82 | @echo Makefile | |
83 | @for i in $(SUBDIRS); \ | |
84 | do \ | |
85 | (cd $$i; \ | |
86 | pwd=`pwd`; \ | |
87 | wd=`basename $$pwd`; \ | |
88 | for j in `$(MAKE) ls`; \ | |
89 | do \ | |
90 | echo $$wd/$$j; \ | |
91 | done) \ | |
92 | done | |
93 | ||
94 | FORCE: | |
95 | ||
96 | # with the gnu make, this is done automatically. | |
97 | ||
98 | Makefile: $(srcdir)/Makefile.in $(srcdir)/configure | |
131a3881 | 99 | (cd $(srcdir) ; \ |
f149eb99 RP |
100 | ./configure +destdir=$(destdir) +norecurse \ |
101 | `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \ | |
0df06ca0 | 102 | $(host) +target=$(target)) |
eb02fd64 RP |
103 | |
104 | # | |
105 | # $Log$ | |
2b34da49 RP |
106 | # Revision 1.9 1991/04/17 01:34:36 rich |
107 | # Added getopt for binutils, fixed problem with host dependancies in | |
108 | # configure.template. | |
109 | # | |
110 | # Revision 1.8 1991/04/15 23:43:45 rich | |
0df06ca0 RP |
111 | # Now handles multiple hosts and targets. |
112 | # | |
113 | # Revision 1.7 1991/04/13 13:06:16 tiemann | |
bb335cf4 MT |
114 | # Don't depend `install' on `all'. Actually, the way things work, all |
115 | # depends on things being incrementally installed, and install depends | |
116 | # on everything happening in a topological fashion. | |
117 | # | |
118 | # This will need to be worked on further, but for now it's ok. | |
119 | # | |
120 | # Revision 1.6 1991/04/13 10:04:14 rich | |
121 | # Now can build gas for a29k on a29k. | |
122 | # | |
123 | # Revision 1.5 1991/04/13 07:40:41 rich | |
f149eb99 RP |
124 | # Fixed an ordering bug. Now everything is built, and then installed. |
125 | # | |
126 | # Revision 1.4 1991/04/13 02:11:09 rich | |
ec342d7d RP |
127 | # Config cut 3. We now almost install a29k. |
128 | # | |
129 | # Revision 1.3 1991/04/11 02:41:53 rich | |
131a3881 | 130 | # Cut 2 config. Subdirs. |
eb02fd64 RP |
131 | # |
132 | # | |
133 | # | |
134 | ||
135 | # end of Makefile.in |