2 ## Copyright (c) 2010-2017 Intel Corporation
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
8 ## http://www.apache.org/licenses/LICENSE-2.0
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.
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
28 SOURCES += allocator.cpp
29 SOURCES += halfstream.cpp
31 SOURCES += progress.cpp
32 SOURCES += mappedfile.cpp
33 SOURCES += streamsorter.cpp
34 SOURCES += memreader.cpp
35 SOURCES += programconfig.cpp
38 OBJECTS = $(SOURCES:%.cpp=$(BUILD_DIR)/%.o)
41 CXXFLAGS += -D__STDC_LIMIT_MACROS -g -O2 -Wall -ansi -pedantic -Wno-unused -msse4.2
44 $(BUILD_DIR)/$(PROG): $(OBJECTS)
46 @$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
48 -include $(SOURCES:%.cpp=$(BUILD_DIR)/%.d)
50 $(BUILD_DIR)/%.o: %.cpp
51 @mkdir -p $(BUILD_DIR)
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
59 @rm -f $(BUILD_DIR)/$(PROG) $(BUILD_DIR)/*.o $(BUILD_DIR)/*.d