Merge pull request #94 from ivan-tat/master

software: added `Makefile`
This commit is contained in:
Ivan Tatarinov 2021-06-04 14:58:17 +03:00 committed by GitHub
commit d1fda27aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 112 additions and 15 deletions

View File

@ -34,19 +34,15 @@ TARGETS=\
utils\
software
SOFTWARE_SUBDIRS=\
esprst\
iwconfig
.PHONY: all
all: $(foreach t,$(TARGETS),install-$(t))
all: install
@echo 'Done.'
# utils
.PHONY: build-utils
build-utils: | utils
$(MAKE) -w -C $| bindir=$(shell realpath --relative-to=$| $(bindir))
$(MAKE) -w -C $|
.PHONY: install-utils
install-utils: | utils
@ -68,23 +64,23 @@ distclean-utils: | utils
.PHONY: build-software
build-software: | software
$(MAKE) -w -C $| bindir=$(shell realpath --relative-to=$| $(bindir))
$(MAKE) -w -C $|
.PHONY: install-software
install-software: | software
for d in $(SOFTWARE_SUBDIRS); do d=$|/$$d; $(MAKE) -w -C $$d bindir=$$(realpath --relative-to=$$d $(bindir)) install; done
$(MAKE) -w -C $| bindir=$(shell realpath --relative-to=$| $(bindir)) install
.PHONY: uninstall-software
uninstall-software: | software
for d in $(SOFTWARE_SUBDIRS); do d=$|/$$d; $(MAKE) -w -C $$d bindir=$$(realpath --relative-to=$$d $(bindir)) uninstall; done
$(MAKE) -w -C $| bindir=$(shell realpath --relative-to=$| $(bindir)) uninstall
.PHONY: clean-software
clean-software: | software
for d in $(SOFTWARE_SUBDIRS); do d=$|/$$d; $(MAKE) -w -C $$d bindir=$$(realpath --relative-to=$$d $(bindir)) clean; done
$(MAKE) -w -C $| clean
.PHONY: distclean-software
distclean-software: | software
for d in $(SOFTWARE_SUBDIRS); do d=$|/$$d; $(MAKE) -w -C $$d bindir=$$(realpath --relative-to=$$d $(bindir)) distclean; done
$(MAKE) -w -C $| distclean
# all

View File

@ -1,4 +1,4 @@
; firmware.asm
; bootloader.asm
;
; Copyright (C) 2016-2021 Antonio Villena
; Contributors:

View File

@ -97,7 +97,7 @@ Value of `TARGET` | Origin | Description
`tools` | `src/tools` | tools
Value of `BUILD` | Target directory | Target system
----|----
----|----|----
`mingw32` | `windows-x86` | Windows with i686 architecture (32-bits)
`mingw64` | `windows-x86_64` | Windows with AMD64 architecture (64-bits)

5
sdk/windows-x86/bin/.gitignore vendored Normal file
View File

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

97
software/Makefile Normal file
View File

@ -0,0 +1,97 @@
# SPDX-FileCopyrightText: 2021 Ivan Tatarinov <ivan-tat@ya.ru>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Supported environments:
# * GNU on Linux, FreeBSD etc.
# * GNU on Windows NT (using MinGW/MSYS/Cygwin/WSL)
#
# Build the project:
# make [all]
# Compile only:
# make build | build-<TARGET>
# Install:
# make install | install-<TARGET>
# Uninstall:
# make uninstall | uninstall-<TARGET>
# Clean:
# make clean | clean-<TARGET>
# make distclean | distclean-<TARGET>
#
# where:
# <TARGET> is one of the values for `SUBDIRS' variable.
include ../sdk/common.mk
# Use uppercase for FAT filesystem
prefix ?= .
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/BIN
SUBDIRS=\
esprst\
iwconfig
.PHONY: all
all: build
@echo 'Done.'
.PHONY: $(foreach t,$(SUBDIRS),build-$(t))
define build_rule=
build-$1: | $1
$$(MAKE) -w -C $$|
endef
$(foreach d,$(SUBDIRS),$(eval $(call build_rule,$(d))))
.PHONY: $(foreach t,$(SUBDIRS),install-$(t))
define install_rule=
install-$1: | $1
$$(MAKE) -w -C $$| bindir=$$(shell realpath --relative-to=$$| $$(bindir)) install
endef
$(foreach d,$(SUBDIRS),$(eval $(call install_rule,$(d))))
.PHONY: $(foreach t,$(SUBDIRS),uninstall-$(t))
define uninstall_rule=
uninstall-$1: | $1
$$(MAKE) -w -C $$| bindir=$$(shell realpath --relative-to=$$| $$(bindir)) uninstall
endef
$(foreach d,$(SUBDIRS),$(eval $(call uninstall_rule,$(d))))
.PHONY: $(foreach t,$(SUBDIRS),clean-$(t))
define clean_rule=
clean-$1: | $1
$$(MAKE) -w -C $$| clean
endef
$(foreach d,$(SUBDIRS),$(eval $(call clean_rule,$(d))))
.PHONY: $(foreach t,$(SUBDIRS),distclean-$(t))
define distclean_rule=
distclean-$1: | $1
$$(MAKE) -w -C $$| distclean
endef
$(foreach d,$(SUBDIRS),$(eval $(call distclean_rule,$(d))))
.PHONY: build
build: $(foreach t,$(SUBDIRS),build-$(t))
.PHONY: install
install: $(foreach t,$(SUBDIRS),install-$(t))
.PHONY: uninstall
uninstall: $(foreach t,$(SUBDIRS),uninstall-$(t))
.PHONY: clean
clean: $(foreach t,$(SUBDIRS),clean-$(t))
.PHONY: distclean
distclean: $(foreach t,$(SUBDIRS),distclean-$(t))

View File

@ -414,8 +414,7 @@ CheckOptionTail
inc hl
cp " "
ret z
inc sp
inc sp
pop hl ; not used
jr ParseParam.BadOption
;------------------------------------------------------