mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
wireguard: generic target.mk
Introduce an arch-specific wireguard lib that contains all code from the former arch-specific target.mk files. This allows us to create a generic target.mk that merely depends on the library and a dummy.cc file. The latter ensures that building/linking of the target isn't skipped by the build system. Ref #4519
This commit is contained in:
parent
83408ef35c
commit
520742cf3e
3
repos/dde_linux/lib/mk/spec/arm_64/wireguard.mk
Normal file
3
repos/dde_linux/lib/mk/spec/arm_64/wireguard.mk
Normal file
@ -0,0 +1,3 @@
|
||||
INC_DIR += $(REP_DIR)/src/include/spec/arm_64
|
||||
|
||||
include $(REP_DIR)/lib/mk/wireguard.inc
|
3
repos/dde_linux/lib/mk/spec/x86_64/wireguard.mk
Normal file
3
repos/dde_linux/lib/mk/spec/x86_64/wireguard.mk
Normal file
@ -0,0 +1,3 @@
|
||||
INC_DIR += $(REP_DIR)/src/include/spec/x86_64
|
||||
|
||||
include $(REP_DIR)/lib/mk/wireguard.inc
|
22
repos/dde_linux/lib/mk/wireguard.inc
Normal file
22
repos/dde_linux/lib/mk/wireguard.inc
Normal file
@ -0,0 +1,22 @@
|
||||
LIBS += base net jitterentropy wireguard_lx_inc_dirs
|
||||
|
||||
INC_DIR += $(REP_DIR)/src/app/wireguard
|
||||
INC_DIR += $(REP_DIR)/src/include
|
||||
|
||||
SRC_CC += arp_cache.cc
|
||||
SRC_CC += arp_waiter.cc
|
||||
SRC_CC += base64.cc
|
||||
SRC_CC += config_model.cc
|
||||
SRC_CC += dhcp_client.cc
|
||||
SRC_CC += ipv4_address_prefix.cc
|
||||
SRC_CC += ipv4_config.cc
|
||||
SRC_CC += irq.cc
|
||||
SRC_CC += main.cc
|
||||
SRC_CC += nic_connection.cc
|
||||
SRC_CC += lx_emul/random.cc
|
||||
SRC_CC += uplink_connection.cc
|
||||
|
||||
vpath %.cc $(REP_DIR)/src/app/wireguard
|
||||
vpath %.cc $(REP_DIR)/src/lib
|
||||
|
||||
CC_CXX_WARN_STRICT_CONVERSION =
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# This library is for avoiding clashes between Linux and Genode includes.
|
||||
# If we were to compile all the *.c files of this library directly with the
|
||||
# WireGuard target there would be only one INC_DIR applied to *.cc files as
|
||||
# well as to *.c files. Some Genode headers, however (e.g. 'net/udp.h' or
|
||||
# WireGuard library, there would be only one INC_DIR applied to *.cc files as
|
||||
# well as to *.c files. Some Genode headers, however, (e.g. 'net/udp.h' or
|
||||
# 'net/dhcp.h') exist with the same include identifier in both Linux and
|
||||
# Genode, and we would have the problem that we want the Linux variant in *.c
|
||||
# files and the Genode variant in *.cc files. Therefore, we create two
|
||||
# dedicated INC_DIR settings (that of the library and that of the target).
|
||||
# dedicated INC_DIR settings through separate libraries.
|
||||
#
|
||||
|
||||
GEN_PRG_DIR := $(PRG_DIR)/../..
|
||||
|
0
repos/dde_linux/src/app/wireguard/dummy.cc
Normal file
0
repos/dde_linux/src/app/wireguard/dummy.cc
Normal file
@ -1,5 +0,0 @@
|
||||
REQUIRES = arm_64
|
||||
|
||||
INC_DIR += $(REP_DIR)/src/include/spec/arm_64
|
||||
|
||||
include $(PRG_DIR)/../../target.inc
|
@ -1,5 +0,0 @@
|
||||
REQUIRES = x86_64
|
||||
|
||||
INC_DIR += $(REP_DIR)/src/include/spec/x86_64
|
||||
|
||||
include $(PRG_DIR)/../../target.inc
|
@ -1,22 +0,0 @@
|
||||
TARGET = wireguard
|
||||
LIBS += base net jitterentropy wireguard_lx_inc_dirs
|
||||
GEN_DIR := $(PRG_DIR)/../..
|
||||
INC_DIR += $(GEN_DIR)
|
||||
INC_DIR += $(REP_DIR)/src/include
|
||||
SRC_CC += arp_cache.cc
|
||||
SRC_CC += arp_waiter.cc
|
||||
SRC_CC += base64.cc
|
||||
SRC_CC += config_model.cc
|
||||
SRC_CC += dhcp_client.cc
|
||||
SRC_CC += ipv4_address_prefix.cc
|
||||
SRC_CC += ipv4_config.cc
|
||||
SRC_CC += irq.cc
|
||||
SRC_CC += main.cc
|
||||
SRC_CC += nic_connection.cc
|
||||
SRC_CC += lx_emul/random.cc
|
||||
SRC_CC += uplink_connection.cc
|
||||
|
||||
vpath %.cc $(GEN_DIR)
|
||||
vpath %.cc $(REP_DIR)/src/lib
|
||||
|
||||
CC_CXX_WARN_STRICT_CONVERSION =
|
5
repos/dde_linux/src/app/wireguard/target.mk
Normal file
5
repos/dde_linux/src/app/wireguard/target.mk
Normal file
@ -0,0 +1,5 @@
|
||||
TARGET = wireguard
|
||||
|
||||
SRC_CC += dummy.cc
|
||||
|
||||
LIBS += wireguard
|
Loading…
x
Reference in New Issue
Block a user