Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions examples/microwindows/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
config EXAMPLES_MICROWINDOWS
tristate "Microwindows example"
default n
depends on GRAPHICS_MICROWINDOWS
---help---
Enable the Microwindows example application

if EXAMPLES_MICROWINDOWS

config EXAMPLES_MICROWINDOWS_PROGNAME
string "Program name"
default "mwexample"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

config EXAMPLES_MICROWINDOWS_PRIORITY
int "Microwindows task priority"
default 100

config EXAMPLES_MICROWINDOWS_STACKSIZE
int "Microwindows stack size"
default 32768

endif
25 changes: 25 additions & 0 deletions examples/microwindows/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
############################################################################
# apps/examples/hello/Make.defs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Acfboy hello -> microwindows

#
# 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.
#
############################################################################

ifneq ($(CONFIG_EXAMPLES_MICROWINDOWS),)
CONFIGURED_APPS += $(APPDIR)/examples/microwindows
endif
55 changes: 55 additions & 0 deletions examples/microwindows/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
############################################################################
# apps/examples/microwindows/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

PROGNAME = $(CONFIG_EXAMPLES_MICROWINDOWS_PROGNAME)
PRIORITY = $(CONFIG_EXAMPLES_MICROWINDOWS_PRIORITY)
STACKSIZE = $(CONFIG_EXAMPLES_MICROWINDOWS_STACKSIZE)
MODULE = y

MAINSRC = mwdemo_main.c
CSRCS += mwdemo.c
MW_IMAGES = car8 zion208 penguin under4 cs1 rle8 microwin
CSRCS += $(MW_IMAGES:%=$(MW_IMGDIR)/%.c)

# Generate image .c files from .bmp
MW_SRC = $(APPDIR)/graphics/microwindows/microwindows/src
MW_IMGDIR = images
MW_CONVBMP = convbmp$(HOSTEXEEXT)

$(MW_CONVBMP): $(MW_SRC)/images/tools/convbmp.c
$(HOSTCC) $(HOSTCFLAGS) -I$(MW_SRC)/include $< -o $@

$(MW_IMGDIR)/%.c: $(MW_SRC)/images/demos/mwin/%.bmp $(MW_CONVBMP)
mkdir -p $(MW_IMGDIR)
$(CURDIR)/$(MW_CONVBMP) -o $@ $<

clean::
$(call DELFILE, $(MW_IMAGES:%=$(MW_IMGDIR)/%.c))
$(Q) rmdir $(MW_IMGDIR) 2>/dev/null || true
$(call DELFILE, $(MW_CONVBMP))

CFLAGS += -Wno-undef
CFLAGS += -DNOGDI

include $(APPDIR)/Application.mk
Loading
Loading