summaryrefslogtreecommitdiff
path: root/src/modules/manager/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/manager/Makefile')
-rw-r--r--src/modules/manager/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/modules/manager/Makefile b/src/modules/manager/Makefile
new file mode 100644
index 0000000..87a9590
--- /dev/null
+++ b/src/modules/manager/Makefile
@@ -0,0 +1,33 @@
+.PHONY: clean, mrproper
+
+CC = gcc
+CFLAGS = -nostdlib -nostartfiles -nodefaultlibs -fno-builtin -fno-stack-protector -Wall -Wextra -I ../../include
+
+LD = ld
+LDFLAGS = -T ../../library/link.ld -L ../../library -Map manager.map
+
+Objects = main.o
+Outfile = manager.elf
+
+all: $(Outfile)
+ echo "* Done with $(Outfile)"
+
+rebuild: mrproper all
+
+$(Outfile): $(Objects)
+ echo "* Linking $@..."
+ $(LD) $(LDFLAGS) -o $@ $^
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+clean:
+ echo "* Removing objects..."
+ rm *.o || exit 0
+ rm *.map || exit 0
+ rm $(Objects) || exit 0
+
+mrproper: clean
+ rm *.elf || exit 0
+ rm $(Outfile) || exit 0
+