-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.FvTest
108 lines (95 loc) · 3.28 KB
/
Makefile.FvTest
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#----------------------------------------------------------------------------
# Macros
#----------------------------------------------------------------------------
CFG = Debug
ifeq ($(CFG), Debug)
CXX = g++
LD = $(CXX) $(CCFLAGS) $(CPPFLAGS)
AR = ar
PICFLAGS = -fPIC
CPPFLAGS = $(PICFLAGS) $(GENFLAGS) -D_REENTRANT -I"$(BOOST_ROOT)/include/$(BOOST_VERSION)" -I"$(BOOST_ROOT)/." -I"."
OBJEXT = .o
OUTPUT_OPTION = -o "$@"
COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) -c
LDFLAGS = -L"." -L"$(BOOST_ROOT)/lib"
CCC = $(CXX)
MAKEFILE = Makefile.FvTest
DEPENDENCIES = .depend.$(MAKEFILE)
BTARGETDIR = ./
BIN = $(BTARGETDIR)FvTest$(EXESUFFIX)$(EXEEXT)
CAT = cat
MV = mv -f
RM = rm -rf
CP = cp -p
NUL = /dev/null
MKDIR = mkdir -p
TESTDIRSTART = test -d
TESTDIREND = ||
EXEEXT =
LIBPREFIX = lib
LIBSUFFIX = d
GENFLAGS = -g
LDLIBS = -ldl $(subst lib,-l,$(sort $(basename $(notdir $(wildcard /usr/lib/librt.so /lib/librt.so))))) -lpthread
OBJS = fieldvalue$(OBJEXT) gtest/gtest-all$(OBJEXT)
SRC = fieldvalue.cpp gtest/gtest-all.cc
LINK.cc = $(LD) $(LDFLAGS)
EXPORTFLAGS =
endif
ifeq ($(CFG), Release)
CXX = g++
LD = $(CXX) $(CCFLAGS) $(CPPFLAGS)
AR = ar
PICFLAGS = -fPIC
CPPFLAGS = $(PICFLAGS) $(GENFLAGS) -D_REENTRANT -I"$(BOOST_ROOT)/include/$(BOOST_VERSION)" -I"$(BOOST_ROOT)/." -I"."
OBJEXT = .o
OUTPUT_OPTION = -o "$@"
COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) -c
LDFLAGS = -L"." -L"$(BOOST_ROOT)/lib"
CCC = $(CXX)
MAKEFILE = Makefile.FvTest
DEPENDENCIES = .depend.$(MAKEFILE)
BTARGETDIR = ./
BIN = $(BTARGETDIR)FvTest$(EXESUFFIX)$(EXEEXT)
CAT = cat
MV = mv -f
RM = rm -rf
CP = cp -p
NUL = /dev/null
MKDIR = mkdir -p
TESTDIRSTART = test -d
TESTDIREND = ||
EXEEXT =
LIBPREFIX = lib
LIBSUFFIX =
GENFLAGS = -O
LDLIBS = -ldl $(subst lib,-l,$(sort $(basename $(notdir $(wildcard /usr/lib/librt.so /lib/librt.so))))) -lpthread
OBJS = fieldvalue$(OBJEXT) gtest/gtest-all$(OBJEXT)
SRC = fieldvalue.cpp gtest/gtest-all.cc
LINK.cc = $(LD) $(LDFLAGS)
EXPORTFLAGS =
endif
#----------------------------------------------------------------------------
# Local targets
#----------------------------------------------------------------------------
all: $(BIN)
$(BIN): $(OBJS)
@$(TESTDIRSTART) "$(BTARGETDIR)" $(TESTDIREND) $(MKDIR) "$(BTARGETDIR)"
$(LINK.cc) $(OBJS) $(LDLIBS) $(OUTPUT_OPTION)
generated: $(GENERATED_DIRTY)
@-:
fieldvalue$(OBJEXT): fieldvalue.cpp
$(COMPILE.cc) $(EXPORTFLAGS) $(OUTPUT_OPTION) fieldvalue.cpp
gtest/gtest-all$(OBJEXT): gtest/gtest-all.cc
$(COMPILE.cc) $(EXPORTFLAGS) $(OUTPUT_OPTION) gtest/gtest-all.cc
clean:
-$(RM) $(OBJS)
realclean: clean
-$(RM) $(BIN)
#----------------------------------------------------------------------------
# Dependencies
#----------------------------------------------------------------------------
$(DEPENDENCIES):
@touch $(DEPENDENCIES)
depend:
-$(MPC_ROOT)/depgen.pl $(CFLAGS) $(CCFLAGS) $(CPPFLAGS) -f $(DEPENDENCIES) $(SRC) 2> $(NUL)
include $(DEPENDENCIES)