-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
65 lines (50 loc) · 1.66 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# Makefile for phoenix-rtos-lwip
#
# Copyright 2019-2021 Phoenix Systems
#
# %LICENSE%
#
include ../phoenix-rtos-build/Makefile.common
# set local path manually as we're including other Makefiles here (as an empty var - TOPDIR)
LOCAL_DIR :=
.DEFAULT_GOAL := all
LWIPOPTS_DIR ?= "include/default-opts"
# default path for the programs to be installed in rootfs
DEFAULT_INSTALL_PATH := /sbin
# core LwIP component
LWIPDIR := lib-lwip/src
include $(LWIPDIR)/Filelists.mk
LWIP_EXCLUDE := netif/slipif.c
LWIP_SRCS := $(filter-out $(addprefix $(LWIPDIR)/,$(LWIP_EXCLUDE)),$(LWIPNOAPPSFILES))
# G3-PLC modifications to core LwIP
ifeq (${LWIP_G3_BUILD}, yes)
include g3/Makefile
endif
CFLAGS += -Wundef -Iinclude -Ilib-lwip/src/include -I"$(LWIPOPTS_DIR)"
NAME := lwip-core
SRCS := $(LWIP_SRCS)
# Disabling warnings from lib-lwip, as their code does not comply with these rules for now.
LOCAL_CFLAGS += -Wno-char-subscripts -Wno-format-zero-length
# don't install include subdir contents, these are actually internal headers
LOCAL_HEADER_DIR := nothing
include $(static-lib.mk)
# should define NET_DRIVERS and platform driver sources
-include _targets/Makefile.$(TARGET_FAMILY)-$(TARGET_SUBFAMILY)
ifeq (${LWIP_WIFI_BUILD},yes)
CFLAGS += -Iwi-fi/hal -Iwi-fi/lwip -Iwi-fi/whd
include wi-fi/hal/Makefile
include wi-fi/whd/Makefile
include wi-fi/lwip/Makefile
endif
ifeq (${LWIP_IPSEC_BUILD},yes)
include ipsec/Makefile
endif
include drivers/Makefile
include port/Makefile
DEFAULT_COMPONENTS := $(ALL_COMPONENTS)
# create generic targets
.PHONY: all install clean
all: $(DEFAULT_COMPONENTS)
install: $(patsubst %,%-install,$(DEFAULT_COMPONENTS))
clean: $(patsubst %,%-clean,$(ALL_COMPONENTS))