Restructure RPi files (#827)
- Restructure SPi files for linux and RPi - Update RPi revision detection (#826)
This commit is contained in:
committed by
Henrik Ekblad
parent
26c237adad
commit
4c31e22d6f
@@ -26,30 +26,14 @@ GATEWAY_OBJECTS=$(patsubst %.c,$(BUILDDIR)/%.o,$(GATEWAY_C_SOURCES)) $(patsubst
|
||||
|
||||
INCLUDES=-I. -I./core -I./drivers/Linux
|
||||
|
||||
ifeq ($(SOC),$(filter $(SOC),BCM2835 BCM2836))
|
||||
RPI_C_SOURCES=$(wildcard drivers/RPi/*.c)
|
||||
RPI_CPP_SOURCES=$(wildcard drivers/RPi/*.cpp)
|
||||
GATEWAY_OBJECTS+=$(patsubst %.c,$(BUILDDIR)/%.o,$(RPI_C_SOURCES)) $(patsubst %.cpp,$(BUILDDIR)/%.o,$(RPI_CPP_SOURCES))
|
||||
|
||||
INCLUDES+=-I./drivers/RPi
|
||||
endif
|
||||
|
||||
ifeq ($(SPI_DRIVER), BCM)
|
||||
SPI_DRIVER_C_SOURCES=$(wildcard drivers/BCM/*.c)
|
||||
SPI_DRIVER_CPP_SOURCES=$(wildcard drivers/BCM/*.cpp)
|
||||
GATEWAY_OBJECTS+=$(patsubst %.c,$(BUILDDIR)/%.o,$(SPI_DRIVER_C_SOURCES)) $(patsubst %.cpp,$(BUILDDIR)/%.o,$(SPI_DRIVER_CPP_SOURCES))
|
||||
ifeq ($(SOC),$(filter $(SOC),BCM2835 BCM2836 BCM2837))
|
||||
BCM_C_SOURCES=$(wildcard drivers/BCM/*.c)
|
||||
BCM_CPP_SOURCES=$(wildcard drivers/BCM/*.cpp)
|
||||
GATEWAY_OBJECTS+=$(patsubst %.c,$(BUILDDIR)/%.o,$(BCM_C_SOURCES)) $(patsubst %.cpp,$(BUILDDIR)/%.o,$(BCM_CPP_SOURCES))
|
||||
|
||||
INCLUDES+=-I./drivers/BCM
|
||||
endif
|
||||
|
||||
ifeq ($(SPI_DRIVER), SPIDEV)
|
||||
SPI_DRIVER_C_SOURCES=$(wildcard drivers/SPIDEV/*.c)
|
||||
SPI_DRIVER_CPP_SOURCES=$(wildcard drivers/SPIDEV/*.cpp)
|
||||
GATEWAY_OBJECTS+=$(patsubst %.c,$(BUILDDIR)/%.o,$(SPI_DRIVER_C_SOURCES)) $(patsubst %.cpp,$(BUILDDIR)/%.o,$(SPI_DRIVER_CPP_SOURCES))
|
||||
|
||||
INCLUDES+=-I./drivers/SPIDEV
|
||||
endif
|
||||
|
||||
# Gets include flags for library
|
||||
get_library_includes = $(if $(and $(wildcard $(1)/src), $(wildcard $(1)/library.properties)), \
|
||||
-I$(1)/src, \
|
||||
|
||||
Reference in New Issue
Block a user