summaryrefslogtreecommitdiffhomepage
path: root/example/mb1/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'example/mb1/makefile')
-rw-r--r--example/mb1/makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/example/mb1/makefile b/example/mb1/makefile
new file mode 100644
index 0000000..1a4e79b
--- /dev/null
+++ b/example/mb1/makefile
@@ -0,0 +1,16 @@
+# MIT License, Copyright (c) 2021 Marvin Borner
+# Gets called by main makefile (their variables are exported)
+
+OBJS = entry_asm.o main.o
+
+all: compile
+
+%.o: %.c
+ @$(CC) -c $(CFLAGS) $< -o $@
+
+%_asm.o: %.asm
+ @$(AS) $(ASFLAGS) $< -o $@
+
+compile: $(OBJS)
+ @mkdir -p $(BLD)/examples/
+ @$(LD) -N -z max-page-size=0x1000 -eboot_entry -Tlink.ld -o $(BLD)/examples/mb1.elf $+