include ../py/mkenv.mk# define main targetPROG = mpy-cross# qstr definitions (must come before including py.mk)QSTR_DEFS = qstrdefsport.h# OS name, for simple autoconfigUNAME_S := $(shell uname -s)# include py core make definitionsinclude $(TOP)/py/py.mkINC += -I.INC += -I$(BUILD)INC += -I$(TOP)# compiler settingsCWARN = -Wall -WerrorCWARN += -Wextra -Wno-unused-parameter -Wpointer-arithCFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables# Debugging/Optimizationifdef DEBUGCFLAGS += -gCOPT = -O0elseCOPT = -Os #-DNDEBUGendif# On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.# The unix port of MicroPython on OSX must be compiled with clang,# while cross-compile ports require gcc, so we test here for OSX and# if necessary override the value of 'CC' set in py/mkenv.mkifeq ($(UNAME_S),Darwin)CC = clang# Use clang syntax for map fileLDFLAGS_ARCH = -Wl,-map,$@.map -Wl,-dead_stripelse# Use gcc syntax for map fileLDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sectionsendifLDFLAGS = $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA)# source filesSRC_C = \main.c \gccollect.c \lib/utils/gchelper_generic.c \# Add fmode when compiling with mingw gccCOMPILER_TARGET := $(shell $(CC) -dumpmachine)ifneq (,$(findstring mingw,$(COMPILER_TARGET)))SRC_C += ports/windows/fmode.cendifOBJ = $(PY_CORE_O)OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))include $(TOP)/py/mkrules.mk
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。