TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2105860904
########## netutils/mdns/Makefile: ########## @@ -0,0 +1,110 @@ +############################################################################ +# netutils/mdns/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +include $(APPDIR)/Make.defs + +# mDNS application + +############################################################################ +# Flags +############################################################################ + +MDNS_URL ?= "https://github.com/mjansson/mdns/archive" + +MDNS_VERSION = main +MDNS_ZIP = $(MDNS_VERSION).zip + +MDNS_UNPACKNAME = mdns +UNPACK ?= unzip -q -o + +VPATH += $(MDNS_UNPACKNAME) +VPATH += $(MDNS_UNPACKNAME)$(DELIM)posix +DEPPATH += --dep-path $(MDNS_UNPACKNAME) +DEPPATH += --dep-path $(MDNS_UNPACKNAME)$(DELIM)posix + +CFLAGS += -Wno-strict-prototypes -Wno-undef -Wno-format + +APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils + +############################################################################ +# Targets +############################################################################ + +$(MDNS_ZIP): + @echo "Downloading: $(MDNS_URL)/$(MDNS_ZIP)" + $(Q) curl -O -L $(MDNS_URL)/$(MDNS_ZIP) + +$(MDNS_UNPACKNAME): $(MDNS_ZIP) + @echo "Unpacking: $(MDNS_ZIP) -> $(MDNS_UNPACKNAME)" + $(Q) $(UNPACK) $(MDNS_ZIP) + $(Q) mv mdns-$(MDNS_VERSION) $(MDNS_UNPACKNAME) +ifeq ($(CONFIG_NETUTILS_MDNS),) Review Comment: Well...if my logic is right, if you have the daemon you must have the demo app (CONFIG_NETUTILS_MDNS). If you just want to have the libary, you don't want the demo app: so then we copy the header. And, for the daemon, the heaser is included as the "local" instance: `#include "netutils/mdnsd.h"` But, to be honest, we could just copy the header anyway? Originally I moved it unconditionally and used the patch to change the header file location in the unpacked mdns.c but then erred on the side of caution to make minimal changes with the patch? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org