shithub: scc

ref: 352fd1411b9c35e90d824162229a6eb32dd9a7e2
dir: /src/cmd/cc/posix/Makefile/

View raw version
.POSIX:

PROJECTDIR = ../../../..
include $(PROJECTDIR)/scripts/rules.mk

# SYSLST is a list of backend-arch-abi-sys. First
# element of the list becomes the default target

SYSLST  =\
	amd64-sysv-linux-elf\
	z80-scc-none-none\
	i386-sysv-linux-elf\
	amd64-sysv-openbsd-elf\

TARGETS =\
	$(BINDIR)/scc-cc\
	$(BINDIR)/scc-cpp\
	$(BINDIR)/scc\

all: $(TARGETS)

$(BINDIR)/scc-cc: $(LIBSCC) cc.o
	$(CC) $(PROJ_LDFLAGS) cc.o -lscc -o $@

$(BINDIR)/scc-cpp: scc.sh
	cp scc.sh $@
	chmod +x $@

$(BINDIR)/scc: scc.sh
	cp scc.sh $@
	chmod +x $@

config.h:
	PREFIX=$(PREFIX) ./mkconf $(SYSLST)

clean:
	rm -f scc scpp *.o
	rm -f $(TARGETS)
	rm -f config.h

include deps.mk