Commit 997ebe63 authored by Lucas Russo's avatar Lucas Russo

various: move include to top folder

parent 95c29777
......@@ -161,13 +161,18 @@ SRC_DIR = src
include $(SRC_DIR)/hal/hal.mk
include $(SRC_DIR)/revision/revision.mk
# Project boards
boards_INCLUDE_DIRS = -Iinclude/boards/$(BOARD)
# Include directories
INCLUDE_DIRS = $(hal_INCLUDE_DIRS) \
$(revision_INCLUDE_DIRS) \
$(revision_INCLUDE_DIRS) \
$(boards_INCLUDE_DIRS) \
-I$(PCIE_DRIVER_DIR)/include/pcie \
-Isrc/libs/liberrhand \
-Isrc/libs/libconvc \
-Isrc/libs/libbpmclient \
-Iinclude \
-Isrc/libs/liberrhand \
-Isrc/libs/libconvc \
-Isrc/libs/libbpmclient \
-I/usr/local/include
# Merge all flags.
......
......@@ -2,9 +2,9 @@
#define _ACQ_CHAN_H_
#if defined(__BOARD_ML605__)
#include "board/ml605/acq_chan_ml605.h"
#include "boards/ml605/priv_defs/acq_chan_ml605.h"
#elif defined(__BOARD_AFCV3__)
#include "board/afcv3/acq_chan_afcv3.h"
#include "boards/afcv3/priv_defs/acq_chan_afcv3.h"
#else
#error "Could not include acquisition channel definitions. Unsupported board!"
#endif
......
#ifndef _BOARD_H_
#define _BOARD_H_
#include "board/afcv3/defs.h"
#include "priv_defs/defs.h"
/****************************/
/* General Definitions */
......
#ifndef _MEM_LAYOUT_H_
#define _MEM_LAYOUT_H_
#include "pcie_regs.h"
#include "hw/pcie_regs.h"
#include "acq_chan_afcv3.h"
#define NUM_FMC130M_4CH_SMIOS 2
......
#ifndef _BOARD_H_
#define _BOARD_H_
#include <board/ml605/defs.h>
#include "priv_defs/defs.h"
/****************************/
/* General Definitions */
......
#ifndef _MEM_LAYOUT_H_
#define _MEM_LAYOUT_H_
#include "pcie_regs.h"
#include "hw/pcie_regs.h"
#include "acq_chan_ml605.h"
#define NUM_FMC130M_4CH_SMIOS 1
......
......@@ -8,7 +8,7 @@
#ifndef _SMPR_I2C_REGS_H_
#define _SMPR_I2C_REGS_H_
#include "wb_i2c_regs.h"
#include "hw/wb_i2c_regs.h"
/* Copied from wb_acq_core_regs.h */
#if defined( __GNUC__)
......
......@@ -8,7 +8,7 @@
#ifndef _SMPR_SPI_REGS_H_
#define _SMPR_SPI_REGS_H_
#include "wb_spi_regs.h"
#include "hw/wb_spi_regs.h"
/* Copied from wb_acq_core_regs.h */
#if defined( __GNUC__)
......
boards_DIR = $(SRC_DIR)/hal/boards
boards_INCLUDE_DIRS = $(boards_DIR)/$(BOARD)
# debug.mk must be declared before dev_mngr.mk, as they are variables
# exported by the former used by the latter
include $(SRC_DIR)/hal/ll_io/ll_io.mk
include $(SRC_DIR)/hal/sm_io/sm_io.mk
include $(SRC_DIR)/hal/sdb/sdb.mk
......@@ -7,12 +5,6 @@ include $(SRC_DIR)/hal/dev_mngr/dev_mngr.mk
include $(SRC_DIR)/hal/dev_io/dev_io.mk
include $(SRC_DIR)/hal/msg/msg.mk
include $(SRC_DIR)/hal/hal_utils/hal_utils.mk
include $(SRC_DIR)/hal/boards/boards.mk
std_hal_INCLUDE_DIRS = $(SRC_DIR)/hal/include \
$(SRC_DIR)/hal/include/hw \
$(SRC_DIR)/hal/include/protocols \
$(SRC_DIR)/hal/include/chips
hal_OUT += $(dev_mngr_OUT) $(dev_io_OUT)
......@@ -52,16 +44,14 @@ hal_OBJS = $(debug_OBJS) \
$(dev_io_core_OBJS)
# Merge all include directories together
hal_all_INCLUDE_DIRS += $(std_hal_INCLUDE_DIRS) \
$(debug_INCLUDE_DIRS) \
hal_all_INCLUDE_DIRS += $(debug_INCLUDE_DIRS) \
$(hal_utils_INCLUDE_DIRS) \
$(sdb_INCLUDE_DIRS) \
$(ll_io_INCLUDE_DIRS) \
$(sm_io_INCLUDE_DIRS) \
$(msg_INCLUDE_DIRS) \
$(dev_mngr_INCLUDE_DIRS) \
$(dev_io_INCLUDE_DIRS) \
$(boards_INCLUDE_DIRS)
$(dev_io_INCLUDE_DIRS)
# Change the include dirs into flags
hal_INCLUDE_DIRS = $(addprefix -I, $(hal_all_INCLUDE_DIRS))
......@@ -14,7 +14,7 @@
#include "sm_ch_24aa64.h"
#include "sm_pr.h"
#include "errhand.h"
#include "e24aa64_regs.h"
#include "chips/e24aa64_regs.h"
/* Undef ASSERT_ALLOC to avoid conflicting with other ASSERT_ALLOC */
#ifdef ASSERT_TEST
......
......@@ -14,7 +14,7 @@
#include "sm_ch_ad9510.h"
#include "sm_pr.h"
#include "errhand.h"
#include "ad9510_regs.h"
#include "chips/ad9510_regs.h"
#include "sm_ch_ad9510_defaults.h"
/* Undef ASSERT_ALLOC to avoid conflicting with other ASSERT_ALLOC */
......
......@@ -8,7 +8,7 @@
#ifndef _SMCH_AD9510_DEFAULTS_H_
#define _SMCH_AD9510_DEFAULTS_H_
#include "ad9510_regs.h"
#include "chips/ad9510_regs.h"
#define SMCH_AD9510_DFLT_PLL_B_COUNTER 35 /* Divide VXCO frequency by 35 */
#define SMCH_AD9510_DFLT_PLL_R_COUNTER 4 /* Divide Reference frequency by 1 */
......
......@@ -10,7 +10,7 @@
#include "sm_ch_pca9547.h"
#include "sm_pr.h"
#include "errhand.h"
#include "pca9547_regs.h"
#include "chips/pca9547_regs.h"
/* Undef ASSERT_ALLOC to avoid conflicting with other ASSERT_ALLOC */
#ifdef ASSERT_TEST
......
......@@ -15,7 +15,7 @@
#include "sm_pr.h"
#include "errhand.h"
#include "hal_stddef.h"
#include "si57x_regs.h"
#include "chips/si57x_regs.h"
#include "sm_ch_si57x_defaults.h"
/* Undef ASSERT_ALLOC to avoid conflicting with other ASSERT_ALLOC */
......
......@@ -8,7 +8,7 @@
#ifndef _SMCH_SI57X_DEFAULTS_H_
#define _SMCH_SI57X_DEFAULTS_H_
#include "si57x_regs.h"
#include "chips/si57x_regs.h"
#define SMCH_SI57X_DFLT_FXTAL 0.0
#define SMCH_SI57X_DFLT_N1 0
......
......@@ -16,7 +16,7 @@
#include "ddr3_map.h"
#include "board.h"
#include "rw_param.h"
#include "wb_acq_core_regs.h"
#include "hw/wb_acq_core_regs.h"
#include "sm_io_acq_exports.h"
#include "hal_stddef.h"
......
......@@ -15,7 +15,7 @@
#include "board.h"
#include "rw_param.h"
#include "rw_param_codes.h"
#include "wb_afc_diag_regs.h"
#include "hw/wb_afc_diag_regs.h"
#include "sm_io_afc_diag_defaults.h"
#include "sm_io_afc_diag_exports.h"
#include "hal_stddef.h"
......
......@@ -13,7 +13,7 @@
#include "dev_io_core.h"
#include "errhand.h"
#include "board.h"
#include "wb_pos_calc_regs.h"
#include "hw/wb_pos_calc_regs.h"
#include "rw_param.h"
#include "rw_param_codes.h"
#include "sm_io_dsp_defaults.h"
......
......@@ -9,7 +9,7 @@
#define _FMC130M_4CH_DEFAULTS_H_
#include "sm_io_err.h"
#include "si57x_regs.h"
#include "chips/si57x_regs.h"
#include "sm_ch_pca9547.h"
#define FMC130M_4CH_DFLT_PLL_FUNC 0x1
......
......@@ -15,7 +15,7 @@
#include "board.h"
#include "errhand.h"
#include "rw_param.h"
#include "wb_fmc130m_4ch_regs.h"
#include "hw/wb_fmc130m_4ch_regs.h"
#include "sm_io_fmc130m_4ch_exports.h"
#include "hal_stddef.h"
......
......@@ -16,7 +16,7 @@
#include "rw_param.h"
#include "rw_param_codes.h"
#include "sm_io_swap_useful_macros.h"
#include "wb_bpm_swap_regs.h"
#include "hw/wb_bpm_swap_regs.h"
#include "sm_io_swap_defaults.h"
#include "sm_io_swap_exports.h"
#include "hal_stddef.h"
......
......@@ -9,7 +9,7 @@
#define _SM_IO_SWAP_USEFUL_MACROS_H_
#include <inttypes.h>
#include "wb_bpm_swap_regs.h"
#include "hw/wb_bpm_swap_regs.h"
/* Some useful macros */
#define RW_SWAP_GAIN_LOWER_R(val) BPM_SWAP_A_A_R(val)
......
......@@ -15,7 +15,7 @@
#include "sm_io.h"
#include "sm_pr_i2c.h"
#include "sm_pr_i2c_defaults.h"
#include "wb_i2c_regs.h"
#include "hw/wb_i2c_regs.h"
#include "rw_param.h"
#include "rw_param_codes.h"
#include "errhand.h"
......
......@@ -10,8 +10,8 @@
#include "sm_pr.h"
#include "sm_pr_err.h"
#include "wb_i2c_regs.h"
#include "smpr_i2c_regs.h"
#include "hw/wb_i2c_regs.h"
#include "protocols/smpr_i2c_regs.h"
#define SM_PR_I2C_MAX_TRIES 10
#define SM_PR_I2C_USLEEP 1000
......
......@@ -17,7 +17,7 @@
#include "sm_io.h"
#include "sm_pr_spi.h"
#include "sm_pr_spi_defaults.h"
#include "wb_spi_regs.h"
#include "hw/wb_spi_regs.h"
#include "rw_param.h"
#include "rw_param_codes.h"
#include "errhand.h"
......
......@@ -10,8 +10,8 @@
#include "sm_pr.h"
#include "sm_pr_err.h"
#include "wb_spi_regs.h"
#include "smpr_spi_regs.h"
#include "hw/wb_spi_regs.h"
#include "protocols/smpr_spi_regs.h"
#define SM_PR_SPI_MAX_TRIES 10
#define SM_PR_SPI_USLEEP 1000
......
......@@ -8,7 +8,7 @@
#ifndef _SM_PR_SPI_DEFAULTS_H_
#define _SM_PR_SPI_DEFAULTS_H_
#include "wb_spi_regs.h"
#include "hw/wb_spi_regs.h"
#define SM_PR_SPI_DFLT_SYS_FREQ 100000000 /* 100 MHz */
#define SM_PR_SPI_DFLT_SPI_FREQ 100000 /* 100 KHz */
......
......@@ -86,8 +86,12 @@ OBJS_EXTERNAL = ../../hal/sm_io/modules/sm_io_codes.o \
../../hal/sm_io/modules/rffe/sm_io_rffe_exports.o \
../../hal/sm_io/modules/afc_diag/sm_io_afc_diag_exports.o
# Project boards
boards_INCLUDE_DIRS = -I../../../include/boards/$(BOARD)
# Include directories
INCLUDE_DIRS = -I. -I../../hal/include -I../liberrhand \
INCLUDE_DIRS = -I. -I../../../include -I../liberrhand \
$(boards_INCLUDE_DIRS) \
-I../../hal/sm_io/modules \
-I../../hal/sm_io/modules/fmc130m_4ch \
-I../../hal/sm_io/modules/acq \
......@@ -96,8 +100,6 @@ INCLUDE_DIRS = -I. -I../../hal/include -I../liberrhand \
-I../../hal/sm_io/modules/rffe \
-I../../hal/sm_io/modules/afc_diag \
-I../../hal/hal_utils \
-I../../hal/include/hw \
-I../../hal/boards/$(BOARD) \
-I/usr/local/include
# Merge all flags. Optimize for size (-Os)
......@@ -141,9 +143,10 @@ $(LIBBPMCLIENT)_FUNC_EXPORTS = ../../hal/sm_io/modules/fmc130m_4ch/sm_io_fmc130m
# ../../hal/include/mem_layout/ml605/acq_chan_ml605.h \
# ../../hal/include/mem_layout/afcv3/acq_chan_afcv3.h
$(LIBBPMCLIENT)_ACQ_HEADER_BASENAME = acq_chan
$(LIBBPMCLIENT)_ACQ_HEADERS += \
../../hal/include/board/$(BOARD)/$($(LIBBPMCLIENT)_ACQ_HEADER_BASENAME)_$(BOARD).h
#$(LIBBPMCLIENT)_ACQ_HEADER_BASENAME = acq_chan
#$(LIBBPMCLIENT)_ACQ_HEADERS += \
# ../../../include/board/$(BOARD)/$($(LIBBPMCLIENT)_ACQ_HEADER_BASENAME)_$(BOARD).h
$(LIBBPMCLIENT)_ACQ_HEADERS += ../../../include/acq_chan.h
$(LIBBPMCLIENT)_HEADERS = $($(LIBBPMCLIENT)_OBJS_LIB:.o=.h) $($(LIBBPMCLIENT)_CODE_HEADERS) \
$($(LIBBPMCLIENT)_FUNC_EXPORTS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment