[301] | 1 | # $Id: ALP.kmk 3575 2022-12-28 12:44:00Z bird $
|
---|
| 2 | ## @file
|
---|
| 3 | # kBuild Tool Config - ALP or later.
|
---|
| 4 | #
|
---|
[1547] | 5 |
|
---|
| 6 | #
|
---|
[3121] | 7 | # Copyright (c) 2005-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@anduin.net>
|
---|
[301] | 8 | #
|
---|
| 9 | # This file is part of kBuild.
|
---|
| 10 | #
|
---|
| 11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
| 12 | # it under the terms of the GNU General Public License as published by
|
---|
| 13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
| 14 | # (at your option) any later version.
|
---|
| 15 | #
|
---|
| 16 | # kBuild is distributed in the hope that it will be useful,
|
---|
| 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | # GNU General Public License for more details.
|
---|
| 20 | #
|
---|
| 21 | # You should have received a copy of the GNU General Public License
|
---|
| 22 | # along with kBuild; if not, write to the Free Software
|
---|
| 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 24 | #
|
---|
| 25 | #
|
---|
[1547] | 26 | # As a special exception you are granted permission to include this file, via
|
---|
[2243] | 27 | # the kmk include directive, as you wish without this in itself causing the
|
---|
| 28 | # resulting makefile, program or whatever to be covered by the GPL license.
|
---|
[1547] | 29 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
| 30 | # program, whatever should not be covered the GPL.
|
---|
| 31 | #
|
---|
| 32 | #
|
---|
[301] | 33 |
|
---|
[667] | 34 | TOOL_ALP := The IBM Assembly Language Processor
|
---|
[301] | 35 |
|
---|
[667] | 36 | # Tool Specific Properties
|
---|
| 37 | ifndef PATH_TOOL_ALP
|
---|
[2750] | 38 | PATH_TOOL_ALP := $(sort $(wildcard $(KBUILD_DEVTOOLS_HST)/alp/v*.*))
|
---|
[667] | 39 | ifneq ($(PATH_TOOL_ALP),)
|
---|
| 40 | PATH_TOOL_ALP := $(call lastword,$(PATH_TOOL_ALP))
|
---|
| 41 | endif
|
---|
| 42 | endif
|
---|
[301] | 43 | ifneq ($(PATH_TOOL_ALP),)
|
---|
[667] | 44 | TOOL_ALP_AS ?= $(PATH_TOOL_ALP)/alp$(HOSTSUFF_EXE)
|
---|
[301] | 45 | else
|
---|
[667] | 46 | TOOL_ALP_AS ?= alp$(HOSTSUFF_EXE)
|
---|
[301] | 47 | endif
|
---|
| 48 |
|
---|
[667] | 49 | # General Properties used by kBuild
|
---|
| 50 | TOOL_ALP_ASFLAGS ?= -Mb
|
---|
[301] | 51 |
|
---|
[667] | 52 |
|
---|
[301] | 53 | ## Compile Assembly source.
|
---|
| 54 | # @param $(target) Normalized main target name.
|
---|
| 55 | # @param $(source) Source filename (relative).
|
---|
| 56 | # @param $(obj) Object file name. This shall be (re)created by the compilation.
|
---|
| 57 | # @param $(dep) Dependcy file. This shall be (re)created by the compilation.
|
---|
| 58 | # @param $(flags) Flags.
|
---|
| 59 | # @param $(defs) Definitions. No -D or something.
|
---|
| 60 | # @param $(incs) Includes. No -I or something.
|
---|
| 61 | # @param $(dirdep) Directory creation dependency.
|
---|
| 62 | # @param $(deps) Other dependencies.
|
---|
| 63 | #
|
---|
| 64 | # @param $(outbase) Output basename (full). Use this for list files and such.
|
---|
| 65 | # @param $(objsuff) Object suffix.
|
---|
[380] | 66 | TOOL_ALP_COMPILE_AS_OUTPUT = $(outbase).lst
|
---|
[782] | 67 | TOOL_ALP_COMPILE_AS_DEPEND =
|
---|
| 68 | TOOL_ALP_COMPILE_AS_DEPORD =
|
---|
[380] | 69 | define TOOL_ALP_COMPILE_AS_CMDS
|
---|
[696] | 70 | $(QUIET)$(TOOL_ALP_AS)\
|
---|
[301] | 71 | $(flags) $(addsuffix /,$(addprefix -I:, $(incs))) $(addprefix -D:, $(defs))\
|
---|
[380] | 72 | $(source)\
|
---|
| 73 | -Fl:$(outbase).lst\
|
---|
| 74 | -Fd:$(dep)\
|
---|
[301] | 75 | -Fo:$(obj)
|
---|
[3575] | 76 | $(QUIET)$(SED_EXT) -i -e 's/\\/\//g' -e 's/\/$$(DOLLAR)/\\/' "$(dep)"
|
---|
[301] | 77 | endef
|
---|
| 78 |
|
---|