# Tup rules that are local to this Git repo and # should not be shared with other projects. &LD_SCRIPT_SO = base/src/ld/genode_rel.ld ifeq (@(TUP_ARCH),x86_64) ASM_SYM_DEPENDENCY = movq \1@GOTPCREL(%rip), %rax else ASM_SYM_DEPENDENCY = .long \1 endif !abi_stub = |> ^ STUB %o^\ sed \ -e "s/^\(\w\+\) D \(\w\+\)\$/.data; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ -e "s/^\(\w\+\) V/.data; .weak \1; .type \1,%%object; \1:/" \ -e "s/^\(\w\+\) T/.text; .global \1; .type \1,%%function; \1:/" \ -e "s/^\(\w\+\) R \(\w\+\)\$/.section .rodata; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ -e "s/^\(\w\+\) W/.text; .weak \1; .type \1,%%function; \1:/" \ -e "s/^\(\w\+\) B \(\w\+\)\$/.bss; .global \1; .type \1,%%object; .size \1,\2; \1:/" \ -e "s/^\(\w\+\) U/.text; .global \1; $(ASM_SYM_DEPENDENCY)/" \ %f \ | $(CC) -x assembler -c - -o tmp.o; \ $(LD) -o %o \ -shared \ -T &(LD_SCRIPT_SO) \ tmp.o; \ rm tmp.o; \ |> $(DEV_LIB_DIR)/%B.lib.so $(DEV_DIR)/ BASE_DIR = $(GENODE_DIR)/repos/base &BASE_DIR = base ifndef NIX_OUTPUTS_DEV ifeq (@(TUP_ARCH),i386) CPPFLAGS += -I$(BASE_DIR)/include/spec/x86_32 CPPFLAGS += -I$(BASE_DIR)/include/spec/x86 CPPFLAGS += -I$(BASE_DIR)/include/spec/32bit endif ifeq (@(TUP_ARCH),x86_64) CPPFLAGS += -I$(BASE_DIR)/include/spec/x86_64 CPPFLAGS += -I$(BASE_DIR)/include/spec/x86 CPPFLAGS += -I$(BASE_DIR)/include/spec/64bit endif ifeq (@(TUP_ARCH),arm64) CPPFLAGS += -I$(BASE_DIR)/include/spec/arm_64 CPPFLAGS += -I$(BASE_DIR)/include/spec/64bit endif CPPFLAGS += -I$(BASE_DIR)/include endif