add minimal working program

to build, run make
This commit is contained in:
Jeremy Baxter 2024-02-09 10:26:06 +13:00
commit 06df44d51e
2 changed files with 307 additions and 0 deletions

26
Makefile Normal file
View file

@ -0,0 +1,26 @@
PREFIX = /usr/local
DC = ldc2
CFLAGS = -Oz
#CFLAGS = -O0 -g -d-debug -wi
LDFLAGS = -L-lcurl
OBJS = mal.o
all: mal
mal: ${OBJS}
${DC} ${LDFLAGS} -of=$@ ${OBJS}
mal.o: mal.d
${DC} ${CFLAGS} -c mal.d
clean:
rm -f mal ${OBJS}
install:
mkdir -p ${DESTDIR}${PREFIX}/bin
chmod +x mal
cp -f mal ${DESTDIR}${PREFIX}/bin/mal
.PHONY: all clean install