makefile

来自「linux 下 makefile范本 可以根据此添加编译文件」· 代码 · 共 43 行

TXT
43
字号
#You can add source code file like the following
SOURCE += main.cpp   
SOURCE += robot.cpp
SOURCE += ActionGoto.cpp 
SOURCE += compass.cpp
SOURCE += uart.cpp

##You can add header code file like the following
HEADER += robot.h
HEADER += ActionGoto.h
HEADER += uart.h
HEADER += compass.h
#You can name the executable file like the following
TARGET = run

#You can add include path like the following
INCLUDEPATH += -I/usr/local/Aria/include

#You can library path like the following
LIBPATH += -L/usr/local/Aria/lib

#You can add library like the following
LIBS += -lpthread 
LIBS += -ldl 
LIBS += -lAria 
LIBS += -lArNetworking

#You cant add compile options like the following
OPTION += -Wall  
OPTION += -g
OPTION += -pthread

#You can specify the compiler
CC=gcc

#Don't modify the following code unless you know howto exactly
OBJECTS =$(SOURCE:%.c=%.o)

$(TARGET):$(OBJECTS)
	$(CC) $(OPTION) $(INCLUDEPATH) $(LIBPATH) $(LIBS) -o $(TARGET) $(OBJECTS)
clean:
	-rm -f $(TARGET) *.o *~

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?