代码拉取完成,页面将自动刷新
同步操作将从 IOsetting/stc8prog 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
TARGET_EXEC := stc8prog
BUILD_DIR := ./build
SRC_DIRS := ./src
TARGET_OS :=
ifeq ($(OS),Windows_NT)
TARGET_OS += win32
SRC_DIRS += ./src/serial/win32
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
TARGET_OS += Linux
SRC_DIRS += ./src/serial/linux
endif
endif
# Find all the C files we want to compile
# Note the single quotes around the * expressions. Make will incorrectly expand these otherwise.
SRCS := $(shell find $(SRC_DIRS) -maxdepth 1 -name '*.c')
# String substitution for every source file.
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
# Every folder in ./src will need to be passed to GCC so that it can find header files
INC_DIRS := $(shell find $(SRC_DIRS) -maxdepth 1 -type d)
# Add a prefix to INC_DIRS. So moduleA would become -ImoduleA. GCC understands this -I flag
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
# The final build step.
./$(TARGET_EXEC): $(OBJS)
ifeq ($(TARGET_OS),win32)
@echo -e "\e[34mMKPE\e[0m " $@
else
@echo -e "\e[34mMKELF\e[0m " $@
endif
@$(CC) $(OBJS) -o $@ $(LDFLAGS)
# Build step for C source
$(BUILD_DIR)/%.c.o: %.c
@mkdir -p $(dir $@)
@echo -e "\e[32mCC\e[0m " $@
@$(CC) $(CFLAGS) $(INC_FLAGS) -c $< -o $@
install:
ifeq ($(TARGET_OS),win32)
@echo "Windows users must copy binary to desired location manually"
else
@echo "It is better to use the system installer of your distribution"
@echo "For gentoo - rasdark overlay, dev-embedded/stc8prog"
#Binary path from XuHg-zjcn
install $(TARGET_EXEC) /usr/local/bin
endif
.PHONY: clean
clean:
@rm -f -r $(BUILD_DIR)
@rm -f ./$(TARGET_EXEC)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。