Removing the --socket-mem eal parameter
[samplevnf.git] / VNFs / DPPD-PROX / tools / flow_extract / Makefile
1 ##
2 ## Copyright (c) 2010-2017 Intel Corporation
3 ##
4 ## Licensed under the Apache License, Version 2.0 (the "License");
5 ## you may not use this file except in compliance with the License.
6 ## You may obtain a copy of the License at
7 ##
8 ##     http://www.apache.org/licenses/LICENSE-2.0
9 ##
10 ## Unless required by applicable law or agreed to in writing, software
11 ## distributed under the License is distributed on an "AS IS" BASIS,
12 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ## See the License for the specific language governing permissions and
14 ## limitations under the License.
15 ##
16
17 SOURCES = main.cpp
18 SOURCES += streamextract.cpp
19 SOURCES += pcapreader.cpp
20 SOURCES += pcapwriter.cpp
21 SOURCES += timestamp.cpp
22 SOURCES += pcappkt.cpp
23 SOURCES += netsocket.cpp
24 SOURCES += stream3.cpp
25 SOURCES += stream2.cpp
26 SOURCES += stream.cpp
27 SOURCES += path.cpp
28 SOURCES += allocator.cpp
29 SOURCES += halfstream.cpp
30 SOURCES += bundle.cpp
31 SOURCES += progress.cpp
32 SOURCES += mappedfile.cpp
33 SOURCES += streamsorter.cpp
34 SOURCES += memreader.cpp
35 SOURCES += programconfig.cpp
36
37 BUILD_DIR = build
38 OBJECTS = $(SOURCES:%.cpp=$(BUILD_DIR)/%.o)
39 PROG = flowextract
40
41 CXXFLAGS += -D__STDC_LIMIT_MACROS -g -O2 -Wall -ansi -pedantic -Wno-unused -msse4.2
42 LDFLAGS = -lpcap
43
44 $(BUILD_DIR)/$(PROG): $(OBJECTS)
45         @echo -e "LD\t$<"
46         @$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
47
48 -include $(SOURCES:%.cpp=$(BUILD_DIR)/%.d)
49
50 $(BUILD_DIR)/%.o: %.cpp
51         @mkdir -p $(BUILD_DIR)
52         @echo -e "CXX\t $<"
53         @$(CXX) -c $(CXXFLAGS) $*.cpp -o $@
54         @$(CXX) -MM $(CXXFLAGS) $*.cpp -MT $(BUILD_DIR)/$*.o > $(BUILD_DIR)/$*.d
55         @cp -f $(BUILD_DIR)/$*.d $(BUILD_DIR)/$*.d.tmp
56         @sed -e 's/.*://' -e 's/\\$$//' < $(BUILD_DIR)/$*.d.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $(BUILD_DIR)/$*.d
57         @rm -f $(BUILD_DIR)/$*.d.tmp
58 clean:
59         @rm -f $(BUILD_DIR)/$(PROG) $(BUILD_DIR)/*.o $(BUILD_DIR)/*.d