view Makefile @ 62:129f4802b027

separation done
author kono
date Thu, 20 Feb 2003 05:27:29 +0900
parents 8ffb8ca3fe34
children 8ad746efa4f8
line wrap: on
line source

CC = gcc
CFLAGS = -g -Wall -I.
BASE=0
STAGE=1
MFLAGS=$(MFALGS) BASE=$(BASE) STAGE=$(STAGE)
MC=mc
PRINTF= # printf.c
CONVERTER=conv/c.o conv/c2cbc.o conv/cbc2c.o conv/null.o

all: mc 

mc : mc-parse.o mc-codegen.o mc-code-ia32.o mc-tree.o $(CONVERTER)
	$(CC) -g mc-parse.o mc-codegen.o mc-code-ia32.o \
		mc-tree.o $(CONVERTER) -o $@

tar :
	make clean
	tar cBf - . | gzip > ../comp.tgz 

depend :
	makedepend mc-parse.c mc-nop-386.c mc-tree.c

clean :
	-rm -f *.s *.o mc mc1 a.out *~ core* */*.o

mc1 : b00.s b01.s mc-codegen.o mc-tree.o $CONVERTER
	$(CC) -g -o $@ $(PRINTF) b00.s b01.s mc-codegen.o mc-tree.o $CONVERTER
b00.s : mc-parse.c mc
	./mc -s mc-parse.c
	mv mcout.s $@ 
b01.s : mc-code-ia32.c mc
	./mc -s mc-code-ia32.c 
	mv mcout.s $@ 
b10.s : mc-parse.c mc1
	./mc1 -s mc-parse.c
	mv mcout.s $@ 
b11.s : mc-code-ia32.c $(PRINTF) mc1
	./mc1 -s mc-code-ia32.c 
	mv mcout.s $@ 

diff :  b00.s b01.s b10.s b11.s
	-diff b00.s b10.s
	-diff b01.s b11.s
# DO NOT DELETE

mc-parse.o: mc.h stdio.h
mc-nop-386.o: mc.h stdio.h
mc-tree.o: mc.h stdio.h