Revert "l4p/tcp: introduce tle_tcp_stream_establish() API"
[tldk.git] / Makefile
1 # Copyright (c) 2016 Intel Corporation.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 TLDK_ROOT := $(CURDIR)
15 export TLDK_ROOT
16
17 LOCAL_RTE_SDK=$(TLDK_ROOT)/dpdk/_build/dpdk
18
19 ifeq ($(RTE_SDK),)
20         export RTE_SDK=$(LOCAL_RTE_SDK)
21 endif
22
23 RTE_TARGET ?= x86_64-native-linuxapp-gcc
24
25 DIRS-y += lib
26 DIRS-y += examples
27 DIRS-y += test
28
29 MAKEFLAGS += --no-print-directory
30
31 # output directory
32 O ?= $(TLDK_ROOT)/${RTE_TARGET}
33 BASE_OUTPUT ?= $(abspath $(O))
34
35 .PHONY: all
36 all: $(DIRS-y)
37
38 .PHONY: clean
39 clean: $(DIRS-y)
40
41 .PHONY: $(DIRS-y)
42 $(DIRS-y): $(RTE_SDK)/mk/rte.vars.mk
43         @echo "== $@"
44         $(Q)$(MAKE) -C $(@) \
45                 M=$(CURDIR)/$(@)/Makefile \
46                 O=$(BASE_OUTPUT) \
47                 BASE_OUTPUT=$(BASE_OUTPUT) \
48                 CUR_SUBDIR=$(CUR_SUBDIR)/$(@) \
49                 S=$(CURDIR)/$(@) \
50                 RTE_TARGET=$(RTE_TARGET) \
51                 $(filter-out $(DIRS-y),$(MAKECMDGOALS))
52
53 $(RTE_SDK)/mk/rte.vars.mk:
54 ifeq ($(RTE_SDK),$(LOCAL_RTE_SDK))
55         @make RTE_TARGET=$(RTE_TARGET) config all -C $(TLDK_ROOT)/dpdk/
56 endif