CC = gcc -std=c99 -pedantic -Wall -O2 -s OBJS = scan.o TMPS = scan.c DEST = ../../bin/rmcmts # -L needed if flex library is in non-standard location, e.g. -L/opt/flex/lib rmcmts: $(OBJS) Makefile $(CC) -o rmcmts $(OBJS) -lfl # flex -d enables debug scan.c: scan.l Makefile flex -t scan.l >scan.c install: rmcmts rm -f $(DEST) mv rmcmts $(DEST) chown root:root $(DEST) chmod 111 $(DEST) clean: rm -f a.out core $(OBJS) $(TMPS) rmcmts