You've already forked hackerlibultra
mirror of
https://github.com/HackerN64/hackerlibultra.git
synced 2026-01-21 10:37:53 -08:00
* set build options * remove COMPARE and MDOERN_* switches * remove tools makefile * AR patching is gone too since we want a fullly decomped version * AR is modern * remove cwd changes * edit my own tool to fix compile errors * compile files generated with my own tool instead of the originals * inline modern_gcc makefile * port mips toolchain detection logic * add util.mk for find-command * remove forced AR order and strip/mdebug removal commands * add -mabi=32 to as flags --------- Co-authored-by: someone2639 <someone2639@gmail.com>
17 lines
611 B
Makefile
17 lines
611 B
Makefile
# util.mk - Miscellaneous utility functions for use in Makefiles
|
|
|
|
# Throws an error if the value of the variable named by $(1) is not in the list given by $(2)
|
|
define validate-option
|
|
# value must be part of the list
|
|
ifeq ($$(filter $($(1)),$(2)),)
|
|
$$(error Value of $(1) must be one of the following: $(2))
|
|
endif
|
|
# value must be a single word (no whitespace)
|
|
ifneq ($$(words $($(1))),1)
|
|
$$(error Value of $(1) must be one of the following: $(2))
|
|
endif
|
|
endef
|
|
|
|
# Returns the path to the command $(1) if exists. Otherwise returns an empty string.
|
|
find-command = $(shell which $(1) 2>/dev/null)
|