-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
43 lines (32 loc) · 917 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
38
39
40
41
42
43
CXXFLAGS = -std=c++11 -O
check: json_test.ok \
jsontestsuite_test.ok
clean:
rm -f *.o *.a *.ok *_test *.elf *.dbg
rm -rf .aarch64
json.o: json.cpp json.h
fuzz.o: fuzz.cpp json.h
fuzz: fuzz.o json.o double-conversion.a
json_test.o: json_test.cpp json.h
json_test: json_test.o json.o double-conversion.a
jsontestsuite_test.o: jsontestsuite_test.cpp json.h
jsontestsuite_test: jsontestsuite_test.o json.o double-conversion.a
%: %.o
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $(OUTPUT_OPTION) $^
%.ok: %
./$<
touch $@
################################################################################
# double-conversion
double-conversion.a: \
bignum.o \
bignum-dtoa.o \
cached-powers.o \
double-to-string.o \
fast-dtoa.o \
fixed-dtoa.o \
string-to-double.o \
strtod.o
$(AR) rcs $@ $^
%.o: double-conversion/%.cc
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $<