Makefile revision b8f1ef2b
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
14ifeq ($(RTE_SDK),)
15$(error "Please define RTE_SDK environment variable")
16endif
17
18ifeq ($(RTE_TARGET),)
19$(error "Please define RTE_TARGET environment variable")
20endif
21
22ifeq ($(TLDK_ROOT),)
23$(error "Please define TLDK_ROOT environment variable")
24endif
25
26include $(RTE_SDK)/mk/rte.vars.mk
27
28# binary name
29APP = l4fwd
30
31# all source are stored in SRCS-y
32SRCS-y += parse.c
33SRCS-y += pkt.c
34SRCS-y += main.c
35
36CFLAGS += $(WERROR_FLAGS)
37CFLAGS += -I$(RTE_OUTPUT)/include
38
39LDLIBS += -L$(RTE_OUTPUT)/lib
40LDLIBS += -ltle_l4p
41LDLIBS += -ltle_memtank
42LDLIBS += -ltle_timer
43
44EXTRA_CFLAGS += -O3
45CFLAGS_parse.o += -D_GNU_SOURCE
46CFLAGS_main.o += -D_GNU_SOURCE
47
48include $(TLDK_ROOT)/mk/tle.app.mk
49