【linux】最小测试工程miniTest

实例文件夹:https://download.csdn.net/download/bandaoyu/12271704

[root@Lrw888 local]# tree -L 2 minitest/
minitest/
├── build.sh
├── include
│   ├── hwclientcomm.h
│   ├── hwclientplat.h
│   └── pbasetype.h
├── lib
│   ├── libclientcomm.a
│   └── libframe.a
├── release
│   └── helloword
└── src
    ├── main.c
    └── Makefile

 

makefile

TARGET=helloword
LIB_PATH = ../lib
CC = gcc
SRC_PATH = ../src

CFLAGS = $(CFLAG) -I.  -I../include  -g -Wall
 
LIBPATH = -L. -L$(LIB_PATH)/
LIBS = -lpthread -lz -lclientcomm -lframe -lrt -ldl



OBJS_TARGET=$(SRC_PATH)/main.o 

$(TARGET): $(OBJS_TARGET)
	$(CC) -o $(TARGET) $(OBJS_TARGET) $(LIBPATH) $(LIBS)

$%.o : %.c
	$(CC) $(CFLAGS) -c -o $@ $< 

.PHONY:clean release

release:
	cp $(TARGET) ../release

clean:
	rm -rf $(TARGET) $(OBJS_TARGET)
	rm -f ../release/*.dll
	rm -f ../release/*.exe

 

发布了557 篇原创文章 · 获赞 93 · 访问量 20万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览