-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile_standalone
39 lines (26 loc) · 974 Bytes
/
Makefile_standalone
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
CPPFLAGS=-g -Wall -Wextra
COMMON_SOURCES=ops.c parser.c ev_process.c
PARSER_SOURCES=config_bison.c config_lex.c
SOURCES_EDS=$(COMMON_SOURCES) evdevshift.c
SOURCES_SC1=$(COMMON_SOURCES) scafold1.c
OBJECTS_EDS=$(SOURCES_EDS:.c=.o) $(PARSER_SOURCES:.c=.o)
EXECUTABLE=evdevshift
all: $(EXECUTABLE)
clean:
rm -f *.o $(EXECUTABLE) scafold1 config_bison.* config_lex.c *.gcov *.gcda *.gcno
$(EXECUTABLE): $(OBJECTS_EDS)
$(SOURCES_EDS): $(PARSER_SOURCES)
config_bison.c config_bison.h : config.y
bison -r all -d -p eds -o config_bison.c config.y
config_lex.c : config.l config_bison.h
flex -o $@ -P eds $<
test_old: scafold1
./scafold1 test.conf
gcov ev_process.c
test: $(EXECUTABLE)_dbg
./scafold2.py --config test1.conf
gcov evdevshift.c ev_process.c ops.c parser.c
scafold1: $(SOURCES_SC1) $(PARSER_SOURCES)
gcc -o $@ -g -fprofile-arcs -ftest-coverage $^
$(EXECUTABLE)_dbg: $(SOURCES_EDS) $(PARSER_SOURCES)
gcc -o $@ -g -fprofile-arcs -ftest-coverage $^