aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..acd8d87
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,27 @@
+AS := as
+LD := ld
+ASFLAGS := -g
+LDFLAGS := -g
+
+SRCS := $(shell find . -name '*.s')
+OBJS := $(patsubst %.s, %.o, $(SRCS))
+TARGET := sorter
+
+TEST_DIR := ./test
+
+all: $(TARGET)
+
+$(TARGET): $(OBJS)
+ $(LD) $(LDFLAGS) $(OBJS) -o $@
+
+%.o: %.s
+ @mkdir -p $(dir $@)
+ $(AS) $(ASFLAGS) $< -o $@
+
+deploy: $(TARGET)
+ tar -czvf $(TARGET).tar.gz $(TARGET)
+
+clean:
+ rm -f $(TARGET) $(OBJS) *.tar.gz
+
+.PHONY: all clean deploy