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
5d540d0a
Commit
5d540d0a
authored
Sep 15, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*Makefile: add "override"" to allow command-line option appending
parent
eeb4224a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
67 deletions
+93
-67
Makefile
Makefile
+24
-20
Makefile
examples/Makefile
+11
-9
Makefile
src/libs/libbpmclient/Makefile
+14
-10
Makefile
src/libs/libconvc/Makefile
+11
-7
Makefile
src/libs/libdisptable/Makefile
+11
-7
Makefile
src/libs/liberrhand/Makefile
+11
-7
Makefile
src/libs/libhutils/Makefile
+11
-7
No files found.
Makefile
View file @
5d540d0a
...
...
@@ -68,57 +68,61 @@ LIBDISPTABLE_DIR = src/libs/libdisptable
LIBBPMCLIENT_DIR
=
src/libs/libbpmclient
LIBSDBFS_DIR
=
foreign/libsdbfs
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
# General C/CPP flags
CFLAGS_USR
=
-std
=
gnu99
-O2
# We expect tghese variables to be appended to the possible
# command-line options
override
CPPFLAGS
+=
override
CXXFLAGS
+=
ifeq
($(BOARD),afcv3)
ifeq
($(SHRINK_AFCV3_DDR_SIZE),y)
CFLAGS
+=
-D__SHRINK_AFCV3_DDR_SIZE__
CFLAGS
_USR
+=
-D__SHRINK_AFCV3_DDR_SIZE__
endif
endif
# Board selection
ifeq
($(BOARD),ml605)
CFLAGS
+=
-D__BOARD_ML605__
-D__WR_SHIFT_FIX__
=
2
CFLAGS
_USR
+=
-D__BOARD_ML605__
-D__WR_SHIFT_FIX__
=
2
endif
ifeq
($(BOARD),afcv3)
CFLAGS
+=
-D__BOARD_AFCV3__
-D__WR_SHIFT_FIX__
=
0
CFLAGS
_USR
+=
-D__BOARD_AFCV3__
-D__WR_SHIFT_FIX__
=
0
endif
# Program FMC130M_4CH EEPROM
ifeq
($(FMC130M_4CH_EEPROM_PROGRAM),active)
CFLAGS
+=
-D__FMC130M_4CH_EEPROM_PROGRAM__
=
1
CFLAGS
_USR
+=
-D__FMC130M_4CH_EEPROM_PROGRAM__
=
1
endif
ifeq
($(FMC130M_4CH_EEPROM_PROGRAM),passive)
CFLAGS
+=
-D__FMC130M_4CH_EEPROM_PROGRAM__
=
2
CFLAGS
_USR
+=
-D__FMC130M_4CH_EEPROM_PROGRAM__
=
2
endif
# Compile DEV MNGR or not
ifeq
($(WITH_DEV_MNGR),y)
CFLAGS
+=
-D__WITH_DEV_MNGR__
CFLAGS
_USR
+=
-D__WITH_DEV_MNGR__
endif
ifeq
($(AFE_RFFE_TYPE),1)
CFLAGS
+=
-D__AFE_RFFE_V1__
CFLAGS
_USR
+=
-D__AFE_RFFE_V1__
endif
ifeq
($(AFE_RFFE_TYPE),2)
CFLAGS
+=
-D__AFE_RFFE_V2__
CFLAGS
_USR
+=
-D__AFE_RFFE_V2__
endif
# Compile DEVIO Config or not
ifeq
($(WITH_DEVIO_CFG),y)
CFLAGS
+=
-D__WITH_DEVIO_CFG__
CFLAGS
_USR
+=
-D__WITH_DEVIO_CFG__
endif
ifneq
($(CFG_DIR),)
CFLAGS
+=
-D__CFG_DIR__
=
$(CFG_DIR)
CFLAGS
_USR
+=
-D__CFG_DIR__
=
$(CFG_DIR)
endif
ifneq
($(CFG_FILENAME),)
CFLAGS
+=
-D__CFG_FILENAME__
=
$(CFG_FILENAME)
CFLAGS
_USR
+=
-D__CFG_FILENAME__
=
$(CFG_FILENAME)
endif
# Debug conditional flags
...
...
@@ -194,10 +198,10 @@ INCLUDE_DIRS = $(boards_INCLUDE_DIRS) \
-Iforeign
/libsdbfs
\
-I
/usr/local/include
# Merge all flags.
CFLAGS
+=
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
LDFLAGS
=
$(LDFLAGS_PLATFORM)
# Merge all flags.
We expect tghese variables to be appended to the possible
# command-line options
override
CFLAGS
+=
$(CFLAGS_USR)
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
$(CPPFLAGS)
$(CXXFLAGS)
override
LDFLAGS
+=
$(LFLAGS)
$(LDFLAGS_PLATFORM)
# Output modules
OUT
=
$(dev_mngr_OUT)
$(dev_io_OUT)
...
...
@@ -268,14 +272,14 @@ all: $(PROJECT_LIBS_NAME) cfg $(OUT)
# Output Rule
$(OUT)
:
$$($$@_OBJS) $(revision_OBJS)
$(CC)
$(
LFLAGS)
$(
CFLAGS)
$(INCLUDE_DIRS)
-o
$@
$^
$
(
$@
_STATIC_LIBS
)
$(LDFLAGS)
$(LIBS)
$
(
$@
_LIBS
)
$(PROJECT_LIBS)
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-o
$@
$^
$
(
$@
_STATIC_LIBS
)
$(LDFLAGS)
$(LIBS)
$
(
$@
_LIBS
)
$(PROJECT_LIBS)
# Special rule for the revision object
$(revision_OBJS)
:
$(revision_SRCS)
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-DGIT_REVISION
=
"
\"
$(GIT_REVISION)
\"
"
\
-DGIT_USER_NAME
=
"
\"
$(GIT_USER_NAME)
\"
"
\
-DGIT_USER_EMAIL
=
"
\"
$(GIT_USER_EMAIL)
\"
"
\
-c
$<
-o
$@
-c
$<
-o
$@
$(LDFLAGS)
# Pull in dependency info for *existing* .o files and don't complain if the
# corresponding .d file is not found
...
...
@@ -284,7 +288,7 @@ $(revision_OBJS): $(revision_SRCS)
# Autodependencies generatation by Scott McPeak, November 2001,
# from article "Autodependencies with GNU make"
%.o
:
%.c
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(LDFLAGS)
# create the dependency files "target: pre-requisites"
${CC}
-MM
$(CFLAGS)
$(INCLUDE_DIRS)
$*.c
>
$*.d
...
...
examples/Makefile
View file @
5d540d0a
...
...
@@ -11,8 +11,12 @@ OBJCOPY ?= $(CROSS_COMPILE)objcopy
SIZE
?=
$(CROSS_COMPILE)
size
MAKE
?=
make
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
# General C/CPP flags
CFLAGS_USR
=
-std
=
gnu99
-O2
# We expect tghese variables to be appended to the possible
# command-line options
override
CPPFLAGS
+=
override
CXXFLAGS
+=
LOCAL_MSG_DBG
?=
n
DBE_DBG
?=
n
...
...
@@ -43,12 +47,10 @@ LFLAGS =
# Include directories
INCLUDE_DIRS
=
-I
.
-I
/usr/local/lib
# Merge all flags. Optimize for size (-Os)
CFLAGS
+=
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
#-Os
LDFLAGS
=
$(LDFLAGS_PLATFORM)
#-ffunction-sections -fdata-sections -Wl,--gc-sections
# Merge all flags. We expect tghese variables to be appended to the possible
# command-line options
override
CFLAGS
+=
$(CFLAGS_USR)
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
$(CPPFLAGS)
$(CXXFLAGS)
override
LDFLAGS
+=
$(LFLAGS)
$(LDFLAGS_PLATFORM)
# Every .c file will must be a separate example
examples_SRC
=
$
(
wildcard
*
.c
)
...
...
@@ -57,7 +59,7 @@ OUT = $(basename $(examples_SRC))
all
:
$(OUT)
%
:
%.c
$(CC)
$(
LFLAGS)
$(CFLAGS)
$(INCLUDE_DIRS)
$^
-o
$@
$(LIBS)
$(CC)
$(
CFLAGS)
$(INCLUDE_DIRS)
$^
-o
$@
$(LDFLAGS)
$(LIBS)
#BAD
clean
:
...
...
src/libs/libbpmclient/Makefile
View file @
5d540d0a
...
...
@@ -24,15 +24,19 @@ LIBBPMCLIENT = libbpmclient
# Config variables suitable for creating shared libraries
LIB_VER
=
$(
shell
./version.sh bpm_client
)
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
-fPIC
# General C/CPP flags
CFLAGS_USR
=
-std
=
gnu99
-O2
-fPIC
# We expect tghese variables to be appended to the possible
# command-line options
override
CPPFLAGS
+=
override
CXXFLAGS
+=
ifeq
($(BOARD),ml605)
CFLAGS
+=
-D__BOARD_ML605__
CFLAGS
_USR
+=
-D__BOARD_ML605__
endif
ifeq
($(BOARD),afcv3)
CFLAGS
+=
-D__BOARD_AFCV3__
CFLAGS
_USR
+=
-D__BOARD_AFCV3__
endif
CFLAGS_DEBUG
=
...
...
@@ -103,10 +107,10 @@ INCLUDE_DIRS = -I. -Iinclude -I../liberrhand -I../libhutils -I../libdisptable \
-I
../../sm_io/modules/afc_diag
\
-I
/usr/local/include
# Merge all flags.
Optimize for size (-Os)
CFLAGS
+=
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
LDFLAGS
=
$(LDFLAGS_PLATFORM)
# Merge all flags.
We expect tghese variables to be appended to the possible
# command-line options
override
CFLAGS
+=
$(CFLAGS_USR)
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
$(CPPFLAGS)
$(CXXFLAGS)
override
LDFLAGS
+=
$(LFLAGS)
$(LDFLAGS_PLATFORM)
# Output library names
OUT
=
$(LIBBPMCLIENT)
...
...
@@ -209,7 +213,7 @@ $(revision_OBJS): $(revision_SRCS)
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-DGIT_REVISION
=
"
\"
$(GIT_REVISION)
\"
"
\
-DGIT_USER_NAME
=
"
\"
$(GIT_USER_NAME)
\"
"
\
-DGIT_USER_EMAIL
=
"
\"
$(GIT_USER_EMAIL)
\"
"
\
-c
$<
-o
$@
-c
$<
-o
$@
$(LDFLAGS)
# Pull in dependency info for *existing* .o files and don't complain if the
# corresponding .d file is not found
...
...
@@ -219,7 +223,7 @@ $(revision_OBJS): $(revision_SRCS)
# Autodependencies generatation by Scott McPeak, November 2001,
# from article "Autodependencies with GNU make"
%.o
:
%.c
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(LDFLAGS)
# create the dependency files "target: pre-requisites"
${CC}
-MM
$(CFLAGS)
$(INCLUDE_DIRS)
$*.c
>
$*.d
...
...
src/libs/libconvc/Makefile
View file @
5d540d0a
...
...
@@ -15,8 +15,12 @@ PWD = $(shell pwd)
LIBCONVC
=
libconvc
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
# General C/CPP flags
CFLAGS_USR
=
-std
=
gnu99
-O2
# We expect tghese variables to be appended to the possible
# command-line options
override
CPPFLAGS
+=
override
CXXFLAGS
+=
# To enable this option, use: make ERRHAND_DBG=y
ifneq
($(ERRHAND_DBG),)
...
...
@@ -53,10 +57,10 @@ LFLAGS =
# Include directories
INCLUDE_DIRS
=
-I
.
-I
../liberrhand
# Merge all flags.
Optimize for size (-Os)
CFLAGS
+=
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
LDFLAGS
=
$(LDFLAGS_PLATFORM)
# Merge all flags.
We expect tghese variables to be appended to the possible
# command-line options
override
CFLAGS
+=
$(CFLAGS_USR)
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
$(CPPFLAGS)
$(CXXFLAGS)
override
LDFLAGS
+=
$(LFLAGS)
$(LDFLAGS_PLATFORM)
# Output library names
OUT
=
$(LIBCONVC)
...
...
@@ -103,7 +107,7 @@ all: $(TARGET_STATIC)
# Autodependencies generatation by Scott McPeak, November 2001,
# from article "Autodependencies with GNU make"
%.o
:
%.c
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(LDFLAGS)
# create the dependency files "target: pre-requisites"
${CC}
-MM
$(CFLAGS)
$(INCLUDE_DIRS)
$*.c
>
$*.d
...
...
src/libs/libdisptable/Makefile
View file @
5d540d0a
...
...
@@ -15,8 +15,12 @@ PWD = $(shell pwd)
LIBDISPTABLE
=
libdisptable
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
# General C/CPP flags
CFLAGS_USR
=
-std
=
gnu99
-O2
# We expect tghese variables to be appended to the possible
# command-line options
override
CPPFLAGS
+=
override
CXXFLAGS
+=
# To enable this option, use: make ERRHAND_DBG=y
ifneq
($(ERRHAND_DBG),)
...
...
@@ -53,10 +57,10 @@ LFLAGS =
# Include directories
INCLUDE_DIRS
=
-I
.
-I
../liberrhand
-I
../libhutils
# Merge all flags.
Optimize for size (-Os)
CFLAGS
+=
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
LDFLAGS
=
$(LDFLAGS_PLATFORM)
# Merge all flags.
We expect tghese variables to be appended to the possible
# command-line options
override
CFLAGS
+=
$(CFLAGS_USR)
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
$(CPPFLAGS)
$(CXXFLAGS)
override
LDFLAGS
+=
$(LFLAGS)
$(LDFLAGS_PLATFORM)
# Output library names
OUT
=
$(LIBDISPTABLE)
...
...
@@ -103,7 +107,7 @@ all: $(TARGET_STATIC)
# Autodependencies generatation by Scott McPeak, November 2001,
# from article "Autodependencies with GNU make"
%.o
:
%.c
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(LDFLAGS)
# create the dependency files "target: pre-requisites"
${CC}
-MM
$(CFLAGS)
$(INCLUDE_DIRS)
$*.c
>
$*.d
...
...
src/libs/liberrhand/Makefile
View file @
5d540d0a
...
...
@@ -24,8 +24,12 @@ LIB_VER = $(LIB_VER_MAJOR).$(LIB_VER_MINOR).$(LIB_VER_REVISION)
PREFIX
?=
/usr/local
export
PREFIX
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
-fPIC
# General C/CPP flags
CFLAGS_USR
=
-std
=
gnu99
-O2
-fPIC
# We expect tghese variables to be appended to the possible
# command-line options
override
CPPFLAGS
+=
override
CXXFLAGS
+=
# To enable this option, use: make ERRHAND_DBG=y
ifneq
($(ERRHAND_DBG),)
...
...
@@ -75,10 +79,10 @@ LFLAGS =
# Include directories
INCLUDE_DIRS
=
-I
.
# Merge all flags.
Optimize for size (-Os)
CFLAGS
+=
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
LDFLAGS
=
$(LDFLAGS_PLATFORM)
# Merge all flags.
We expect tghese variables to be appended to the possible
# command-line options
override
CFLAGS
+=
$(CFLAGS_USR)
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
$(CPPFLAGS)
$(CXXFLAGS)
override
LDFLAGS
+=
$(LFLAGS)
$(LDFLAGS_PLATFORM)
# Output library names
OUT
=
$(LIBERRHAND)
...
...
@@ -132,7 +136,7 @@ all: $(TARGET_STATIC) $(TARGET_SHARED_VER)
# Autodependencies generatation by Scott McPeak, November 2001,
# from article "Autodependencies with GNU make"
%.o
:
%.c
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(LDFLAGS)
# create the dependency files "target: pre-requisites"
${CC}
-MM
$(CFLAGS)
$(INCLUDE_DIRS)
$*.c
>
$*.d
...
...
src/libs/libhutils/Makefile
View file @
5d540d0a
...
...
@@ -21,8 +21,12 @@ LIB_VER_MINOR = 0
LIB_VER_REVISION
=
0
LIB_VER
=
$(LIB_VER_MAJOR)
.
$(LIB_VER_MINOR)
.
$(LIB_VER_REVISION)
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
-fPIC
# General C/CPP flags
CFLAGS_USR
=
-std
=
gnu99
-O2
-fPIC
# We expect tghese variables to be appended to the possible
# command-line options
override
CPPFLAGS
+=
override
CXXFLAGS
+=
# To enable this option, use: make ERRHAND_DBG=y
ifneq
($(ERRHAND_DBG),)
...
...
@@ -59,10 +63,10 @@ LFLAGS =
# Include directories
INCLUDE_DIRS
=
-I
.
-I
../liberrhand
# Merge all flags.
Optimize for size (-Os)
CFLAGS
+=
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
LDFLAGS
=
$(LDFLAGS_PLATFORM)
# Merge all flags.
We expect tghese variables to be appended to the possible
# command-line options
override
CFLAGS
+=
$(CFLAGS_USR)
$(CFLAGS_PLATFORM)
$(CFLAGS_DEBUG)
$(CPPFLAGS)
$(CXXFLAGS)
override
LDFLAGS
+=
$(LFLAGS)
$(LDFLAGS_PLATFORM)
# Output library names
OUT
=
$(LIBHUTILS)
...
...
@@ -117,7 +121,7 @@ all: $(TARGET_STATIC) $(TARGET_SHARED_VER)
# Autodependencies generatation by Scott McPeak, November 2001,
# from article "Autodependencies with GNU make"
%.o
:
%.c
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(CC)
$(CFLAGS)
$(INCLUDE_DIRS)
-c
$*
.c
-o
$@
$(LDFLAGS)
# create the dependency files "target: pre-requisites"
${CC}
-MM
$(CFLAGS)
$(INCLUDE_DIRS)
$*.c
>
$*.d
...
...
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