1 Star 0 Fork 0

刘煜/mqtt-sn-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
Nicholas Humfrey 提交于 2017-08-24 01:33 +08:00 . Bumped version number up to 0.0.7
CC=cc
PACKAGE=mqtt-sn-tools
VERSION=0.0.7
CFLAGS=-g -Wall -DVERSION=$(VERSION)
LDFLAGS=
INSTALL?=install
prefix=/usr/local
TARGETS=mqtt-sn-dump mqtt-sn-pub mqtt-sn-sub mqtt-sn-serial-bridge
.PHONY : all install uninstall clean dist test coverage
all: $(TARGETS)
$(TARGETS): %: mqtt-sn.o %.o
$(CC) $(LDFLAGS) -o $@ $^
%.o : %.c mqtt-sn.h
$(CC) $(CFLAGS) -c $<
install: $(TARGETS)
$(INSTALL) -d "$(DESTDIR)$(prefix)/bin"
$(INSTALL) -s $(TARGETS) "$(DESTDIR)$(prefix)/bin"
uninstall:
@for target in $(TARGETS); do \
cmd="rm -f $(DESTDIR)$(prefix)/bin/$$target"; \
echo "$$cmd" && $$cmd; \
done
clean:
-rm -f *.o *.gcda *.gcno $(TARGETS)
-rm -Rf coverage
dist:
distdir='$(PACKAGE)-$(VERSION)'; mkdir $$distdir || exit 1; \
list=`git ls-files`; for file in $$list; do \
cp -pR $$file $$distdir || exit 1; \
done; \
tar -zcf $$distdir.tar.gz $$distdir; \
rm -fr $$distdir
test: all
@(which bundle > /dev/null) || (echo "Ruby Bundler is not installed"; exit -1)
cd test && bundle install && bundle exec rake test
# Use gcc for coverage report - it works better than clang/llvm
coverage: CC=gcc
coverage: CFLAGS += --coverage
coverage: LDFLAGS += --coverage
coverage: clean test
mkdir -p coverage
lcov \
--capture \
--directory . \
--no-external \
--output coverage/lcov.info
genhtml \
--title 'MQTT-SN Tools' \
--output-directory coverage \
coverage/lcov.info
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tinytaro/mqtt-sn-tools.git
git@gitee.com:tinytaro/mqtt-sn-tools.git
tinytaro
mqtt-sn-tools
mqtt-sn-tools
main

搜索帮助