aboutsummaryrefslogtreecommitdiff
path: root/boot/devmode/Makefile
diff options
context:
space:
mode:
authorThomas Albers Raviola <thomas@thomaslabs.org>2025-02-13 01:48:01 +0100
committerThomas Albers Raviola <thomas@thomaslabs.org>2025-02-13 01:48:01 +0100
commit70af8cae86d75b4b02e9f7bd7d3614262bc5eb16 (patch)
tree831401e72b02956863e31e6663aa9ab3b9b66eac /boot/devmode/Makefile
parent13c0217bf19a2ddfb24b673455f6d362a46ebf7b (diff)
Linearize MakefilesHEADmaster
Diffstat (limited to 'boot/devmode/Makefile')
-rw-r--r--boot/devmode/Makefile22
1 files changed, 14 insertions, 8 deletions
diff --git a/boot/devmode/Makefile b/boot/devmode/Makefile
index 24c841a..ea9380d 100644
--- a/boot/devmode/Makefile
+++ b/boot/devmode/Makefile
@@ -1,12 +1,18 @@
-BUILD=$(PROJECT_ROOT)/build/boot/devmode
+BOOT_DEVMODE_BUILD = $(BOOT_BUILD)/devmode
-TARGET=$(BUILD)/devmode.hex
-IHX=$(BUILD)/devmode.ihx
+BOOT_DEVMODE_SRC =\
+ bootloader.c\
+ crc16.c
-ASM=$(wildcard *.asm)
-SRC=$(wildcard *.c)
+BOOT_DEVMODE_OBJ =\
+ $(patsubst %,$(BOOT_DEVMODE_BUILD)/%.rel,\
+ $(basename $(BOOT_DEVMODE_SRC)))
+DEPS +=\
+ $(patsubst %.rel,%.d,$(BOOT_DEVMODE_OBJ))
-all : $(TARGET)
+$(BOOT_DEVMODE_BUILD)/devmode.ihx : EXTRA_LDFLAGS=$(PAYLOAD_LDFLAGS)
+$(BOOT_DEVMODE_BUILD)/devmode.ihx : $(BOOT_CRT0) $(BOOT_DEVMODE_OBJ)
-include $(PROJECT_ROOT)/payload.mk
-include $(PROJECT_ROOT)/include.mk
+$(BOOT_DEVMODE_OBJ) : | $(BOOT_DEVMODE_BUILD)
+$(BOOT_DEVMODE_BUILD) :
+ @mkdir -p $@