mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
timer: Build platform-specific parts as lib
By using the build system's library-selection mechanism instead of many timer targets with different 'REQUIRES' declarations, this patch reduces the noise of the build system. For all platforms, the target at 'os/src/drivers/timer' is built. The target, in turn, depends on a 'timer' library, which is platform-specific. The various library description files are located under 'os/lib/mk/<platform>'. The common bits are contained in 'os/lib/mk/timer.inc'.
This commit is contained in:
parent
3049c1004c
commit
20a5c86a22
13
os/lib/mk/codezero/timer.mk
Normal file
13
os/lib/mk/codezero/timer.mk
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/include_periodic
|
||||||
|
|
||||||
|
#
|
||||||
|
# Supply dummy includes to prevent warning about missing string.h and stdio.h,
|
||||||
|
# which are included by Codezero's headers.
|
||||||
|
#
|
||||||
|
REP_INC_DIR += include/codezero/dummies
|
||||||
|
|
||||||
|
SRC_CC += platform_timer.cc
|
||||||
|
vpath platform_timer.cc $(REP_DIR)/src/drivers/timer/codezero
|
||||||
|
|
3
os/lib/mk/epit/timer.mk
Normal file
3
os/lib/mk/epit/timer.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/hw $(REP_DIR)/src/drivers/timer/hw/epit
|
||||||
|
|
||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
6
os/lib/mk/fiasco/timer.mk
Normal file
6
os/lib/mk/fiasco/timer.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/include_periodic
|
||||||
|
|
||||||
|
SRC_CC += platform_timer.cc
|
||||||
|
vpath platform_timer.cc $(REP_DIR)/src/drivers/timer/fiasco
|
6
os/lib/mk/foc/timer.mk
Normal file
6
os/lib/mk/foc/timer.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/include_periodic
|
||||||
|
|
||||||
|
SRC_CC += platform_timer.cc
|
||||||
|
vpath platform_timer.cc $(REP_DIR)/src/drivers/timer/fiasco
|
3
os/lib/mk/hw_panda/timer.mk
Normal file
3
os/lib/mk/hw_panda/timer.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/hw $(REP_DIR)/src/drivers/timer/hw/omap4
|
||||||
|
|
||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
3
os/lib/mk/hw_pbxa9/timer.mk
Normal file
3
os/lib/mk/hw_pbxa9/timer.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/hw $(REP_DIR)/src/drivers/timer/hw/pbxa9
|
||||||
|
|
||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
3
os/lib/mk/hw_vea9x4/timer.mk
Normal file
3
os/lib/mk/hw_vea9x4/timer.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/hw $(REP_DIR)/src/drivers/timer/hw/pbxa9
|
||||||
|
|
||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
8
os/lib/mk/linux/timer.mk
Normal file
8
os/lib/mk/linux/timer.mk
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/include_periodic
|
||||||
|
|
||||||
|
LIBS += syscall
|
||||||
|
|
||||||
|
SRC_CC += platform_timer.cc
|
||||||
|
vpath platform_timer.cc $(REP_DIR)/src/drivers/timer/linux
|
3
os/lib/mk/nova/timer.mk
Normal file
3
os/lib/mk/nova/timer.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/include_pit
|
3
os/lib/mk/okl4_x86/timer.mk
Normal file
3
os/lib/mk/okl4_x86/timer.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/include_pit
|
6
os/lib/mk/pistachio/timer.mk
Normal file
6
os/lib/mk/pistachio/timer.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
include $(REP_DIR)/lib/mk/timer.inc
|
||||||
|
|
||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/include_periodic
|
||||||
|
|
||||||
|
SRC_CC += platform_timer.cc
|
||||||
|
vpath platform_timer.cc $(REP_DIR)/src/drivers/timer/pistachio
|
5
os/lib/mk/timer.inc
Normal file
5
os/lib/mk/timer.inc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
SRC_CC += main.cc
|
||||||
|
LIBS += cxx server env alarm signal
|
||||||
|
INC_DIR += $(REP_DIR)/src/drivers/timer/include
|
||||||
|
|
||||||
|
vpath main.cc $(REP_DIR)/src/drivers/timer
|
@ -1,14 +0,0 @@
|
|||||||
TARGET = timer
|
|
||||||
SRC_CC = main.cc platform_timer.cc
|
|
||||||
REQUIRES = codezero
|
|
||||||
LIBS = cxx server env alarm signal
|
|
||||||
|
|
||||||
INC_DIR += $(PRG_DIR)/../include $(PRG_DIR)/../include_periodic
|
|
||||||
|
|
||||||
#
|
|
||||||
# Supply dummy includes to prevent warning about missing string.h and stdio.h,
|
|
||||||
# which are included by Codezero's headers.
|
|
||||||
#
|
|
||||||
REP_INC_DIR += include/codezero/dummies
|
|
||||||
|
|
||||||
vpath main.cc $(PRG_DIR)/..
|
|
3
os/src/drivers/timer/empty.cc
Normal file
3
os/src/drivers/timer/empty.cc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/*
|
||||||
|
* Dummy compilation unit needed to link a valid target.
|
||||||
|
*/
|
@ -1,8 +0,0 @@
|
|||||||
TARGET = timer
|
|
||||||
SRC_CC = main.cc platform_timer.cc
|
|
||||||
REQUIRES = fiasco
|
|
||||||
LIBS = cxx server env alarm signal
|
|
||||||
|
|
||||||
INC_DIR = $(PRG_DIR)/../include $(PRG_DIR)/../include_periodic
|
|
||||||
|
|
||||||
vpath main.cc $(PRG_DIR)/..
|
|
@ -1,9 +0,0 @@
|
|||||||
TARGET = timer
|
|
||||||
SRC_CC = main.cc platform_timer.cc
|
|
||||||
REQUIRES = foc
|
|
||||||
LIBS = cxx server env alarm signal
|
|
||||||
|
|
||||||
INC_DIR = $(PRG_DIR)/../include $(PRG_DIR)/../include_periodic
|
|
||||||
|
|
||||||
vpath main.cc $(PRG_DIR)/..
|
|
||||||
vpath platform_timer.cc $(REP_DIR)/src/drivers/timer/fiasco
|
|
@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# \brief Timer session server
|
|
||||||
# \author Stefan Kalkowski
|
|
||||||
# \date 2012-10-25
|
|
||||||
#
|
|
||||||
|
|
||||||
# set program name
|
|
||||||
TARGET = timer
|
|
||||||
|
|
||||||
# add C++ sources
|
|
||||||
SRC_CC += main.cc
|
|
||||||
|
|
||||||
# skip build if required specs not fullfilled
|
|
||||||
REQUIRES += hw epit
|
|
||||||
|
|
||||||
# add libraries
|
|
||||||
LIBS += cxx server env alarm
|
|
||||||
|
|
||||||
# add include paths
|
|
||||||
INC_DIR += $(PRG_DIR) $(PRG_DIR)/../ $(PRG_DIR)/../../nova/
|
|
||||||
|
|
||||||
# declare source paths
|
|
||||||
vpath main.cc $(PRG_DIR)/../..
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
#
|
|
||||||
# \brief Timer session server
|
|
||||||
# \author Martin Stein
|
|
||||||
# \date 2012-05-03
|
|
||||||
#
|
|
||||||
|
|
||||||
# Set program name
|
|
||||||
TARGET = timer
|
|
||||||
|
|
||||||
# Add C++ sources
|
|
||||||
SRC_CC += main.cc
|
|
||||||
|
|
||||||
# Skip build if required specs not fullfilled
|
|
||||||
REQUIRES += hw omap4
|
|
||||||
|
|
||||||
# Add libraries
|
|
||||||
LIBS += cxx server env alarm
|
|
||||||
|
|
||||||
# Add include paths
|
|
||||||
INC_DIR += $(PRG_DIR) $(PRG_DIR)/../ $(PRG_DIR)/../../nova/
|
|
||||||
|
|
||||||
# Declare source paths
|
|
||||||
vpath main.cc $(PRG_DIR)/../..
|
|
@ -1,23 +0,0 @@
|
|||||||
#
|
|
||||||
# \brief Timer session server specific for base-hw and PBXA9
|
|
||||||
# \author Martin Stein
|
|
||||||
# \date 2012-05-03
|
|
||||||
#
|
|
||||||
|
|
||||||
# Set program name
|
|
||||||
TARGET = timer
|
|
||||||
|
|
||||||
# Add C++ sources
|
|
||||||
SRC_CC += main.cc
|
|
||||||
|
|
||||||
# Skip build if required specs not fullfilled
|
|
||||||
REQUIRES += hw_pbxa9
|
|
||||||
|
|
||||||
# Add libraries
|
|
||||||
LIBS += cxx server env alarm signal
|
|
||||||
|
|
||||||
# Add include paths
|
|
||||||
INC_DIR += $(PRG_DIR) $(PRG_DIR)/../ $(PRG_DIR)/../../include
|
|
||||||
|
|
||||||
# Declare source paths
|
|
||||||
vpath main.cc $(PRG_DIR)/../..
|
|
@ -1,24 +0,0 @@
|
|||||||
#
|
|
||||||
# \brief Timer session server specific for base-hw and VEA9X4
|
|
||||||
# \author Martin Stein
|
|
||||||
# \date 2012-05-03
|
|
||||||
#
|
|
||||||
|
|
||||||
# Set program name
|
|
||||||
TARGET = timer
|
|
||||||
|
|
||||||
# Add C++ sources
|
|
||||||
SRC_CC += main.cc
|
|
||||||
|
|
||||||
# Skip build if required specs not fullfilled
|
|
||||||
REQUIRES += hw_vea9x4
|
|
||||||
|
|
||||||
# Add libraries
|
|
||||||
LIBS += cxx server env alarm signal
|
|
||||||
|
|
||||||
# Add include paths
|
|
||||||
INC_DIR += $(PRG_DIR)/../ $(PRG_DIR)/../pbxa9 $(PRG_DIR)/../../include
|
|
||||||
|
|
||||||
# Declare source paths
|
|
||||||
vpath main.cc $(PRG_DIR)/../..
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
TARGET = timer
|
|
||||||
SRC_CC = main.cc platform_timer.cc
|
|
||||||
REQUIRES = linux
|
|
||||||
LIBS = cxx server env alarm syscall signal
|
|
||||||
INC_DIR += $(PRG_DIR)/../include $(PRG_DIR)/../include_periodic
|
|
||||||
|
|
||||||
vpath main.cc $(PRG_DIR)/..
|
|
@ -1,8 +0,0 @@
|
|||||||
TARGET = timer
|
|
||||||
SRC_CC = main.cc
|
|
||||||
REQUIRES = nova x86
|
|
||||||
LIBS = cxx server env alarm signal
|
|
||||||
|
|
||||||
INC_DIR = $(PRG_DIR)/../include $(PRG_DIR)/../include_pit
|
|
||||||
|
|
||||||
vpath main.cc $(PRG_DIR)/..
|
|
@ -1,8 +0,0 @@
|
|||||||
TARGET = timer
|
|
||||||
SRC_CC = main.cc
|
|
||||||
REQUIRES = okl4 x86
|
|
||||||
LIBS = cxx server env alarm signal
|
|
||||||
|
|
||||||
INC_DIR = $(PRG_DIR)/../include $(PRG_DIR)/../include_pit
|
|
||||||
|
|
||||||
vpath main.cc $(PRG_DIR)/..
|
|
@ -1,8 +0,0 @@
|
|||||||
TARGET = timer
|
|
||||||
SRC_CC = main.cc platform_timer.cc
|
|
||||||
REQUIRES = pistachio
|
|
||||||
LIBS = cxx server env alarm signal
|
|
||||||
|
|
||||||
INC_DIR = $(PRG_DIR)/../include $(PRG_DIR)/../include_periodic
|
|
||||||
|
|
||||||
vpath main.cc $(PRG_DIR)/..
|
|
3
os/src/drivers/timer/target.mk
Normal file
3
os/src/drivers/timer/target.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
TARGET = timer
|
||||||
|
LIBS = timer
|
||||||
|
SRC_CC = empty.cc
|
Loading…
Reference in New Issue
Block a user