1.下载源码
https://github.com/ptitiano/cpuloadgen/archive/v0.94.tar.gz
解压
tar -zxvf cpuloadgen-0.94.tar.gz
2.Makefile
CC = $(CROSS_COMPILE)gcc
MYCFLAGS += -Wall -static -pthread
DESTDIR = ./out
install: cpuloadgen
install -d $(DESTDIR)
install cpuloadgen $(DESTDIR)
所以make install可以顺便生成cpuloadgen 并安装到DESTDIR
make CROSS_COMPILE=arm-linux-gnueabihf- install
搞定。
原文地址:https://www.cnblogs.com/idyllcheung/p/10986441.html
时间: 2024-10-17 14:57:28