shithub: scc

ref: 8603664509dc8ef2576905a692bfca40d737637a
dir: /cc2/Makefile/

View raw version
.POSIX:

PROJECTDIR = ..
include $(PROJECTDIR)/rules.mk
include $(LIBSCC)/libdep.mk

MOREFLAGS = -I$(PROJECTDIR)/inc/$(STD) $(CC2_CFLAGS)

OBJ = main.o parser.o peep.o symbol.o node.o code.o optm.o

all:
	cp cc2-* $(PROJECTDIR)/rootdir/libexec/scc/

dep:
	$(PROJECTDIR)/mkdep.sh

main.o: error.h

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

clean:
	rm -f *.o
	rm -f target/*/*.o
	rm -f cc2-* error.h

include target/amd64-sysv/target.mk
include target/i386-sysv/target.mk
include target/qbe_amd64-sysv/target.mk
include target/qbe_arm64-sysv/target.mk
include target/z80-scc/target.mk
include deps.mk