-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 833 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Makefile for the NPL converter
#
CFLAGS = -g
CXXFLAGS = -g
test_driver: test_driver.o npl-scanner.o npl-to-wshark.o
$(CXX) -o test_driver test_driver.o npl-scanner.o npl-to-wshark.o -lm -lfl
test_driver.o: test_driver.cpp npl-scanner.yy.h
npl-scanner.o: npl-scanner.yy.h npl-scanner.yy.cpp npl-to-wshark.h
$(CXX) -c -o npl-scanner.o npl-scanner.yy.cpp
npl-to-wshark.o: npl-to-wshark.cpp
npl-scanner.yy.cpp: flexfiles lemonfiles
npl-scanner.yy.h: flexfiles lemonfiles
npl-to-wshark.h: lemonfiles
.PHONY: flexfiles
flexfiles: npl-scanner.l
flex --outfile=npl-scanner.yy.cpp --header-file=npl-scanner.yy.h npl-scanner.l
.PHONY: lemonfiles
lemonfiles: npl-to-wshark.y
lemon npl-to-wshark.y -s
mv npl-to-wshark.c npl-to-wshark.cpp
.PHONY: clean
clean:
rm npl-to-wshark.cpp
rm npl-to-wshark.out
rm *.o
rm test_driver