shithub: scc

ref: 39b7bd0fe07005f621890f2a7601d3e38d367e7a
dir: /Makefile/

View raw version

OBJS = types.o decl.o lex.o error.o symbol.o
LIBS =

all: kcc

kcc: $(OBJS)
	$(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) $(OBJS) -o $@

%.d: %.c
	$(CC) -M $(CPPFLAGS) $< | \
	sed -e 's,/usr/[^ ]*,,g' | \
	egrep -v '^ *\\$$' > $@

.PHONY: clean distclean dep

dep: $(OBJS:.o=.d)
	cat Makefile $? > makefile
	rm -f *.d

clean:
	rm -f $(OBJS)
	rm -f cc

distclean: clean
	rm -f *~
	rm -f *.d
	rm -f makefile



###Dependencies