2014-11-07 22:03:03 +01:00
|
|
|
############################################################################
|
|
|
|
# apps/examples/bastest/Makefile
|
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# 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
|
2014-11-07 22:03:03 +01:00
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2014-11-07 22:03:03 +01:00
|
|
|
#
|
2021-06-07 17:31:08 +02:00
|
|
|
# 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.
|
2014-11-07 22:03:03 +01:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2020-05-20 06:35:03 +02:00
|
|
|
include $(APPDIR)/Make.defs
|
2014-11-07 22:03:03 +01:00
|
|
|
|
|
|
|
# BAS test volume mounter
|
|
|
|
|
2019-10-06 14:14:39 +02:00
|
|
|
PROGNAME = bastest
|
2014-11-07 22:03:03 +01:00
|
|
|
PRIORITY = SCHED_PRIORITY_DEFAULT
|
2020-03-27 05:57:26 +01:00
|
|
|
STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
|
2019-10-06 14:14:39 +02:00
|
|
|
MODULE = $(CONFIG_EXAMPLES_BASTEST)
|
2014-11-07 22:03:03 +01:00
|
|
|
|
|
|
|
# Hello, World! Example
|
|
|
|
|
|
|
|
MAINSRC = bastest_main.c
|
|
|
|
|
|
|
|
BASTEST_DIR = $(APPDIR)$(DELIM)examples$(DELIM)bastest
|
|
|
|
TESTS_DIR = $(BASTEST_DIR)$(DELIM)tests
|
2014-11-07 22:35:09 +01:00
|
|
|
ROMFS_IMG = romfs.img
|
|
|
|
ROMFS_HDR = romfs.h
|
2014-11-07 22:03:03 +01:00
|
|
|
|
|
|
|
# Common build
|
|
|
|
|
|
|
|
# Create the romfs.h header file from the tests/ directory
|
|
|
|
|
2014-11-07 22:35:09 +01:00
|
|
|
$(ROMFS_IMG) :
|
|
|
|
$(Q) genromfs -f $@ -d $(TESTS_DIR) -V "BASTEST"
|
|
|
|
|
2014-11-07 22:03:03 +01:00
|
|
|
$(ROMFS_HDR) : $(ROMFS_IMG)
|
2014-11-07 22:35:09 +01:00
|
|
|
$(Q) (xxd -i $(ROMFS_IMG) | sed -e "s/^unsigned/static const unsigned/g" >$@)
|
|
|
|
|
|
|
|
# Add the BASTEST object to the archive
|
|
|
|
|
2018-09-03 17:29:56 +02:00
|
|
|
context:: $(ROMFS_HDR)
|
2014-11-07 22:03:03 +01:00
|
|
|
|
2018-09-03 17:29:56 +02:00
|
|
|
distclean::
|
2014-11-07 22:35:09 +01:00
|
|
|
$(call DELFILE, $(ROMFS_HDR))
|
|
|
|
$(call DELFILE, $(ROMFS_IMG))
|
2014-11-07 22:03:03 +01:00
|
|
|
|
2018-09-03 17:29:56 +02:00
|
|
|
include $(APPDIR)/Application.mk
|