diff options
| author | mithe24 <mithe24@student.sdu.dk> | 2025-10-11 18:36:14 +0200 |
|---|---|---|
| committer | mithe24 <mithe24@student.sdu.dk> | 2025-10-29 13:49:57 +0100 |
| commit | 005530bd8eb3ba7ddc55d85f7941c576d6418488 (patch) | |
| tree | 7b768f344fe30659d6f75b599fe09a1e3d302120 /src/Makefile | |
| parent | 25de1bee3c3f1e84fc6f32f199d69f13b392b41b (diff) | |
| download | sorter-005530bd8eb3ba7ddc55d85f7941c576d6418488.tar.gz sorter-005530bd8eb3ba7ddc55d85f7941c576d6418488.zip | |
build: Move Makefile to src/ and putting object files in src/ too
Changed output directory for objects files and put Makefile in src/.
This is because that is how it's expected in desc.pdf
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 27 |
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
|