emsApplication/applications/ems_datahubs/Makefile.arm

58 lines
1.1 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

######################################
#
######################################
#source file
#源文件,自动找所有.c和.cpp文件并将目标定义为同名.o文件
SOURCE := $(wildcard *.c) $(wildcard *.cpp)
OBJS := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE)))
#target you can change test to what you want
#目标文件名,输入任意你想要的执行文件名
TARGET := datahubs.arm
#compile and lib parameter
#编译参数
CC := arm-g++
CXX := arm-g++
LIBS := -L/usr/local/arm/lib -lhv -lmysqlcppconn -lpthread -liconv -ldl -lz
LDFLAGS :=
DEFINES :=
INCLUDE := -I. -I/usr/local/arm/include
CFLAGS := -Wall -O3 $(DEFINES) $(INCLUDE) -std=c++11
CXXFLAGS:= $(CFLAGS)
# 根据 DEBUG 宏决定是否包含调试信息
ifeq ($(DEBUG), 1)
CFLAGS += -g -D_DEBUG
else ifeq ($(debug),1)
CFLAGS += -g -D_DEBUG
endif
#i think you should do anything here
#下面的基本上不需要做任何改动了
.PHONY : everything objs clean veryclean rebuild
everything : $(TARGET)
all : $(TARGET)
objs : $(OBJS)
rebuild: veryclean everything
clean :
rm -fr *.so
rm -fr *.o
veryclean : clean
rm -fr $(TARGET)
$(TARGET) : $(OBJS)
$(CC) $(CXXFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)