diff options
Diffstat (limited to '')
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile | 28 | ||||
| -rw-r--r-- | PKGBUILD | 12 | ||||
| -rw-r--r-- | src/Makefile | 27 |
4 files changed, 35 insertions, 34 deletions
@@ -1,3 +1,3 @@ -build/* +*.o sorter sorter.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index 2694891..0000000 --- a/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -TARGET := sorter
-SRC_DIR := ./src
-BUILD_DIR := ./build
-
-AS := as
-LD := ld
-ASFLAGS := -g
-LDFLAGS := -g
-
-SRCS := $(shell find $(SRC_DIR) -name '*.s')
-OBJS := $(patsubst %.s,%.o,$(SRCS:$(SRC_DIR)/%=$(BUILD_DIR)/%))
-
-all: $(TARGET)
-
-$(TARGET): $(OBJS)
- $(LD) $(LDFLAGS) $(OBJS) -o $@
-
-$(BUILD_DIR)/%.o: $(SRC_DIR)/%.s
- @mkdir -p $(dir $@)
- $(AS) $(ASFLAGS) $< -o $@
-
-deploy: $(TARGET)
- tar -czvf $(TARGET).tar.gz $(TARGET) README.md
-
-clean:
- rm -r $(BUILD_DIR) $(TARGET)
-
-.PHONY: all clean deploy
@@ -3,7 +3,7 @@ # Maintainer: Mikkel Thestrup <mithe24@student.sdu.dk> pkgname=sorter -pkgver=1.0.0 +pkgver=0.0.0 pkgrel=1 pkgdesc="A simple x86-64 bit sorter program for sorting a list of coordinates." epoch=1 @@ -12,17 +12,19 @@ url="" license=('MIT') depends=() provides=('sorter') -makedepends=('make' 'binutils') +makedepends=('make' 'binutils' 'git') source=() sha256sums=() +pkgver() { + git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0" +} + build() { - cd .. make } package() { - cd .. install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" - install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md" + install -Dm644 "../README.md" "$pkgdir/usr/share/doc/$pkgname/README.md" } 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
|