Browse Source

Made it presentable

master
Callum David OBrien 3 years ago
parent
commit
ab63721f9e
6 changed files with 75 additions and 8 deletions
  1. 1
    1
      .gitignore
  2. 8
    7
      LICENSE
  3. 50
    0
      Makefile
  4. 2
    0
      README
  5. 14
    0
      config.mk
  6. 0
    0
      mandel.1

+ 1
- 1
.gitignore View File

@@ -1,4 +1,4 @@
mandel
*.o
*.hi
*.t{ar,xz}
*.txz

+ 8
- 7
LICENSE View File

@@ -4,10 +4,11 @@ Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

+ 50
- 0
Makefile View File

@@ -0,0 +1,50 @@
# Basically stolen from suckless.org

include config.mk

SRC = mandel.hs
MAN = mandel.${SECTION}
BIN = mandel

all: options ${BIN}

options: config.mk
@echo ":: ${BIN} ${VERSION} ::"
@echo
@echo "HFLAGS = ${HFLAGS}"
@echo "HC = ${HC}"
@echo

${BIN}: ${SRC}
${HC} -o $@ ${HFLAGS} ${SRC}

clean:
@echo "Cleaning"
@rm -f *.hi *.o *.txz ${BIN}

dist: clean
@echo "Making distribution tarball"
@mkdir -p ${BIN}-${VERSION}
@cp LICENSE Makefile README config.mk ${BIN}.1 ${SRC} \
${BIN}-${VERSION}
@tar -cf ${BIN}-${VERSION}.tar ${BIN}-${VERSION}
@xz -c ${BIN}-${VERSION}.tar > ${BIN}-${VERSION}.txz
@rm -rf ${BIN}-${VERSION}{.tar,}

install: all ${MAN}
@echo "Installing binary to ${PREFIX}/bin"
@cp -f ${BIN} ${PREFIX}/bin
@chmod 755 ${PREFIX}/bin/${BIN}
@echo Installing man page to ${MANPREFIX}/man${SECTION}
@mkdir -p ${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < ${MAN} \
> ${MANPREFIX}/man${SECTION}/${MAN}
@chmod 644 ${MAXPREFIX}/man${SECTION}/${MAN}

uninstall:
@echo "Removing binary from ${PREFIX}/bin"
@rm -f ${PREFIX}/bin/${BIN}
@echo "Removing man page from ${MANPREFIX}/man${SECTION}
@rm -f ${MANPREFIX}/man${SECTION}/${MAN}

.PHONY: all options clean dist install uninstall

+ 2
- 0
README View File

@@ -0,0 +1,2 @@
It renders the Mandelbrot set as a farbfeld image! I'm going to make
it less retardedly inefficient and add colours at some point :)

+ 14
- 0
config.mk View File

@@ -0,0 +1,14 @@
VERSION = 0.0.1

# Paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

# Haskell compiler
HC = ghc

# Haskell compiler flags
HFLAGS = -O

# Manual section
SECTION = 1

+ 0
- 0
mandel.1 View File


Loading…
Cancel
Save