|
| 1 | +############################################################################ |
| 2 | +# apps/netutils/bare/Makefile |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: Apache-2.0 |
| 5 | +# |
| 6 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 7 | +# contributor license agreements. See the NOTICE file distributed with |
| 8 | +# this work for additional information regarding copyright ownership. The |
| 9 | +# ASF licenses this file to you under the Apache License, Version 2.0 (the |
| 10 | +# "License"); you may not use this file except in compliance with the |
| 11 | +# License. You may obtain a copy of 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 |
| 19 | +# under the License. |
| 20 | +# |
| 21 | +############################################################################ |
| 22 | + |
| 23 | +include $(APPDIR)/Make.defs |
| 24 | + |
| 25 | +BARE_CBARE_DIR = cbare |
| 26 | + |
| 27 | +DEPPATH += --dep-path $(BARE_CBARE_DIR)$(DELIM)src |
| 28 | +VPATH += :$(BARE_CBARE_DIR)$(DELIM)src |
| 29 | + |
| 30 | +CFLAGS += -I$(BARE_CBARE_DIR)/src |
| 31 | + |
| 32 | +CSRCS = $(BARE_CBARE_DIR)/src/alloc.c |
| 33 | +CSRCS += $(BARE_CBARE_DIR)/src/cbare.c |
| 34 | +CSRCS += $(BARE_CBARE_DIR)/src/die.c |
| 35 | + |
| 36 | +ifneq ($(CONFIG_NETUTILS_BARE_TEST),) |
| 37 | + |
| 38 | +PROGNAME = baretest |
| 39 | +PRIORITY = 100 |
| 40 | +STACKSIZE = 2048 |
| 41 | +MODULE = y |
| 42 | + |
| 43 | +MAINSRC = $(BARE_CBARE_DIR)/test/baretest.c |
| 44 | + |
| 45 | +endif |
| 46 | + |
| 47 | +$(BARE_CBARE_DIR): |
| 48 | + $(Q) echo "Cloning cbare repo..." |
| 49 | + $(Q) git clone --depth=1 https://git.sr.ht/~fsx/cbare |
| 50 | + $(Q) patch -p1 --directory=cbare < cbare_porting_for_nuttx.patch |
| 51 | + $(Q) touch $(BARE_CBARE_DIR) |
| 52 | + |
| 53 | +context:: $(BARE_CBARE_DIR) |
| 54 | + |
| 55 | +distclean:: |
| 56 | + $(call DELDIR, $(BARE_CBARE_DIR)) |
| 57 | + |
| 58 | +include $(APPDIR)/Application.mk |
0 commit comments