aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 88db71f6836c12a98d7af8030bc3298d66ed2078 (plain)
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
#
# Makefile for directory with subdirs to build.
#
# Last Mod Wed Apr 10 12:24:44 PDT 1991, by rich@sendai
#

srcdir = .
subdir = Host-$(host)/Target-$(target)

CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/
CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE)

# These are roughly topologically sorted in order to make porting more
# streamlined.

SUBDIRS =
NONSUBDIRS =
SUBDIRS_INCLUDE = machine-dep

TARGETLIB = libc.a
RANLIB = ranlib
AR = ar cqv

#### host and target specific makefile fragments come in here.

all: $(TARGETLIB)

subdir_do: $(SUBDIRS) $(TARGETDIRS)
	for i in $(SUBDIRS); \
	  do \
	    if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
		then echo .$(target) ; fi`/$(subdir); \
		$(MAKE)  \
		    "OSLAYER=../$(OSLAYER)" \
		    "TARGETLIB=../$(srcdir)/$(subdir)/$(TARGETLIB)" \
		    "AR=$(AR)" \
		    "RANLIB=$(RANLIB)" $(DO)) ; \
	    then true ; \
	    else exit 1 ; \
	    fi ;\
	  done

$(TARGETLIB): remove-old-copy
	@$(MAKE) subdir_do "DO=all"
	$(RANLIB) $(TARGETLIB)

remove-old-copy: FORCE
	rm -f $(TARGETLIB)

oldlibc.a: $(SUBDIRS) FORCE
	@$(MAKE) subdir_do DO=all
	rm -rf TEMP
	mkdir TEMP
# Extract files from all subdirs, making sure that none overwrites others.
	cd TEMP; for i in $(SUBDIRS); do\
	   ar x ../$$i/library.a;\
	   chmod a-w *;\
	done;
# Be sure if interrupted, no libc.a exists.
	rm -f libc.new
	cd TEMP; ar cq ../libc.new *
	ranlib libc.new
	mv libc.new libc.a
	rm -rf TEMP

clean:
	rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
	$(MAKE) subdir_do DO=clean

install: all install_include install_crt install_gnulib install_lib

# When installing include files, be sure that machine-dependent
# files override machine-independent files.
# Might be better to check for collisions?  FIXME
install_crt:
	$(MAKE) SUBDIRS=machine-dep DO=install_crt

install_gnulib:
	$(MAKE) SUBDIRS=gnulib DO=install_gnulib

install_include:
	$(MAKE) SUBDIRS=$(SUBDIRS_INCLUDE) DO=install_include

install_lib: libc.a
	cp libc.a $(DESTDIR)/lib/libc.a

etags tags: TAGS

TAGS: FORCE
	etags `$(MAKE) ls`

ls:
	@echo Makefile
	@for i in $(SUBDIRS); \
	do \
		(cd $$i; \
			pwd=`pwd`; \
			wd=`basename $$pwd`; \
			for j in `$(MAKE) ls`; \
			do \
				echo $$wd/$$j; \
			done) \
	done

FORCE:

# with the gnu make, this is done automatically.

Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
	(cd $(srcdir) ; \
		./configure `if [ "$(srcdir)" != "." ] ; then echo +f; fi` -host=$(host) $(target))

#
# $Log$
# Revision 1.3  1991/04/11 02:41:53  rich
# Cut 2 config.  Subdirs.
#
#
#

# end of Makefile.in