view Makefile @ 29:160e20394f80

macro function (imcomplete)
author kono
date Sat, 08 Feb 2003 04:14:23 +0900
parents df7fa8cee67b
children b35787d8a442
line wrap: on
line source

CC = gcc
CFLAGS = -g -Wall
BASE=0
STAGE=1
MFLAGS=$(MFALGS) BASE=$(BASE) STAGE=$(STAGE)
MC=mc
PRINTF= # printf.c

all: mc 

mc : mc-parse.o mc-nop-386.o mc-tree.o
	$(CC) -g mc-parse.o mc-nop-386.o mc-tree.o -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 *~

mc1 : b00.s b01.s mc-tree.o
	$(CC) -g -o $@ $(PRINTF) mc-tree.o b00.s b01.s 
b00.s : mc-parse.c mc
	./mc -s mc-parse.c
	mv mcout.s $@ 
b01.s : mc-nop-386.c mc
	./mc -s mc-nop-386.c 
	mv mcout.s $@ 
b10.s : mc-parse.c mc1
	./mc1 -s mc-parse.c
	mv mcout.s $@ 
b11.s : mc-nop-386.c $(PRINTF) mc1
	./mc1 -s mc-nop-386.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