shithub: scc

ref: 3eae8536814569284d81bae4e5bdae82b1b9b3e8
dir: /cc2/Makefile/

View raw version
include ../config.mk

OBJS = main.o parser.o cgen.o code.o optm.o peep.o

all: cc2

.POSIX:

$(OBJS): ../inc/cc.h ../inc/sizes.h cc2.h
main.o: error.h

error.h: cc2.h
	rm -f $@; trap 'rm -f $$$$.h' EXIT INT QUIT
	awk -f generror cc2.h > $$$$.h && mv $$$$.h $@

cc2: $(OBJS) ../lib/libcc.a
	$(CC) $(LDFLAGS) $(OBJS) ../lib/libcc.a -o $@

clean:
	rm -f $(OBJS)
	rm -f cc2 error.h