|
| 1 | +# ############################################################################## |
| 2 | +# apps/netutils/ngtcp2/Makefile |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: Apache-2.0 |
| 5 | +# |
| 6 | +# Licensed to the Apache Software Foundation (ASF) under one or more contributor |
| 7 | +# license agreements. See the NOTICE file distributed with this work for |
| 8 | +# additional information regarding copyright ownership. The ASF licenses this |
| 9 | +# file to you under the Apache License, Version 2.0 (the "License"); you may not |
| 10 | +# use this file except in compliance with the License. You may obtain a copy of |
| 11 | +# the License at |
| 12 | +# |
| 13 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 14 | +# |
| 15 | +# Unless required by applicable law or agreed to in writing, software |
| 16 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 17 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 18 | +# License for the specific language governing permissions and limitations under |
| 19 | +# the License. |
| 20 | +# |
| 21 | +# ############################################################################## |
| 22 | + |
| 23 | +include $(APPDIR)/Make.defs |
| 24 | + |
| 25 | +NGTCP2_UNPACKNAME = ngtcp2 |
| 26 | +NGTCP2_VERSION = $(patsubst "%",%,$(strip $(CONFIG_NETUTILS_QUIC_VERSION))) |
| 27 | + |
| 28 | +# ngtcp2 library |
| 29 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pkt.c |
| 30 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conv.c |
| 31 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_str.c |
| 32 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_vec.c |
| 33 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_buf.c |
| 34 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conn.c |
| 35 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_mem.c |
| 36 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pq.c |
| 37 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_map.c |
| 38 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rob.c |
| 39 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ppe.c |
| 40 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_crypto.c |
| 41 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_err.c |
| 42 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_range.c |
| 43 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_acktr.c |
| 44 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rtb.c |
| 45 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_frame_chain.c |
| 46 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_strm.c |
| 47 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_idtr.c |
| 48 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_gaptr.c |
| 49 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ringbuf.c |
| 50 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_log.c |
| 51 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_qlog.c |
| 52 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_cid.c |
| 53 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ksl.c |
| 54 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_cc.c |
| 55 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_bbr.c |
| 56 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_addr.c |
| 57 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_path.c |
| 58 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pv.c |
| 59 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pmtud.c |
| 60 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_version.c |
| 61 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rst.c |
| 62 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_window_filter.c |
| 63 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_opl.c |
| 64 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_balloc.c |
| 65 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_objalloc.c |
| 66 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_unreachable.c |
| 67 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_transport_params.c |
| 68 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_settings.c |
| 69 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_callbacks.c |
| 70 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_dcidtr.c |
| 71 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pcg.c |
| 72 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ratelim.c |
| 73 | +CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conn_info.c |
| 74 | + |
| 75 | +# ngtcp2 crypto layer |
| 76 | +CSRCS += $(NGTCP2_UNPACKNAME)/crypto/shared.c |
| 77 | +CSRCS += $(NGTCP2_UNPACKNAME)/crypto/wolfssl/wolfssl.c |
| 78 | + |
| 79 | +# Compilation flags |
| 80 | +CFLAGS = -Wno-undef |
| 81 | + |
| 82 | +# ngtcp2 specific includes |
| 83 | +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/netutils/ngtcp2 |
| 84 | +CFLAGS += ${INCDIR_PREFIX}$(NGTCP2_UNPACKNAME)/lib |
| 85 | +CFLAGS += ${INCDIR_PREFIX}$(NGTCP2_UNPACKNAME)/lib/includes |
| 86 | +CFLAGS += ${INCDIR_PREFIX}$(NGTCP2_UNPACKNAME)/crypto |
| 87 | +CFLAGS += ${INCDIR_PREFIX}$(NGTCP2_UNPACKNAME)/crypto/includes |
| 88 | + |
| 89 | +# NuttX specific includes |
| 90 | +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/../nuttx/include |
| 91 | + |
| 92 | +# wolfssl specific includes |
| 93 | +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/wolfssl |
| 94 | +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/wolfssl/wolfssl |
| 95 | +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/crypto/wolfssl/openssl |
| 96 | +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/include |
| 97 | + |
| 98 | +CFLAGS += -DNO_INT128 -DHAVE_WOLFSSL -DBUILDING_NGTCP2 -DWOLFSSL_QUIC -DOPENSSL_EXTRA -DHAVE_AESGCM -DHAVE_SESSION_TICKET |
| 99 | + |
| 100 | +NGTCP2_URL ?= "https://github.com/ngtcp2/ngtcp2/releases/download" |
| 101 | +NGTCP2_TAR = ngtcp2-$(NGTCP2_VERSION).tar.bz2 |
| 102 | + |
| 103 | +UNPACK ?= tar -xf |
| 104 | + |
| 105 | +$(NGTCP2_TAR): |
| 106 | + @echo "Downloading: $(NGTCP2_URL)/v$(NGTCP2_VERSION)/$(NGTCP2_TAR)" |
| 107 | + $(Q) curl -o $(NGTCP2_TAR) -L $(NGTCP2_URL)/v$(NGTCP2_VERSION)/$(NGTCP2_TAR) |
| 108 | + |
| 109 | +$(NGTCP2_UNPACKNAME): $(NGTCP2_TAR) |
| 110 | + @echo "Unpacking: $(NGTCP2_TAR) -> $(NGTCP2_UNPACKNAME)" |
| 111 | + $(Q) $(UNPACK) $(NGTCP2_TAR) |
| 112 | + $(Q) mv ngtcp2-$(NGTCP2_VERSION) $(NGTCP2_UNPACKNAME) |
| 113 | + |
| 114 | +distclean:: |
| 115 | + $(call DELDIR, $(NGTCP2_UNPACKNAME)) |
| 116 | + $(call DELFILE, $(NGTCP2_TAR)) |
| 117 | + |
| 118 | +context:: $(NGTCP2_UNPACKNAME) |
| 119 | + |
| 120 | +include $(APPDIR)/Application.mk |
0 commit comments