apps/gpsutils: move gpsutils to nuttx/libs/libc/gpsutils

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2023-07-29 10:06:57 +08:00 committed by Xiang Xiao
parent 87838bb62c
commit d73e6412b7
13 changed files with 3 additions and 177 deletions

View File

@ -45,7 +45,6 @@ add_subdirectory(canutils)
add_subdirectory(crypto)
add_subdirectory(fsutils)
add_subdirectory(games)
add_subdirectory(gpsutils)
add_subdirectory(graphics)
add_subdirectory(industry)
add_subdirectory(interpreters)

View File

@ -29,7 +29,5 @@ if(CONFIG_EXAMPLES_GPS)
MODULE
${CONFIG_EXAMPLES_GPS}
SRCS
gps_main.c
INCLUDE_DIRECTORIES
${NUTTX_APPS_DIR}/gpsutils/minmea)
gps_main.c)
endif()

View File

@ -28,7 +28,7 @@ STACKSIZE = $(CONFIG_EXAMPLES_GPS_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_GPS)
# GPS Example
CFLAGS += -I$(APPDIR)$(DELIM)gpsutils$(DELIM)minmea
MAINSRC = gps_main.c
include $(APPDIR)/Application.mk

View File

@ -30,7 +30,7 @@
#include <syslog.h>
#include <unistd.h>
#include "minmea/minmea.h"
#include <minmea/minmea.h>
/****************************************************************************
* Pre-processor Definitions

1
gpsutils/.gitignore vendored
View File

@ -1 +0,0 @@
/Kconfig

View File

@ -1,21 +0,0 @@
# ##############################################################################
# apps/gpsutils/CMakeLists.txt
#
# 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.
#
# ##############################################################################
nuttx_generate_kconfig(MENUDESC "GPS Utilities")

View File

@ -1,21 +0,0 @@
############################################################################
# apps/gpsutils/Make.defs
#
# 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 $(wildcard $(APPDIR)/gpsutils/*/Make.defs)

View File

@ -1,23 +0,0 @@
############################################################################
# apps/gpsutils/Makefile
#
# 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.
#
############################################################################
MENUDESC = "GPS Utilities"
include $(APPDIR)/Directory.mk

View File

@ -1,10 +0,0 @@
# `gpsutils` GPS Utilities
The `gpsutils` directory is used to include libraries from external projects
that are not part of NuttX Applications, but are useful for NuttX developers and
users.
## `minmea` GPS NMEA 0183 parser
MINMEA is a NMEA parser developed by Kosma Moczek. Kosma is also a NuttX
contributor.

View File

@ -1,2 +0,0 @@
/minmea
/*.zip

View File

@ -1,17 +0,0 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
config GPSUTILS_MINMEA_LIB
bool "MINMEA NMEA Library"
default n
---help---
Enable support for the MINMEA NMEA library.
NOTE: This library depends on having some version of math.h
at include/nuttx. There are some different ways to accomplish
this. See the discussion in the top-level nuttx/README.txt file.
if GPSUTILS_MINMEA_LIB
endif

View File

@ -1,24 +0,0 @@
############################################################################
# apps/gpsutils/minmea/Make.defs
#
# 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.
#
############################################################################
ifneq ($(CONFIG_GPSUTILS_MINMEA_LIB),)
CONFIGURED_APPS += $(APPDIR)/gpsutils/minmea
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/gpsutils/minmea
endif

View File

@ -1,52 +0,0 @@
############################################################################
# apps/gpsutils/minmea/Makefile
#
# 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
MINMEA_URL ?= "https://github.com/kosma/minmea/archive"
MINMEA_VERSION ?= db46128e73cee26d6a6eb0482dcba544ee1ea9f5
MINMEA_UNPACKNAME = minmea
$(MINMEA_UNPACKNAME):
@echo "Downloading: $(MINMEA_UNPACKNAME)"
$(Q) curl -O -L $(MINMEA_URL)/$(MINMEA_VERSION).zip
$(Q) mkdir $(MINMEA_UNPACKNAME)
$(Q) unzip -o -j $(MINMEA_VERSION).zip -d $(MINMEA_UNPACKNAME)
$(call DELFILE, $(MINMEA_VERSION).zip)
# Files
CSRCS = minmea/minmea.c
CFLAGS += -std=c99
clean::
$(call DELFILE, $(OBJS))
# Download and unpack tarball if no git repo found
ifeq ($(wildcard $(MINMEA_UNPACKNAME)/.git),)
context:: $(MINMEA_UNPACKNAME)
distclean::
$(call DELDIR, $(MINMEA_UNPACKNAME))
endif
include $(APPDIR)/Application.mk