【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