summaryrefslogtreecommitdiff
path: root/sfm-0.4/Makefile
diff options
context:
space:
mode:
authorstkhan <personal@slickd.xyz>2022-05-07 12:42:36 +0000
committerstkhan <personal@slickd.xyz>2022-05-07 12:42:36 +0000
commit0f734f0e317996d246fed2b0bdd1550c49d46e5b (patch)
treedb0f535dcb02dc1959508a1e94570db74ea3bbb2 /sfm-0.4/Makefile
parent42966e3e531b8e46e4ab31480d45aa7a141f19ce (diff)
Fixed things, added sfm
Diffstat (limited to 'sfm-0.4/Makefile')
-rw-r--r--sfm-0.4/Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/sfm-0.4/Makefile b/sfm-0.4/Makefile
new file mode 100644
index 0000000..dae243f
--- /dev/null
+++ b/sfm-0.4/Makefile
@@ -0,0 +1,51 @@
+# sfm - simple file manager
+# See LICENSE file for copyright and license details.
+
+include config.mk
+
+SRC = sfm.c util.c termbox.c utf8.c
+OBJ = ${SRC:.c=.o}
+
+all: options sfm
+
+options:
+ @echo sfm build options:
+ @echo "CFLAGS = ${CFLAGS}"
+ @echo "LDFLAGS = ${LDFLAGS}"
+ @echo "CC = ${CC}"
+
+.c.o:
+ ${CC} -c ${CFLAGS} $<
+
+${OBJ}: config.h config.mk
+
+config.h:
+ cp config.def.h $@
+
+sfm: ${OBJ}
+ ${CC} ${LDFLAGS} -o $@ ${OBJ}
+
+clean:
+ rm -f sfm ${OBJ} sfm-${VERSION}.tar.gz
+
+dist: clean
+ mkdir -p sfm-${VERSION}
+ cp -R LICENSE Makefile README.md config.def.h config.mk\
+ sfm.1 sfm.png termbox.h util.h ${SRC} sfm-${VERSION}
+ tar -cf sfm-${VERSION}.tar sfm-${VERSION}
+ gzip sfm-${VERSION}.tar
+ rm -rf sfm-${VERSION}
+
+install: sfm
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp -f sfm ${DESTDIR}${PREFIX}/bin
+ chmod 755 ${DESTDIR}${PREFIX}/bin/sfm
+ mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ sed "s/VERSION/${VERSION}/g" < sfm.1 > ${DESTDIR}${MANPREFIX}/man1/sfm.1
+ chmod 644 ${DESTDIR}${MANPREFIX}/man1/sfm.1
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/sfm\
+ ${DESTDIR}${MANPREFIX}/man1/sfm.1
+
+.PHONY: all options clean dist install uninstall