sdk: moved compiled binaries for Windows x86 host into `windows-x86` directory

This commit is contained in:
Ivan Tatarinov 2021-05-25 19:46:26 +03:00
parent 0f455c7bf9
commit dd2942eb9b
36 changed files with 77 additions and 66 deletions

2
sdk/.gitignore vendored
View File

@ -2,4 +2,6 @@
#
# SPDX-License-Identifier: CC0-1.0
bin/*
lib/*
conf.mk

View File

@ -33,23 +33,21 @@
include common.mk
prefix ?= .
prefix ?= $(shell realpath --relative-base=. $(USE_PREFIX))
ifeq ($(BUILD),mingw32)
FORCEBUILD:=1
FORCEBUILD = 1
else ifeq ($(BUILD),mingw64)
FORCEBUILD:=1
FORCEBUILD = 1
else
BUILD:=
FORCEBUILD:=0
BUILD =
FORCEBUILD = 0
endif
ifdef $(FORCECLEAN)
ifneq ($(FORCECLEAN),1)
FORCECLEAN:=0
else
FORCECLEAN:=0
endif
ifneq ($(FORCECLEAN),1)
FORCECLEAN = 0
endif
endif
export BUILD

View File

@ -24,6 +24,7 @@ Directory | Description
`include` | Header files (`.def`, `.h` etc.) to be included in other sources (assembler, C, etc.).
`lib` | Libraries, needed for executables (mostly in `bin` directory) to function properly.
`src` | The source code of local and downloadable tools. See Makefiles for details.
`windows-x86` | Compiled binaries of tools and libraries for Windows x86 (32 bit) platform.
## 1.1. Copyright and licensing information for files
@ -95,12 +96,13 @@ Value of `TARGET` | Origin | Description
`zx7b` | `src/zx7b` | zx7b
`tools` | `src/tools` | tools
Value of `BUILD` | Target system
Value of `BUILD` | Target directory | Target system
----|----
`mingw32` | Windows with i686 architecture (32-bits)
`mingw64` | Windows with AMD64 architecture (64-bits)
`mingw32` | `windows-x86` | Windows with i686 architecture (32-bits)
`mingw64` | `windows-x86_64` | Windows with AMD64 architecture (64-bits)
Compiled binaries are installed into `bin` sub-directory.
Compiled binaries are installed into `bin` sub-directory of target directory.
Compiled libraries are installed into `lib` sub-directory of target directory.
Example:
@ -111,7 +113,7 @@ make BUILD=mingw64 tools
Then you may use `strip` tool to strip debug information from file and thus shrink file's size. Example:
```bash
strip bin/*.exe
strip windows-x86/bin/*.exe
```
For more options see [`Makefile`](Makefile).
@ -225,7 +227,7 @@ Value of `TARGET` | Sources origin | Binaries origin (**Quick setup**) | Build f
Then you may use `strip` tool to strip debug information from file and thus shrink file's size. Example:
```bash
strip bin/*.exe
strip windows-x86/bin/*.exe
```
For more options see [`Makefile`](Makefile).

17
sdk/bin/.gitignore vendored
View File

@ -1,17 +0,0 @@
# SPDX-FileCopyrightText: 2021 Ivan Tatarinov <ivan-tat@ya.ru>
#
# SPDX-License-Identifier: CC0-1.0
sjasmplus
sjasmplus.exe
zx7b
bin2hex
fcut
fpad
fpoke
rcs
Png2Rcs
GenTape
GenRom
AddItem
Bit2Bin

View File

@ -11,21 +11,38 @@
ifndef ZXSDK
ZXSDK := $(patsubst %/,%,$(abspath $(dir $(lastword $(MAKEFILE_LIST)))))
Z88DK := $(ZXSDK)/src/z88dk
ZCCCFG := $(Z88DK)/lib/config
PATH := $(ZXSDK)/bin:$(Z88DK)/bin:$(PATH)
ifeq ($(OS),Windows_NT)
PATH := $(ZXSDK)/lib:$(PATH)
ifeq ($(PROCESSOR_ARCHITECTURE),X86)
ZXSDK_PLATFORM= $(ZXSDK)/windows-x86
else ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
ZXSDK_PLATFORM= $(ZXSDK)/windows-x86
else ifeq ($(PROCESSOR_ARCHITECTURE),EM64T)
ZXSDK_PLATFORM= $(ZXSDK)/windows-x86
else
$(warning Unsupported platform: "$(PROCESSOR_ARCHITECTURE)")
ZXSDK_PLATFORM= $(ZXSDK)/windows-x86
endif
else
ZXSDK_PLATFORM = $(ZXSDK)
endif
Z88DK := $(ZXSDK)/src/z88dk
ZCCCFG := $(Z88DK)/lib/config
PATH := $(ZXSDK_PLATFORM)/bin:$(Z88DK)/bin:$(PATH)
ifeq ($(OS),Windows_NT)
PATH := $(ZXSDK_PLATFORM)/lib:$(PATH)
# Fix paths under Cygwin for z88dk on Windows
ifeq ($(shell echo $$OSTYPE),cygwin)
ZCCCFG := $(shell cygpath -m $(ZCCCFG))
endif
else # $(OS)!=Windows_NT
export LD_LIBRARY_PATH:=$(ZXSDK)/lib
export LD_LIBRARY_PATH:=$(ZXSDK_PLATFORM)/lib
endif # $(OS)!=Windows_NT
export ZXSDK
export ZXSDK_PLATFORM
export ZCCCFG
export PATH
@ -33,9 +50,6 @@ endif # !ZXSDK
-include $(ZXSDK)/conf.mk
# Default values
USE_SJASMPLUS_VERSION ?= z00m128
ifeq ($(OS),Windows_NT)
EXESUFFIX := .exe
DLLSUFFIX := .dll
@ -48,8 +62,14 @@ ifeq ($(BUILD),mingw32)
CC := i686-w64-mingw32-gcc
EXESUFFIX := .exe
DLLSUFFIX := .dll
USE_PREFIX ?= $(ZXSDK)/windows-x86
else ifeq ($(BUILD),mingw64)
CC := x86_64-w64-mingw32-gcc
EXESUFFIX := .exe
DLLSUFFIX := .dll
USE_PREFIX ?= $(ZXSDK)/windows-x86_64
endif
# Default values
USE_PREFIX ?= $(ZXSDK_PLATFORM)
USE_SJASMPLUS_VERSION ?= z00m128

5
sdk/lib/.gitignore vendored
View File

@ -1,5 +0,0 @@
# SPDX-FileCopyrightText: 2021 Ivan Tatarinov <ivan-tat@ya.ru>
#
# SPDX-License-Identifier: CC0-1.0
liblodepng.so

View File

@ -6,6 +6,7 @@ rem SPDX-License-Identifier: GPL-3.0-or-later
if not x%ZXSDK% == x exit /b
set ZXSDK=%~dp0
set ZXSDK=%ZXSDK:~0,-1%
set ZXSDK_PLATFORM=%ZXSDK%\windows-x86
set Z88DK=%ZXSDK%\src\z88dk
set ZCCCFG=%Z88DK%\lib\config
set PATH=%ZXSDK%\bin;%Z88DK%\bin;%ZXSDK%\lib;%PATH%
set PATH=%ZXSDK_PLATFORM%\bin;%Z88DK%\bin;%ZXSDK_PLATFORM%\lib;%PATH%

View File

@ -5,18 +5,24 @@
if [[ "x$ZXSDK" == x ]]; then
ZXSDK=$(dirname $(realpath "$BASH_SOURCE"))
if [[ x$OS == xWindows_NT ]]; then
ZXSDK_PLATFORM=$ZXSDK/windows-x86
else
ZXSDK_PLATFORM=$ZXSDK
fi
Z88DK=$ZXSDK/src/z88dk
ZCCCFG=$Z88DK/lib/config
PATH=$ZXSDK/bin:$Z88DK/bin:$PATH
PATH=$ZXSDK_PLATFORM/bin:$Z88DK/bin:$PATH
if [[ x$OS == xWindows_NT ]]; then
PATH=$ZXSDK/lib:$PATH
PATH=$ZXSDK_PLATFORM/lib:$PATH
# Fix paths under Cygwin for z88dk on Windows
if [[ x$OSTYPE == xcygwin ]]; then
ZCCCFG=`cygpath -m $ZCCCFG`
fi
else
export LD_LIBRARY_PATH=$ZXSDK/lib
export LD_LIBRARY_PATH=$ZXSDK_PLATFORM/lib
fi
export ZXSDK
export ZXSDK_PLATFORM
export ZCCCFG
fi

View File

@ -29,7 +29,7 @@
include ../common.mk
prefix ?= ..
prefix ?= $(shell realpath --relative-base=. $(USE_PREFIX))
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin
@ -51,24 +51,27 @@ uninstall: $(foreach t,$(TARGETS),uninstall-$(t))
clean: $(foreach t,$(TARGETS),clean-$(t))
distclean: $(foreach t,$(TARGETS),distclean-$(t))
_DoBuild:=1
_UsePrecompiledOnWindows:=0
_DoClean:=1
_DoBuild = 1
_UsePrecompiledOnWindows = 0
_DoClean = 1
ifeq ($(OS),Windows_NT)
ifneq ($(FORCEBUILD),1)
_DoBuild:=0
_UsePrecompiledOnWindows:=1
endif
ifneq ($(FORCECLEAN),1)
_DoClean:=0
endif
ifneq ($(FORCEBUILD),1)
_DoBuild = 0
_UsePrecompiledOnWindows = 1
endif
ifneq ($(FORCECLEAN),1)
_DoClean = 0
endif
endif # $(OS)==Windows_NT
# sjasmplus
.PHONY: $(foreach a,build install uninstall clean distclean,$(a)-sjasmplus)
$(DESTDIR)$(bindir):
mkdir -p $@
ifeq ($(USE_SJASMPLUS_VERSION),sjasmplus)
ifeq ($(_DoBuild),1)
@ -140,7 +143,7 @@ sjasmplus-win64.7z:
install-sjasmplus: $(DESTDIR)$(bindir)/sjasmplus$(EXESUFFIX)
$(DESTDIR)$(bindir)/sjasmplus$(EXESUFFIX): sjasmplus/sjasmplus$(EXESUFFIX)
$(DESTDIR)$(bindir)/sjasmplus$(EXESUFFIX): sjasmplus/sjasmplus$(EXESUFFIX) | $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) $< $@
ifeq ($(_DoClean),1)
@ -239,7 +242,7 @@ sjasmplus-z00m128-win32.zip:
install-sjasmplus: $(DESTDIR)$(bindir)/sjasmplus$(EXESUFFIX)
$(DESTDIR)$(bindir)/sjasmplus$(EXESUFFIX): sjasmplus-z00m128/sjasmplus$(EXESUFFIX)
$(DESTDIR)$(bindir)/sjasmplus$(EXESUFFIX): sjasmplus-z00m128/sjasmplus$(EXESUFFIX) | $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) $< $@
ifeq ($(_DoClean),1)

View File

@ -26,6 +26,7 @@ bindir ?= $(exec_prefix)/bin
INSTALL ?= install
INSTALL_PROGRAM ?= $(INSTALL)
RM ?= rm -f
BINS = sjasmplus$(EXESUFFIX)
@ -36,7 +37,7 @@ build\
$(DESTDIR)$(bindir):
mkdir -p $@
sjasmplus$(EXESUFFIX): | Makefile
$(srcdir)/sjasmplus$(EXESUFFIX): | Makefile
$(MAKE) clean
$(MAKE)
@ -48,7 +49,7 @@ $(DESTDIR)$(bindir)/sjasmplus$(EXESUFFIX): sjasmplus$(EXESUFFIX) | $(DESTDIR)$(b
.PHONY: uninstall
uninstall:
rm -f $(foreach t,$(BINS),$(DESTDIR)$(bindir)/$(t))
$(RM) $(foreach t,$(BINS),$(DESTDIR)$(bindir)/$(t))
.PHONY: clean
clean:

View File

@ -6,6 +6,6 @@ SPDX-FileChecksum: SHA1: 1c1d766371864e10bfb5c95fa57d7598e8a6bf89
SPDX-FileCopyrightText: Copyright (c) 2015 Einar Saukas. All rights reserved.
SPDX-License-Identifier: BSD-3-clause
SPDX-License-Identifier: BSD-3-Clause
SPDX-FileComment: dzx7b version 1.0 (2015) - LZ77/LZSS backwards decompressor.