1 | # $Id: Makefile.in,v 1.13 2008/12/19 08:08:48 ragge Exp $
|
---|
2 | #
|
---|
3 | # Makefile for the Fortran 77 command
|
---|
4 | # Running on the @targmach@
|
---|
5 | # Generating code for the @targmach@
|
---|
6 | # Using the Johnson C compiler's second pass (binary version)
|
---|
7 | VPATH=@srcdir@
|
---|
8 | srcdir=@srcdir@
|
---|
9 | top_srcdir=@top_srcdir@
|
---|
10 | builddir=@builddir@
|
---|
11 | top_builddir=@top_builddir@
|
---|
12 | XFL=-DPCC_DEBUG -Wall -Wmissing-prototypes -Wstrict-prototypes -Werror \
|
---|
13 | -Werror -Wshadow -Wsign-compare
|
---|
14 |
|
---|
15 | CC = @CC@
|
---|
16 | CC_FOR_BUILD = @CC_FOR_BUILD@
|
---|
17 | CFLAGS = @CFLAGS@ @ADD_CFLAGS@
|
---|
18 | CPPFLAGS = @CPPFLAGS@ ${XFL} -DFCOM -DLANG_F77 -Dos_${TARGOS} \
|
---|
19 | -I${srcdir} -I${builddir} -I${top_builddir} \
|
---|
20 | -I${MIPDIR} -I${MDIR} -Dmach_${TARGMACH} -I${top_srcdir}/os/${TARGOS}
|
---|
21 | LIBS = @LIBS@
|
---|
22 | LDFLAGS = @LDFLAGS@
|
---|
23 | TARGOS = @targos@
|
---|
24 | TARGMACH = @targmach@
|
---|
25 | prefix = @prefix@
|
---|
26 | exec_prefix = @exec_prefix@
|
---|
27 | libexecdir = @libexecdir@
|
---|
28 | datarootdir = @datarootdir@
|
---|
29 | mandir = @mandir@
|
---|
30 | strip = @strip@
|
---|
31 | INSTALL = @INSTALL@
|
---|
32 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
---|
33 | YFLAGS = -d
|
---|
34 |
|
---|
35 | MDIR=$(top_srcdir)/arch/$(TARGMACH)
|
---|
36 | MIPDIR=$(top_srcdir)/mip
|
---|
37 |
|
---|
38 | DEST=@BINPREFIX@fcom
|
---|
39 |
|
---|
40 | OBJS1 = main.o init.o proc.o gram.o lex.o \
|
---|
41 | equiv.o data.o expr.o exec.o intr.o io.o misc.o error.o\
|
---|
42 | put.o putscj.o flocal.o
|
---|
43 |
|
---|
44 | OBJS2=match.o reader.o optim2.o regs.o local2.o order.o table.o
|
---|
45 |
|
---|
46 | OBJS=$(OBJS1) $(OBJS2) common.o external.o
|
---|
47 |
|
---|
48 | all: ${DEST}
|
---|
49 |
|
---|
50 | ${DEST}: $(OBJS)
|
---|
51 | $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
|
---|
52 |
|
---|
53 | gram.c: gram.head gram.dcl gram.expr gram.exec gram.io tokdefs
|
---|
54 | ( sed <tokdefs "s/#define/%token/" ;\
|
---|
55 | cat gram.head gram.dcl gram.expr gram.exec gram.io ) >gram.in
|
---|
56 | $(YACC) $(YFLAGS) gram.in
|
---|
57 | mv y.tab.c gram.c
|
---|
58 | mv y.tab.h gram.h
|
---|
59 | rm gram.in
|
---|
60 |
|
---|
61 | tokdefs: tokens
|
---|
62 | grep -n . <tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs
|
---|
63 |
|
---|
64 | lex.o : tokdefs
|
---|
65 | driver.o $(OBJS) : defs.h defines.h ftypes.h
|
---|
66 |
|
---|
67 | clean:
|
---|
68 | /bin/rm -f $(OBJS) ${DEST} gram.in gram.[ch] tokdefs \
|
---|
69 | mkext external.[ch]
|
---|
70 |
|
---|
71 | distclean: clean
|
---|
72 | /bin/rm -f Makefile
|
---|
73 |
|
---|
74 | install:
|
---|
75 | ${INSTALL_PROGRAM} ${DEST} ${libexecdir}
|
---|
76 | @if [ ${strip} = yes ]; then \
|
---|
77 | strip ${libexecdir}/${DEST} ; \
|
---|
78 | echo strip ${libexecdir}/${DEST} ; \
|
---|
79 | fi
|
---|
80 |
|
---|
81 | .c.o :
|
---|
82 | $(CC) -c $(CFLAGS) $(CPPFLAGS) $*.c
|
---|
83 |
|
---|
84 | flocal.o: $(MDIR)/flocal.c
|
---|
85 | $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $(MDIR)/flocal.c
|
---|
86 |
|
---|
87 | local2.o: $(MDIR)/local2.c
|
---|
88 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MDIR)/local2.c
|
---|
89 |
|
---|
90 | order.o: $(MDIR)/order.c
|
---|
91 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MDIR)/order.c
|
---|
92 |
|
---|
93 | table.o: $(MDIR)/table.c
|
---|
94 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MDIR)/table.c
|
---|
95 |
|
---|
96 | match.o: $(MIPDIR)/match.c
|
---|
97 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/match.c
|
---|
98 |
|
---|
99 | reader.o: $(MIPDIR)/reader.c
|
---|
100 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/reader.c
|
---|
101 |
|
---|
102 | optim2.o: $(MIPDIR)/optim2.c
|
---|
103 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/optim2.c
|
---|
104 |
|
---|
105 | regs.o: $(MIPDIR)/regs.c
|
---|
106 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/regs.c
|
---|
107 |
|
---|
108 | compat.o: $(MIPDIR)/compat.c
|
---|
109 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/compat.c
|
---|
110 |
|
---|
111 | common.o: $(MIPDIR)/common.c
|
---|
112 | $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/common.c
|
---|
113 |
|
---|
114 | external.h external.c: ${MIPDIR}/mkext.c $(MDIR)/table.c
|
---|
115 | $(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS) $(CFLAGS) -DMKEXT -o mkext \
|
---|
116 | ${MIPDIR}/mkext.c $(MDIR)/table.c ${MIPDIR}/common.c
|
---|
117 | ./mkext
|
---|
118 | -rm -f mkext.o table.o common.o
|
---|
119 |
|
---|
120 | $(OBJS): external.h
|
---|
121 |
|
---|