forked from lijoantony/JsonBenchmarkCpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (36 loc) · 1.11 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
38
39
40
41
42
43
44
45
46
# Makefile for JsonBenchmarkCpp
# A small program to compare perfomance of different json libs available
#
# Copyright Lijo Antony 2011
# Distributed under Apache License, Version 2.0
# see accompanying file LICENSE.txt
CC=g++
CFLAGS=-c -Wall
LDFLAGS=libs/libjson/libjson/libjson.a -lrt libs/json_spirit/json_spirit_v4.05/build/json_spirit/libjson_spirit.a
OBJECTS=$(SOURCES:.cpp=.o)
INCLUDE=\
-Ilibs/cajun/cajun\
-Ilibs/json_spirit/json_spirit_v4.05/json_spirit\
-Ilibs/libjson/libjson\
EXECUTABLE=JsonBenchmarkCpp
SOURCES=main.cpp
all: cajun json_spirit libjson $(SOURCES) $(EXECUTABLE)
cajun:
if [ ! -d "libs/cajun/cajun" ]; then\
unzip libs/cajun/cajun.zip -d libs/cajun;\
fi
json_spirit:
if [ ! -d "libs/json_spirit/json_spirit_v4.05" ]; then\
unzip libs/json_spirit/json_spirit_v4_05.zip -d libs/json_spirit;\
fi
libjson:
if [ ! -d "libs/libjson/libjson" ]; then\
unzip libs/libjson/libjson_7.4.0.zip -d libs/libjson;\
make -w -Clibs/libjson/libjson;\
fi
$(EXECUTABLE): $(OBJECTS)
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $(INCLUDE) $< -o $@
clean:
\rm *.o $(EXECUTABLE)