-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile
executable file
·37 lines (27 loc) · 915 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
# A Ridiculously Simple JSON Parser for C++ (RSJp-cpp)
# Makefile for compiling examples
# Change these if needed or pass as input parameter
PREFIX = /usr/local
# ================================
# INCLUDE FOLDER
# --------------
INC_FOLDER = $(PREFIX)/include
# --------------------------------------------
# Install
.PHONY: install
install:
cp RSJparser.tcc $(INC_FOLDER)
find $(INC_FOLDER)/RSJparser.tcc -type d -exec chmod 755 {} \;
find $(INC_FOLDER)/RSJparser.tcc -type f -exec chmod 644 {} \;
.PHONY: uninstall
uninstall:
rm -rf $(INC_FOLDER)/RSJparser.tcc
# --------------------------------------------
# Examples
.PHONY: tests
tests:
cd tests && \
g++ -std=gnu++11 -I.. -Og -o json_example json_example.cpp && \
g++ -std=gnu++11 -I.. -Og -o benchmark benchmark.cpp && \
g++ -std=gnu++11 -I.. -Og -c utils.cpp && \
g++ -std=gnu++11 -I.. -Og -o parse_file_test utils.o parse_file_test.cpp