Openstack: Using VSPERF to Test on Openstack.
[vswitchperf.git] / src / trex / Makefile
1 # makefile to manage trex package
2 #
3
4 # Copyright 2017 Martin Goldammer, OPNFV
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #     http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17
18 include ../mk/master.mk
19 include ../package-list.mk
20
21 WORK_DIR = trex
22 TAG_DONE_FLAG = $(WORK_DIR)/.$(TREX_TAG).done
23
24 .PHONY: force_pull
25
26 all: force_pull
27         @echo "Finished pulling $(WORK_DIR) "
28
29 force_pull: $(TAG_DONE_FLAG)
30         $(AT)cd $(WORK_DIR) && git pull $(TREX_URL) $(TREX_TAG)
31         @echo "git pull done"
32         $(AT)wget https://raw.githubusercontent.com/phaethon/scapy/v0.18/scapy/layers/all.py -O $(WORK_DIR)/scripts/external_libs/scapy-2.3.1/python3/scapy/layers/all.py
33         @echo "orignal SCAPY 2.3.1 layers/all.py was restored"
34
35 $(WORK_DIR):
36         $(AT)git clone $(TREX_URL) $(WORK_DIR)
37
38 $(TAG_DONE_FLAG): $(WORK_DIR)
39         $(AT)cd $(WORK_DIR); git checkout $(TREX_TAG)
40         $(AT)touch $@
41
42 install:
43         @echo "Make install in $(WORK_DIR) (stub) "
44
45 clobber:
46         $(AT)rm -rf $(WORK_DIR)
47
48 distclean:
49         @echo "Make distclean in $(WORK_DIR) (stub) "
50
51 clean:
52         @echo "Make clean in $(WORK_DIR) (stub) "
53
54 test:
55         @echo "Make test in $(WORK_DIR) (stub) "
56
57 sanity:
58         @echo "Make sanity in $(WORK_DIR) (stub) "