shithub: scc

ref: 20617bae7d7e87b7c3a924395850abb957f3aa35
dir: /Makefile/

View raw version

OBJS = types.o decl.o lex.o error.o symbol.o flow.o main.o expr.o \
	wrapper.o tree.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 kcc

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



###Dependencies