加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
makefile 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
unknown 提交于 2015-12-01 15:16 . 版本1.0
#
# FreeModbus Linux PORT - Makefile
#
# Copyright (c) 2006 Christian Walter, ? s::can, Vienna 2006.
#
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------
# platform dependencies
# ---------------------------------------------------------------------------
ifneq ($(strip $(shell gcc -v 2>&1 |grep "cygwin")),)
CYGWIN_BUILD = YES
endif
CC = gcc
CXX = g++
OBJCOPY = objcopy
INSIGHT = /opt/insight-x86/bin/insight
# ---------------------------------------------------------------------------
# project specifics
# ---------------------------------------------------------------------------
CFLAGS = -MD -g3 -Wall
LDFLAGS =
ifeq ($(CYGWIN_BUILD),YES)
else
#LDFLAGS += -lpthread
endif
TGT = 1
OTHER_CSRC =
OTHER_ASRC =
CSRC = dlt645_api_07.c main.c
ASRC =
OBJS = $(CSRC:.c=.o) $(ASRC:.S=.o)
NOLINK_OBJS = $(OTHER_CSRC:.c=.o) $(OTHER_ASRC:.S=.o)
DEPS = $(OBJS:.o=.d) $(NOLINK_OBJS:.o=.d)
BIN = $(TGT)
.PHONY: clean all
all: $(BIN)
debug:
$(INSIGHT) --se=$(TGT)
$(BIN): $(OBJS) $(NOLINK_OBJS)
$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
clean:
rm -f $(DEPS)
rm -f $(OBJS) $(NOLINK_OBJS)
rm -f $(BIN)
# ---------------------------------------------------------------------------
# rules for code generation
# ---------------------------------------------------------------------------
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
%.o: %.S
$(CC) $(ASFLAGS) -o $@ -c $<
# ---------------------------------------------------------------------------
# # compiler generated dependencies
# ---------------------------------------------------------------------------
-include $(LWOS_DEPS) $(PORT_DEPS) $(APPL_DEPS)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化