16 lines
194 B
Makefile
16 lines
194 B
Makefile
FLEX = flex
|
|
CC = gcc
|
|
|
|
BIN = target
|
|
|
|
all: dirs 1 2 3 4
|
|
|
|
dirs:
|
|
mkdir -p $(BIN)
|
|
|
|
%: %.lex
|
|
$(FLEX) -o $(BIN)/$@.lex.yy.c $<
|
|
$(CC) $(BIN)/$@.lex.yy.c -lfl -lm -o $(BIN)/$@
|
|
|
|
clean:
|
|
rm -rfv $(BIN)
|