mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[scripts] Define shortcut commands for test.elf and epsilon.elf
This commit is contained in:
committed by
LeaNumworks
parent
3cb4580769
commit
4aebba88dd
17
Makefile
17
Makefile
@@ -66,6 +66,7 @@ include scripts/scenario/Makefile
|
||||
include quiz/Makefile # Quiz needs to be included at the end
|
||||
|
||||
objs = $(call object_for,$(src))
|
||||
.SECONDARY: $(objs)
|
||||
|
||||
# Load source-based dependencies
|
||||
# Compilers can generate Makefiles that states the dependencies of a given
|
||||
@@ -73,9 +74,19 @@ objs = $(call object_for,$(src))
|
||||
# but allows correct yet optimal incremental builds.
|
||||
-include $(objs:.o=.d)
|
||||
|
||||
.SECONDARY: $(objs)
|
||||
$(BUILD_DIR)/epsilon.$(EXE): $(objs)
|
||||
$(BUILD_DIR)/test.$(EXE): $(objs)
|
||||
# Define rules for executables
|
||||
# Those can be built directly with make executable.exe as a shortcut. They also
|
||||
# depends on $(objs)
|
||||
|
||||
executables = epsilon test
|
||||
|
||||
define rules_for_executable
|
||||
$$(BUILD_DIR)/$(1).$$(EXE): $$(objs)
|
||||
.PHONY: $(1).$$(EXE)
|
||||
$(1).$$(EXE): $$(BUILD_DIR)/$(1).$$(EXE)
|
||||
endef
|
||||
|
||||
$(foreach executable,$(executables),$(eval $(call rules_for_executable,$(executable))))
|
||||
|
||||
# Define standard compilation rules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user