xref: /386bsd/usr/src/usr.bin/g++/cc1plus/Makefile (revision a2142627)
1#	@(#)Makefile	6.4 (Berkeley) 5/6/91
2
3PROG=		cc1plus
4BINDIR=		/usr/libexec
5SRCS=		$(CINSN) aux-output.c c-common.c \
6		caller-save.c calls.c combine.c convert.c \
7		cp-parse.c \
8		cp-call.c cp-class.c cp-cvt.c cp-decl.c cp-decl2.c \
9		cp-edsel.c cp-except.c cp-expr.c cp-gc.c cp-init.c \
10		cp-lex.c cp-method.c cp-pt.c cp-ptree.c cp-search.c \
11		cp-spew.c cp-tree.c cp-type2.c cp-typeck.c cp-xref.c \
12		cse.c dbxout.c emit-rtl.c \
13		explow.c expmed.c expr.c final.c flow.c fold-const.c \
14		function.c getpwd.c global.c integrate.c jump.c local-alloc.c \
15		loop.c obstack.c optabs.c print-rtl.c print-tree.c real.c \
16		recog.c \
17		reg-stack.c regclass.c reload.c reload1.c reorg.c rtl.c \
18		rtlanal.c sched.c stmt.c stor-layout.c stupid.c \
19		toplev.c tree.c unroll.c varasm.c version.c
20
21#OBJS+=		cp-parse.o
22CFLAGS+=	-DIN_GCC -DUSE_COLLECT2 -I- -I. -I$(.CURDIR) -I$(.CURDIR)/../../gcc/cc1 \
23		-I$(.CURDIR)/../../gcc/cc1/config
24NOMAN=		noman
25#CLEANFILES+=	$(HINSN) $(CINSN) cp-parse.c cp-parse.h y.tab.h
26CLEANFILES+=	$(HINSN) $(CINSN)
27.PATH:		$(.CURDIR)/../../gcc/cc1
28
29#$(.CURDIR)/cp-lex.c:	cp-parse.h
30
31#cp-parse.h cp-parse.c:
32#	${YACC} -d ${.IMPSRC} ?
33#	${YACC} -d $(.CURDIR)/cp-parse.y
34#	mv y.tab.c cp-parse.c
35#	mv y.tab.h cp-parse.h
36#
37# Some machine-dependent source files are generated from
38# the machine description file.
39#
40
41HINSN=	insn-attr.h insn-codes.h insn-config.h insn-flags.h
42CINSN1=	insn-emit.c insn-extract.c insn-output.c \
43	insn-peep.c insn-recog.c insn-opinit.c
44CINSN2=	insn-attrtab.c
45CINSN=	$(CINSN1) $(CINSN2)
46GEN=	genattr.c genattrtab.c gencodes.c genconfig.c genemit.c \
47	genextract.c genflags.c genoutput.c genpeep.c genrecog.c \
48	genopinit.c
49
50$(CINSN):	md rtl.o rtlanal.o obstack.o $(GEN)
51	for f in $(HINSN) $(CINSN1); do \
52		p=`expr $$f : "insn-\(.*\)\.[ch]"`; \
53		$(CC) $(CFLAGS) $(.CURDIR)/../../gcc/cc1/gen$$p.c rtl.o obstack.o -o gen; \
54		./gen md > $$f; \
55	done
56	$(CC) $(CFLAGS) $(.CURDIR)/../../gcc/cc1/genattrtab.c \
57		rtl.o rtlanal.o obstack.o -o gen
58	 ./gen md > insn-attrtab.c
59	rm -f gen
60
61.include <bsd.prog.mk>
62.include "../Makefile.symlinks"
63