2 Star 0 Fork 0

limb/hmiscreen

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 8.37 KB
一键复制 编辑 原始数据 按行查看 历史
limb 提交于 2025-01-10 22:49 . 1.解决lvgl程序重启问题。
# 设置HMI_TOOL变量
HMI_TOOL :=E:\hmi\mynewhmi
#windowsdk默认路径
WINSDK_ROOT :=$(HMI_TOOL)\environment\arm_bin
# 设置编译器和其他工具的路径
CC := $(WINSDK_ROOT)/bin/arm-none-linux-gnueabi-gcc
CXX := $(WINSDK_ROOT)/bin/arm-none-linux-gnueabi-g++
CSTRIP := $(WINSDK_ROOT)/bin/arm-none-linux-gnueabi-strip
# 设置模块名
MODNAME := $(HMI_TOOL)\environment\publish\appdata\ehapps\lvglhmi
# 需要在Windows系统中设定好WINSDK_ROOT的环境变量
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/lvgl
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/lvgl/lv_drivers
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/curl
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/sqlcipher
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/modbus
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/cjson
# 添加FFmpeg库的头文件路径
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/libavcodec
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/libavutil
CFLAGS+=-I$(WINSDK_ROOT)/arm-none-linux-gnueabi/libc/usr/include/libswscale
# Ensure the LIBVNCSERVER_PATH variable is set correctly
LIBVNCSERVER_PATH = E:/hmi/hmi/hmiscreen/libvncserver-master
# Add libvncserver include path
CFLAGS += -I$(LIBVNCSERVER_PATH)
CFLAGS += -I$(LIBVNCSERVER_PATH)/include
CFLAGS += -I$(LIBVNCSERVER_PATH)/common
CFLAGS += -I$(LIBVNCSERVER_PATH)/libvncserver
# 添加编译宏
CFLAGS += -DLV_CONF_INCLUDE_SIMPLE
CFLAGS += -DHMI_SCREEN_ARM_LINUX
# 添加编译参数
CFLAGS_C =-std=c99
CFLAGS_CPP =-std=c++11
# 添加库目录到LDFLAGS
LDFLAGS+=-L${WINSDK_ROOT}/arm-none-linux-gnueabi/libc
LDFLAGS+=-L${WINSDK_ROOT}/arm-none-linux-gnueabi/libc/usr/lib
# 添加库到LDFLAGS
LDFLAGS+=-lpthread
LDFLAGS+=-ldl
LDFLAGS+=-lc
LDFLAGS+=-lts
LDFLAGS+=-llvgl
LDFLAGS+=-llv_drivers
LDFLAGS+=-lfreetype
LDFLAGS+=-lcurl
LDFLAGS+=-lsqlcipher
LDFLAGS+=-lmodbus
LDFLAGS+=-lcjson
LDFLAGS+=-lpng
LDFLAGS+=-lz
LDFLAGS+=-lssl
LDFLAGS+=-lcrypto
LDFLAGS+=-llzo2
LDFLAGS+=-ljpeg
# 添加APP自身头文件
CFLAGS+=-I./hmiapplication
CFLAGS+=-I./hmiapplication/data
CFLAGS+=-I./hmiapplication/plugin
CFLAGS+=-I./hmiapplication/font
CFLAGS+=-I./hmiapplication/register
CFLAGS+=-I./hmiapplication/logic
CFLAGS+=-I./hmiapplication/image
CFLAGS+=-I./hmiapplication/sqlite
CFLAGS+=-I./hmiapplication/itoa
CFLAGS+=-I./hmiapplication/mobus
CFLAGS+=-I./hmiplugin
CFLAGS+=-I./hmidb
CFLAGS+=-I./hmidb/data
CFLAGS+=-I./hmidb/heartbeat
# Add libvncserver source files, excluding rfbssl_gnutls.c, tableinit24.c, tableinitcmtemplate.c, tableinittctemplate.c, tabletrans24template.c, ws_decode.c, and zrleencodetemplate.c
LIBVNCSERVER_SRCS = $(filter-out $(LIBVNCSERVER_PATH)/libvncserver/rfbssl_gnutls.c $(LIBVNCSERVER_PATH)/libvncserver/rfbssl_none.c $(LIBVNCSERVER_PATH)/libvncserver/tableinit24.c $(LIBVNCSERVER_PATH)/libvncserver/tableinitcmtemplate.c $(LIBVNCSERVER_PATH)/libvncserver/tabletranstemplate.c $(LIBVNCSERVER_PATH)/libvncserver/tableinittctemplate.c $(LIBVNCSERVER_PATH)/libvncserver/tabletrans24template.c $(LIBVNCSERVER_PATH)/libvncserver/ws_decode.c $(LIBVNCSERVER_PATH)/libvncserver/zrleencodetemplate.c, $(wildcard $(LIBVNCSERVER_PATH)/libvncserver/*.c))
# Add turbojpeg.c to the source files
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/common/turbojpeg.c
# Add tightvnc-filetransfer source files
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/libvncserver/tightvnc-filetransfer/rfbtightserver.c
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/libvncserver/tightvnc-filetransfer/filetransfermsg.c
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/libvncserver/tightvnc-filetransfer/filelistinfo.c
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/libvncserver/ws_decode.c
# Add vncauth.c to the source files
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/common/vncauth.c
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/common/base64.c
# Include the appropriate crypto file
# Uncomment the correct line based on your configuration
# If using OpenSSL
LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/common/crypto_openssl.c
# If using Libgcrypt
# LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/common/crypto_libgcrypt.c
# # If neither OpenSSL nor Libgcrypt is available
# LIBVNCSERVER_SRCS += $(LIBVNCSERVER_PATH)/common/crypto_included.c
# C源文件列表
SRCS_C = \
.\hmiapplication\font\hmi_lv_pinyin_ime.c \
.\hmiapplication\font\lv_font_source_han_sans_normal_16-B.c \
$(LIBVNCSERVER_SRCS)
# C++源文件列表
SRCS_CPP = \
.\hmiapplication\itoa\itoa_utils.cpp \
.\hmiapplication\heartbeat\heartbeat.cpp \
.\hmiapplication\heartbeat\fbvideo.cpp \
.\hmiapplication\hmi.cpp \
.\hmiapplication\logic\hmi_lv_logic.cpp \
.\hmiapplication\register\hmi_lv_register.cpp \
.\hmiapplication\font\hmi_lv_font.cpp \
.\hmiapplication\http\httpclint.cpp \
.\hmiapplication\mobus\lvglhmimodbusmanager.cpp \
.\hmiapplication\event\hmi_lv_event.cpp \
.\hmiapplication\userdefine\hmi_lv_userdefine.cpp \
.\hmidb\data\table_portserial.cpp \
.\hmidb\data\table_alarmdetailinfo.cpp \
.\hmidb\data\table_adapter.cpp \
.\hmidb\data\table_alarminfo.cpp \
.\hmidb\data\table_collectdetailinfo.cpp \
.\hmidb\data\table_devicedetailinfo.cpp \
.\hmidb\data\table_deviceinfo.cpp \
.\hmidb\data\table_fontinfo.cpp \
.\hmidb\data\table_histroydatabase.cpp \
.\hmidb\data\table_imageinfo.cpp \
.\hmidb\data\table_logicinfo.cpp \
.\hmidb\data\table_pagedetailinfo.cpp \
.\hmidb\data\table_pageinfo.cpp \
.\hmidb\data\table_recipedetailinfo.cpp \
.\hmidb\data\table_recipeinfo.cpp \
.\hmidb\data\table_screeninfo.cpp \
.\hmidb\data\hmi_sqlitedatabase.cpp \
.\hmidb\data\table_collectinfo.cpp \
.\hmidb\data\table_pagepopdetailinfo.cpp \
.\hmidb\data\table_pagepopinfo.cpp \
.\hmidb\data\table_pagekeyboarddetailinfo.cpp \
.\hmidb\data\table_pagekeyboardinfo.cpp \
.\hmidb\data\table_userdefineinfo.cpp \
.\hmidb\data\table_operloginfo.cpp \
.\hmidb\data\table_eventconfiginfo.cpp \
.\hmiplugin\lvglplugin.cpp \
.\hmiplugin\lvglpluginmanager.cpp \
.\hmiplugin\label\lvglpluginlabel.cpp \
.\hmiplugin\alarm\lvglpluginalarm.cpp \
.\hmiplugin\area\lvglpluginarea.cpp \
.\hmiplugin\bar\lvglpluginbar.cpp \
.\hmiplugin\button\lvglpluginbutton.cpp \
.\hmiplugin\button\lvglpluginbuttonmatrix.cpp \
.\hmiplugin\button\lvglpluginswitchpage.cpp \
.\hmiplugin\chart\lvglpluginchart.cpp \
.\hmiplugin\image\lvglpluginimage.cpp \
.\hmiplugin\list\lvglplugindropdownlist.cpp \
.\hmiplugin\login\lvglpluginhmilogin.cpp \
.\hmiplugin\meter\lvglpluginmeter.cpp \
.\hmiplugin\recipe\lvglpluginrecipe.cpp \
.\hmiplugin\roller\lvglpluginroller.cpp \
.\hmiplugin\slider\lvglpluginslider.cpp \
.\hmiplugin\switch\lvglplugincheckbox.cpp \
.\hmiplugin\switch\lvglpluginswitchbutton.cpp \
.\hmiplugin\switch\lvglpluginswitchinput.cpp \
.\hmiplugin\switch\lvglpluginswitchled.cpp \
.\hmiplugin\switch\lvglpluginswitchspy.cpp \
.\hmiplugin\table\lvglplugintable.cpp \
.\hmiplugin\canvas\lvglplugincanvasarc.cpp \
.\hmiplugin\canvas\lvglplugincanvascircle.cpp \
.\hmiplugin\canvas\lvglplugincanvasline.cpp \
.\hmiplugin\canvas\lvglplugincanvaspolygon.cpp \
.\hmiplugin\canvas\lvglplugincanvasrect.cpp \
.\hmiplugin\canvas\lvglplugincanvastext.cpp \
.\hmiplugin\canvas\lvgnplugincanvasimage.cpp \
.\hmiplugin\textarea\lvglplugintextareainput.cpp \
.\hmiplugin\textarea\lvglplugintextareakeyboardinput.cpp \
.\hmiplugin\textarea\lvglplugintextareaspy.cpp \
.\hmiplugin\keyboard\lvglpluginkeyboarduser.cpp \
.\hmiplugin\keyboard\lvglpluginkeyboardlower.cpp \
.\hmiplugin\keyboard\lvglpluginkeyboardnum.cpp \
.\hmiplugin\keyboard\lvglpluginkeyboardspecial.cpp \
.\hmiplugin\keyboard\lvglpluginkeyboardupper.cpp\
.\hmiplugin\userdefine\iuserdefine.cpp \
.\hmiplugin\userdefine\lvglpluginuserdefine.cpp
# 目标文件列表(自动推导)
OBJS_C = $(SRCS_C:.c=.o)
OBJS_CPP = $(SRCS_CPP:.cpp=.o)
OBJS = $(OBJS_C) $(OBJS_CPP)
# 默认目标
all: $(MODNAME)
# C文件编译规则
.c.o:
$(CC) $(CFLAGS) $(CFLAGS_C) -c $< -o $@
# C++文件编译规则
.cpp.o:
$(CXX) $(CFLAGS) $(CFLAGS_CPP) -c $< -o $@
# 链接规则
$(MODNAME): $(OBJS)
$(CXX) $(LDFLAGS) -o $(MODNAME) $^
$(CSTRIP) $(MODNAME)
clean:
rm $(MODNAME)
rm $(OBJS)
# 更彻底的清理(如果需要的话)
distclean: clean
# 这里可以添加额外的清理命令,比如删除中间文件或临时目录 for /R "hmi" %f in (*.o) do @del "%f"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lmbxjtu/hmiscreen.git
[email protected]:lmbxjtu/hmiscreen.git
lmbxjtu
hmiscreen
hmiscreen
master

搜索帮助