all: scanner OBJS1 = sample_lex.o scanner.o TARGET1 = scanner $(TARGET1): $(OBJS1) $(CXX) $(OBJS1) -g -o $@ .c.o: $(CC) -g -c $< .C.o: $(CXX) -g -c $< sample_lex.c: sample_lex.l flex -osample_lex.c sample_lex.l clean: -rm $(OBJS1) $(TARGET1) sample_lex.c