1
1
Fork 0

Правила сборки для ЗОСРВ "Нейтрино" редакции 2020

This commit is contained in:
parent a1ff728eaf
commit 112cd4e56e
21 changed files with 148 additions and 0 deletions

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
LIST=OS
include recurse.mk

21
README.md Normal file
View File

@ -0,0 +1,21 @@
Сборка проекта в ЗОСРВ "Нейтрино" редакции 2021
===============================================
Для всех архитектур:
```
make -j16 install
```
Только для x86:
```
CPULIST=x86 make -j16 install
```
**Порт slang проверен на работоспособность условно и, вероятно, потребует дополнительной адаптации.**
Зависимости
===========
1. [PCRE - Perl Compatible Regular Expressions](../pcre)

99
common.mk Normal file
View File

@ -0,0 +1,99 @@
ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)
CONFIGUREFLAGS += --without-png
define TARGET_CONFIGURE
$(PRE_CONFIGURE)
@echo "$(BUILDNAME): configure start"
$(eval AC_VERSION=$(shell _pat='/[Gg]enerated.*[Aa]utoconf/s/.*\([1-9]\.[0-9][0-9]*\).*/\1/p'; \
[ "$${_guess}" ] || _guess=$$($(PROJECT_ROOT)/configure --version | sed -n -e "$${_pat}"); \
[ "$${_guess}" ] || _guess=$$(sed -n -e "1,10{; \
$${_pat}; \
}" <$(PROJECT_ROOT)/configure); echo $${_guess}))
$(call AutoconfVersion,$(AC_VERSION))
@echo "$(BUILDNAME): MACHINE=$(TARGET_COMPILER_MACHINE)"
@echo "$(BUILDNAME): VERSION=$(TARGET_COMPILER_VERSION)"
@echo "$(BUILDNAME): HOST_MACHINE=$(HOST_COMPILER_MACHINE)"
@echo "$(BUILDNAME): HOST_VERSION=$(HOST_COMPILER_VERSION)"
@echo "$(BUILDNAME): GCC_VERSION=$(firstword $(GCC_VERSION) undefined)"
@echo "$(BUILDNAME): BINUTILS_VERSION=$(firstword $(BINUTILS_VERSION) undefined)"
$(eval TARGET_ENDIAN_FLAGS=$(if $(filter mips,$(CPU)),$(if $(filter be,$(VARIANT_LIST)),-EB,$(if $(filter le,$(VARIANT_LIST)),-EL))))
$(if $(filter nto,$(OS)),\
$(eval CC="$(TARGET_COMPILER_MACHINE)-gcc$(if $(filter-out e2k,$(CPU)),$(if $(GCC_VERSION),-$(GCC_VERSION))) $(TARGET_ENDIAN_FLAGS) $(EXTRA_CC_$(OS))") \
$(eval CXX="$(TARGET_COMPILER_MACHINE)-g++$(if $(filter-out e2k,$(CPU)),$(if $(GCC_VERSION),-$(GCC_VERSION))) $(TARGET_ENDIAN_FLAGS) $(EXTRA_CXX_$(OS))") \
$(eval AS="$(TARGET_COMPILER_MACHINE)-as$(if $(filter-out e2k,$(CPU)),$(if $(BINUTILS_VERSION),-$(BINUTILS_VERSION))) $(TARGET_ENDIAN_FLAGS)") \
$(eval LD="$(TARGET_COMPILER_MACHINE)-ld$(if $(filter-out e2k,$(CPU)),$(if $(BINUTILS_VERSION),-$(BINUTILS_VERSION))) $(TARGET_ENDIAN_FLAGS)") \
,\
$(if $(filter linux64,$(OS)),\
$(eval CC="$(TARGET_COMPILER_MACHINE)-gcc$(if $(LINUXGCC_VERSION),-$(LINUXGCC_VERSION)) -march=x86-64 -mtune=generic") \
$(eval CXX="$(TARGET_COMPILER_MACHINE)-g++$(if $(LINUXGCC_VERSION),-$(LINUXGCC_VERSION)) -march=x86-64 -mtune=generic") \
,\
$(if $(filter linux,$(OS)),\
$(eval CC="$(TARGET_COMPILER_MACHINE)-gcc$(if $(LINUXGCC_VERSION),-$(LINUXGCC_VERSION)) -m32 -march=i686 -mtune=generic") \
$(eval CXX="$(TARGET_COMPILER_MACHINE)-g++$(if $(LINUXGCC_VERSION),-$(HOSTGCC_VERSION)) -m32 -march=i686 -mtune=generic") \
,\
$(if $(filter win64,$(OS)),\
$(eval CC="$(TARGET_COMPILER_MACHINE)-gcc$(if $(WINGCC_VERSION),-$(WINGCC_VERSION)) -march=x86-64 -mtune=generic") \
$(eval CXX="$(TARGET_COMPILER_MACHINE)-g++$(if $(WINGCC_VERSION),-$(WINGCC_VERSION)) -march=x86-64 -mtune=generic") \
,\
$(if $(filter win32,$(OS)),\
$(eval CC="$(TARGET_COMPILER_MACHINE)-gcc$(if $(WINGCC_VERSION),-$(WINGCC_VERSION)) -march=i686 -mtune=generic") \
$(eval CXX="$(TARGET_COMPILER_MACHINE)-g++$(if $(WINGCC_VERSION),-$(WINGCC_VERSION)) -march=i686 -mtune=generic") \
) \
) \
) \
) \
)
$(eval CFLAGS=$(if $(CFLAGS),$(CFLAGS) )$(CCFLAGS) $(FLAGS) $(CCVFLAGS) $(CCOPTS))
$(eval CPPFLAGS=$(if $(CPPFLAGS),$(CPPFLAGS) )$(filter-out $(if $(GDB_DEBUG),-g$(GDB_DEBUG)),$(CCFLAGS) $(FLAGS) $(CCVFLAGS) $(CCOPTS)))
$(eval CXXFLAGS=$(if $(CXXFLAGS),$(CXXFLAGS) )$(CCFLAGS) $(FLAGS) $(CCVFLAGS) $(CCOPTS))
$(eval LDFLAGS=$(if $(LDFLAGS),$(LDFLAGS) )$(lib_path) $(libopts) $(LDVFLAGS) $(LDOPTS))
$(if $(wildcard $(PROJECT_ROOT)/nto-config.site),$(eval CONFIG_SITE=$(PROJECT_ROOT)/nto-config.site))
$(eval CONFIGUREFLAGS += $(if $(filter-out undefined,$(flavor CONFIGURE_HOST)),$(if $(CONFIGURE_HOST),--host=$(CONFIGURE_HOST)),--host=$(TARGET_COMPILER_MACHINE)))
$(eval CONFIGUREFLAGS += $(if $(filter-out undefined,$(flavor CONFIGURE_BUILD)),$(if $(CONFIGURE_BUILD),--build=$(CONFIGURE_BUILD)),--build=$(HOST_COMPILER_MACHINE)))
$(if $(filter-out undefined,$(flavor CONFIGURE_TARGET)),$(eval CONFIGUREFLAGS += --target=$(CONFIGURE_TARGET)))
$(if $(filter Y,$(ac_params)), \
\
$(eval CONFIGUREFLAGS += CC=$(CC)) \
$(eval CONFIGUREFLAGS += CXX=$(CXX)) \
$(eval CONFIGUREFLAGS += AS=$(AS)) \
$(eval CONFIGUREFLAGS += LD=$(LD)) \
$(eval CONFIGUREFLAGS += CFLAGS="$(CFLAGS)") \
$(eval CONFIGUREFLAGS += CPPFLAGS="$(CPPFLAGS)") \
$(eval CONFIGUREFLAGS += CXXFLAGS="$(CXXFLAGS)") \
$(eval CONFIGUREFLAGS += LDFLAGS="$(LDFLAGS)") \
$(if $(CONFIG_SITE),$(eval CONFIGUREFLAGS += CONFIG_SITE=$(CONFIG_SITE))) \
$(eval CONFIGUREFLAGS += $(AC_AUTOTOOLS)),\
\
$(eval CONFIGUREVARS += CC=$(CC)) \
$(eval CONFIGUREVARS += CXX=$(CXX)) \
$(eval CONFIGUREVARS += AS=$(AS)) \
$(eval CONFIGUREVARS += LD=$(LD)) \
$(eval CONFIGUREVARS += CFLAGS="$(CFLAGS)") \
$(eval CONFIGUREVARS += CPPFLAGS="$(CPPFLAGS)") \
$(eval CONFIGUREVARS += CXXFLAGS="$(CXXFLAGS)") \
$(eval CONFIGUREVARS += LDFLAGS="$(LDFLAGS)") \
$(if $(CONFIG_SITE),$(eval CONFIGUREVARS += CONFIG_SITE=$(CONFIG_SITE))) \
$(eval CONFIGUREVARS += $(AC_AUTOTOOLS)) \
)
@echo "$(BUILDNAME): CONFIGUREFLAGS=$(CONFIGUREFLAGS)"
mkdir -p $(BUILDDIR)
cp -R $(PROJECT_ROOT)/autoconf $(PROJECT_ROOT)/demo $(PROJECT_ROOT)/doc $(PROJECT_ROOT)/examples $(PROJECT_ROOT)/mkfiles $(PROJECT_ROOT)/modules $(PROJECT_ROOT)/slsh $(PROJECT_ROOT)/src $(PROJECT_ROOT)/utf8 $(PROJECT_ROOT)/changes.txt $(PROJECT_ROOT)/configure $(PROJECT_ROOT)/slang.lis $(PROJECT_ROOT)/UPGRADE.txt $(BUILDDIR)/
cd $(BUILDDIR); $(CONFIGUREVARS) ./configure --prefix=$(INSTALL_PREFIX) $(CONFIGUREFLAGS)
$(POST_CONFIGURE)
endef
CFLAGS += -D_XOPEN_SOURCE=600
include $(MKFILES_ROOT)/autotools.mk
include $(MKFILES_ROOT)/qtargets.mk

2
nto/Makefile Normal file
View File

@ -0,0 +1,2 @@
LIST=CPU
include recurse.mk

2
nto/aarch64/Makefile Normal file
View File

@ -0,0 +1,2 @@
LIST=VARIANT
include recurse.mk

View File

@ -0,0 +1 @@
include ../../../common.mk

2
nto/arm/Makefile Normal file
View File

@ -0,0 +1,2 @@
LIST=VARIANT
include recurse.mk

1
nto/arm/o.le.v7/Makefile Normal file
View File

@ -0,0 +1 @@
include ../../../common.mk

1
nto/arm/o.le/Makefile Normal file
View File

@ -0,0 +1 @@
include ../../../common.mk

2
nto/e2k/Makefile Normal file
View File

@ -0,0 +1,2 @@
LIST=VARIANT
include recurse.mk

1
nto/e2k/o.le/Makefile Normal file
View File

@ -0,0 +1 @@
include ../../../common.mk

2
nto/mips/Makefile Normal file
View File

@ -0,0 +1,2 @@
LIST=VARIANT
include recurse.mk

1
nto/mips/o.be/Makefile Normal file
View File

@ -0,0 +1 @@
include ../../../common.mk

View File

@ -0,0 +1 @@
include ../../../common.mk

1
nto/mips/o.le/Makefile Normal file
View File

@ -0,0 +1 @@
include ../../../common.mk

2
nto/ppc/Makefile Normal file
View File

@ -0,0 +1,2 @@
LIST=VARIANT
include recurse.mk

View File

@ -0,0 +1 @@
include ../../../common.mk

1
nto/ppc/o.be/Makefile Normal file
View File

@ -0,0 +1 @@
include ../../../common.mk

2
nto/x86/Makefile Normal file
View File

@ -0,0 +1,2 @@
LIST=VARIANT
include recurse.mk

1
nto/x86/o/Makefile Normal file
View File

@ -0,0 +1 @@
include ../../../common.mk

View File

@ -852,6 +852,7 @@ static void goto_relative_rc (int r, int c)
/* the goto_rc function moves to row relative to scrolling region */
void SLtt_goto_rc(int r, int c)
{
#ifndef __KPDA__
char *s = NULL;
char buf[6];
@ -922,6 +923,7 @@ void SLtt_goto_rc(int r, int c)
}
if (s != NULL) tt_write_string(s);
else
#endif /* __KPDA__ */
{
tt_printf(Abs_Curs_Pos_Str, r, c);
}