Добрый день! Хочу добавить каталоги инклудов с бустом в системные пути gcc через makefile. Как это сделать?
PROJECT = fiscat
CC = arm-linux-gcc
CXX = arm-linux-g++
STRIP = arm-linux-strip
ifeq ($(DEBUG), 1)
FLAGS = -O0 -ggdb3 -DDEBUG
else
FLAGS = -O2 -DNDEBUG
endif
FLAGS += -Werror
OFLAGS = $(FLAGS)
OFLAGS += -Isrc/appl/include -Isrc/bsp/include
OFLAGS += -D__FILENAME__='"$(notdir $<)"'
CFLAGS = $(OFLAGS) -Isrc/readyBoost/include/boost -std=gnu99
CXXFLAGS = $(OFLAGS) -Isrc/readyBoost/include/boost -std=c++11 -Wall
TARGET = bin/fiscat
CSRC = $(shell find src -name *.c)
CXXSRC = $(shell find src -name *.cpp)
COBJ = $(patsubst %.c, %.o, $(CSRC))
CXXOBJ = $(patsubst %.cpp, %.o, $(CXXSRC))
LDLIBS = -lpthread -lsrc/readyBoost/lib
all: $(TARGET)
$(TARGET): $(COBJ) $(CXXOBJ)
rm -rf bin; mkdir bin/
$(CXX) $(FLAGS) $(COBJ) $(CXXOBJ) $(LDLIBS) -o$@
ifneq ($(DEBUG), 1)
$(STRIP) $(TARGET)
endif
@du -h $(TARGET)
@file $(TARGET)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
find src -name *.o -delete
rm -fr $(TARGET)