-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
37 lines (29 loc) · 1.45 KB
/
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
#
# *****************************************************************
# * Simple C++ Lexer Toolkit Library *
# * *
# * Author: Arash Partow (2001) *
# * URL: http://www.partow.net/programming/lexertk/index.html *
# * *
# * Copyright notice: *
# * Free use of the Simple C++ Lexer Toolkit Library is permitted *
# * under the guidelines and in accordance with the MIT License. *
# * http://www.opensource.org/licenses/MIT *
# * *
# *****************************************************************
#
COMPILER = -c++
OPTIMIZATION_OPT = -O2
BASE_OPTIONS = -ansi -pedantic-errors -Wall -Wextra -Werror -Wno-long-long
OPTIONS = $(BASE_OPTIONS) $(OPTIMIZATION_OPT) -o
LINKER_OPT = -L/usr/lib -lstdc++
BUILD_LIST+=lexertk_examples
all: $(BUILD_LIST)
lexertk_examples: lexertk_examples.cpp lexertk.hpp
$(COMPILER) $(OPTIONS) lexertk_examples lexertk_examples.cpp $(LINKER_OPT)
strip_bin:
strip -s lexertk_examples
valgrind_check:
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=lexertk_examples.log -v ./lexertk_examples
clean:
rm -f core.* *~ *.o *.bak *stackdump gmon.out *.gcda *.gcno *.gcnor *.gch