Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Beam Positoning Monitor - Software
Commits
95c29777
Commit
95c29777
authored
Apr 16, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{Makefile,compile.sh}: add new libraries to build system
parent
b368b98b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
17 deletions
+87
-17
Makefile
Makefile
+71
-9
compile.sh
compile.sh
+16
-8
No files found.
Makefile
View file @
95c29777
...
...
@@ -55,8 +55,10 @@ PCIE_DRIVER_DIR = $(FOREIGN_DIR)/pcie-driver
PCIE_DRIVER_VER
=
$(
shell
uname
-r
)
DRIVER_OBJ
=
/lib/modules/
$(PCIE_DRIVER_VER)
/extra/pciDriver.ko
# Client library
LIBBPMCLIENT_DIR
=
src/libs/libbpmclient
# Project libraries
LIBERRHAND_DIR
=
src/libs/liberrhand
LIBCONVC_DIR
=
src/libs/libconvc
LIBBPMCLIENT_DIR
=
src/libs/libbpmclient
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
...
...
@@ -112,8 +114,23 @@ ifeq ($(LOCAL_MSG_DBG),y)
CFLAGS_DEBUG
+=
-DLOCAL_MSG_DBG
=
1
endif
ifeq
($(DBE_DBG),y)
CFLAGS_DEBUG
+=
-DDBE_DBG
=
1
# To enable this option, use: make ERRHAND_DBG=y
ifneq
($(ERRHAND_DBG),)
CFLAGS_DEBUG
+=
-DERRHAND_DBG
=
$(ERRHAND_DBG)
endif
# To enable this option use: make ERRHAND_MIN_LEVEL=DBG_MIN_TRACE
ifneq
($(ERRHAND_MIN_LEVEL),)
CFLAGS_DEBUG
+=
-DERRHAND_MIN_LEVEL
=
$(ERRHAND_MIN_LEVEL)
endif
# To enable this option use: make ERRHAND_SUBSYS_ON='"(DBG_DEV_MNGR | \
# DBG_DEV_IO | DBG_SM_IO | DBG_LIB_CLIENT | DBG_SM_PR | DBG_SM_CH | DBG_LL_IO | DBG_HAL_UTILS)"'
#
# You can also OR the available subsytems to enable debug messages in just the
# those subsytems. See file errhand_opts.h for more information
ifneq
($(ERRHAND_SUBSYS_ON),)
CFLAGS_DEBUG
+=
-DERRHAND_SUBSYS_ON
=
$(ERRHAND_SUBSYS_ON)
endif
# Debug flags -D<flasg_name>=<value>
...
...
@@ -125,8 +142,14 @@ LDFLAGS_PLATFORM =
# Libraries
LIBS
=
-lm
-lzmq
-lczmq
-lmdp
-lpcidriver
# FIXME: make the project libraries easily interchangeable, specifying
# the lib only a single time
PROJECT_LIBS_NAME
=
liberrhand libconvc libbpmclient
PROJECT_LIBS
=
-lerrhand
-lconvc
-lbpmclient
# General library flags -L<libdir>
LFLAGS
=
LFLAGS
=
-Lsrc
/libs/liberrhand
-Lsrc
/libs/libconvc
-Lsrc
/libs/lbpmclient
# Specific platform objects
OBJS_PLATFORM
=
...
...
@@ -142,6 +165,9 @@ include $(SRC_DIR)/revision/revision.mk
INCLUDE_DIRS
=
$(hal_INCLUDE_DIRS)
\
$(revision_INCLUDE_DIRS)
\
-I
$(PCIE_DRIVER_DIR)
/include/pcie
\
-Isrc
/libs/liberrhand
\
-Isrc
/libs/libconvc
\
-Isrc
/libs/libbpmclient
\
-I
/usr/local/include
# Merge all flags.
...
...
@@ -170,6 +196,8 @@ revision_SRCS = $(patsubst %.o,%.c,$(revision_OBJS))
.PHONY
:
all install uninstall clean mrproper
\
pcie_driver pcie_driver_install pcie_driver_uninstall pcie_driver_clean pcie_driver_check
\
liberrhand liberrhand_install liberrhand_uninstall liberrhand_clean liberrhand_mrproper
\
libconvc libconvc_install libconvc_uninstall libconvc_clean libconvc_mrproper
\
libbpmclient libbpmclient_install libbpmclient_uninstall libbpmclient_clean libbpmclient_mrproper
\
libmdp libmdp_install libmdp_uninstall libmdp_clean libmdp_mrproper
\
libbsmp libbsmp_install libbsmp_uninstall libbsmp_clean libbsmp_mrproper
\
...
...
@@ -182,11 +210,11 @@ revision_SRCS = $(patsubst %.o,%.c,$(revision_OBJS))
.SECONDARY
:
$(OBJS_all)
# Makefile rules
all
:
libbpmclient
cfg $(OUT)
all
:
$(PROJECT_LIBS_NAME)
cfg $(OUT)
# Output Rule
$(OUT)
:
$$($$@_OBJS) $(revision_OBJS)
$(CC)
$(LFLAGS)
$(CFLAGS)
$(INCLUDE_DIRS)
-o
$@
$^
$
(
$@
_STATIC_LIBS
)
$(LDFLAGS)
$(LIBS)
$
(
$@
_LIBS
)
$(CC)
$(LFLAGS)
$(CFLAGS)
$(INCLUDE_DIRS)
-o
$@
$^
$
(
$@
_STATIC_LIBS
)
$(LDFLAGS)
$(LIBS)
$
(
$@
_LIBS
)
$(PROJECT_LIBS)
# Special rule for the revision object
$(revision_OBJS)
:
$(revision_SRCS)
...
...
@@ -286,6 +314,38 @@ libbsmp_clean:
libbsmp_mrproper
:
$(MAKE)
-C
$(LIBBSMP_DIR)
distclean
# Project Libraries
liberrhand
:
$(MAKE)
-C
$(LIBERRHAND_DIR)
all
liberrhand_install
:
$(MAKE)
-C
$(LIBERRHAND_DIR)
install
liberrhand_uninstall
:
$(MAKE)
-C
$(LIBERRHAND_DIR)
uninstall
liberrhand_clean
:
$(MAKE)
-C
$(LIBERRHAND_DIR)
clean
liberrhand_mrproper
:
$(MAKE)
-C
$(LIBERRHAND_DIR)
mrproper
libconvc
:
$(MAKE)
-C
$(LIBCONVC_DIR)
all
libconvc_install
:
$(MAKE)
-C
$(LIBCONVC_DIR)
install
libconvc_uninstall
:
$(MAKE)
-C
$(LIBCONVC_DIR)
uninstall
libconvc_clean
:
$(MAKE)
-C
$(LIBCONVC_DIR)
clean
libconvc_mrproper
:
$(MAKE)
-C
$(LIBCONVC_DIR)
mrproper
libbpmclient
:
$(MAKE)
-C
$(LIBBPMCLIENT_DIR)
all
...
...
@@ -301,6 +361,8 @@ libbpmclient_clean:
libbpmclient_mrproper
:
$(MAKE)
-C
$(LIBBPMCLIENT_DIR)
mrproper
# External project dependencies
deps
:
libmdp libbsmp
deps_install
:
libmdp_install libbsmp_install
...
...
@@ -362,7 +424,7 @@ install: hal_install deps_install libbpmclient_install cfg_install
uninstall
:
hal_uninstall deps_uninstall libbpmclient_uninstall cfg_uninstall
clean
:
hal_clean deps_clean libbpmclient_clean examples_clean tests_clean cfg_clean
clean
:
hal_clean deps_clean lib
errhand_clean libconvc_clean lib
bpmclient_clean examples_clean tests_clean cfg_clean
mrproper
:
clean hal_mrproper deps_mrproper libbpmclient_mrproper examples_mrproper tests_mrproper cfg_mrproper
mrproper
:
clean hal_mrproper deps_mrproper lib
errhand_mrproper libconvc_mrproper lib
bpmclient_mrproper examples_mrproper tests_mrproper cfg_mrproper
compile.sh
View file @
95c29777
...
...
@@ -7,7 +7,11 @@ BOARD=afcv3
#Select if we want to compile code with all messages outputs. Options are: y(es) or n(o)
LOCAL_MSG_DBG
=
n
#Select if we want to compile with debug mode on. Options are: y(es) or n(o)
DBE_DBG
=
y
ERRHAND_DBG
=
y
# Select the minimum debug verbosity. See liberrhand file errhand_opts.h for more info.
ERRHAND_MIN_LEVEL
=
DBG_LVL_TRACE
# Select the subsytems which will have the debug on. See liberrhand file errhand_opts.h for more info.
ERRHAND_SUBSYS_ON
=
'"(DBG_DEV_MNGR | DBG_DEV_IO | DBG_SM_IO | DBG_LIB_CLIENT | DBG_SM_PR | DBG_SM_CH | DBG_LL_IO | DBG_HAL_UTILS)"'
# Select the FMC ADC board type. Options are: passive or active
FMC130M_4CH_TYPE
=
passive
# Select if we should program FMC EEPROM with some code or not. Option are:
...
...
@@ -20,7 +24,7 @@ AFE_RFFE_TYPE=2
# Selects if we want to compile DEVIO Config. Options are: y(es) or n(o).
# If selected, the FPGA firmware must have the AFC diagnostics module
# synthesized.
WITH_DEVIO_CFG
=
n
WITH_DEVIO_CFG
=
y
# Selects the install location of the config file
CFG_FILENAME
=
/etc/bpm_sw/bpm_sw.cfg
# Selects the install location of the config file
...
...
@@ -32,8 +36,10 @@ COMMAND_DEPS="\
COMMAND_HAL
=
"
\
make BOARD=
${
BOARD
}
\
ERRHAND_DBG=
${
ERRHAND_DBG
}
\
ERRHAND_MIN_LEVEL=
${
ERRHAND_MIN_LEVEL
}
\
ERRHAND_SUBSYS_ON='"
${
ERRHAND_SUBSYS_ON
}
"'
\
LOCAL_MSG_DBG=
${
LOCAL_MSG_DBG
}
\
DBE_DBG=
${
DBE_DBG
}
\
FMC130M_4CH_TYPE=
${
FMC130M_4CH_TYPE
}
\
FMC130M_4CH_EEPROM_PROGRAM=
${
FMC130M_4CH_EEPROM_PROGRAM
}
\
WITH_DEV_MNGR=
${
WITH_DEV_MNGR
}
\
...
...
@@ -42,16 +48,18 @@ COMMAND_HAL="\
CFG_DIR=
${
CFG_DIR
}
&&
\
sudo make install"
COMMAND_LIBCLIENT
=
"
\
COMMAND_LIB
BPM
CLIENT
=
"
\
make BOARD=
${
BOARD
}
\
LOCAL_MSG_DBG=
${
LOCAL_MSG_DBG
}
\
DBE_DBG=
${
DBE_DBG
}
libclient &&
\
sudo make libclient_install"
ERRHAND_DBG=
${
ERRHAND_DBG
}
\
ERRHAND_MIN_LEVEL=
${
ERRHAND_MIN_LEVEL
}
\
ERRHAND_SUBSYS_ON=
${
ERRHAND_SUBSYS_ON
}
\
LOCAL_MSG_DBG=
${
LOCAL_MSG_DBG
}
&&
\
sudo make libbpmclient_install"
COMMAND_ARRAY
=(
"
${
COMMAND_DEPS
}
"
"
${
COMMAND_HAL
}
"
"
${
COMMAND_LIBCLIENT
}
"
"
${
COMMAND_LIB
BPM
CLIENT
}
"
)
for
i
in
"
${
COMMAND_ARRAY
[@]
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment