Tup: strip down configuration options

Autodetect x86, remove conditional NOVA builds.
This commit is contained in:
Ehmry - 2019-09-22 13:03:58 +02:00
parent 228bb4f189
commit 65d7eff10f
6 changed files with 11 additions and 16 deletions

View File

@ -5,12 +5,14 @@ OUTPUTS_DEV=$(TUP_CWD)/dev
DEV_DIR = $(TUP_CWD)/dev
ifeq (@(TUP_ARCH),i386)
X86 = y
CC_MARCH = -march=i686 -m32
LD_MARCH = -melf_i386
AS_MARCH = -march=i686 --32
endif
ifeq (@(TUP_ARCH),x86_64)
X86 = y
TOOL_CHAIN_PREFIX=genode-x86-
CC_MARCH = -m64 -mcmodel=large
LD_MARCH = -melf_x86_64
@ -92,7 +94,12 @@ PKG_CONFIG_DIR = $(OUTPUTS_DEV)/lib/pkgconfig
PKG_CONFIG = PKG_CONFIG_PATH=$(PKG_CONFIG_DIR):$PKG_CONFIG_PATH pkg-config
DEFINES += -g
ifdef OLEVEL
OLEVEL = @(OLEVEL)
else
OLEVEL = -O0
endif
!ir = | $(GENODE_DIR)/<pkg-config> |> clang $(OLEVEL) $(DEFINES) $(CXXFLAGS) $(CXXFLAGS_%e) $(CXXFLAGS_%f) `$(PKG_CONFIG) --cflags $(LIBS)` $(INCLUDES) -S -emit-llvm %f |> %B.ll

View File

@ -1,5 +1,3 @@
ifeq (@(BUILD_NOVA),y)
include_rules
GEN_CORE_DIR = $(BASE_DIR)/src/core
@ -55,5 +53,3 @@ CXXFLAGS_$(GEN_CORE_DIR)/version.cc += -DGENODE_VERSION=\"`git describe`\"
|> $(LD) $(LD_MARCH) -u _start --whole-archive -r \
%<base-common> %<base-libs> %f -o %o \
|> core-nova.o $(REP_DIR)/<core>
endif

View File

@ -1,5 +1,3 @@
ifeq (@(BUILD_NOVA),y)
include_rules
INCLUDES += -I$(BASE_DIR)/src/include
@ -42,5 +40,3 @@ SRC_CC += \
: foreach $(SRC_CC) |> !cxx |> {base-obj}
: {base-obj} |> !ar |> base-nova.lib.a
endif

View File

@ -1,5 +1,3 @@
ifeq (@(BUILD_NOVA),y)
TARGET_NAME = base-nova
include_rules
INCLUDES += -I$(BASE_DIR)/src/include
@ -59,5 +57,3 @@ LDFLAGS += `pkg-config --static --libs $(BASE_PKGS)`
: {bin} |> !collect_bin |>
include &(BIN_RULES)
endif

View File

@ -1,7 +1,7 @@
ifdef x86
TARGET_NAME = ahci_drv
include_rules
ifneq ($(X86),)
: foreach $(SRC_CC) *.cc |> !cxx |> %B.o {obj}
: {obj} | |> !prg |> $(TARGET_NAME) {bin}
: {bin} |> !collect_bin |>

View File

@ -1,7 +1,7 @@
ifdef x86
TARGET_NAME = ps2_drv
include_rules
ifneq ($(X86),)
: foreach $(SRC_CC) *.cc |> !cxx |> %B.o {obj}
: {obj} | |> !prg |> $(TARGET_NAME) {bin}
: {bin} |> !collect_bin |>