shithub: scc

ref: 7237e9631e196ccca0f772dca2d301d443a019b3
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

all: kcc

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

.PHONY: clean distclean dep

dep:
	(cat Makefile; \
	for i in $(OBJS:.o=.c); \
	do \
		$(CC) -MM $(CPPFLAGS) $$i; \
	done) > makefile

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

distclean: clean
	rm -f *~
	rm -f tags
	rm -f cscope.*
	rm -f makefile

###Dependencies