aboutsummaryrefslogtreecommitdiff
path: root/Makefiles/lex.mk
blob: 3c6802f4476c553c3b274617aa554581a80d681c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
.POSIX:

CC = cc
CFLAGS =                                                                        \
	-Wall -Wextra -Wpedantic -Werror                                            \
	 -march=native -mtune=native -O3 -flto                                      \
	 -pipe

ALL = ${CC} ${CFLAGS} ${CPPFLAGS} ${LDLIBS}

all:
	flex -f -DYY_NO_INPUT --nounput puzzles.l
	${ALL} -lfl -DPART1 -o puzzle-1 lex.yy.c
	${ALL} -lfl -DPART2 -o puzzle-2 lex.yy.c
	rm lex.yy.c

clean:
	rm -f puzzle-[12]