summaryrefslogtreecommitdiff
path: root/core/slogin/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'core/slogin/Makefile')
-rw-r--r--core/slogin/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/core/slogin/Makefile b/core/slogin/Makefile
new file mode 100644
index 0000000..7026ffb
--- /dev/null
+++ b/core/slogin/Makefile
@@ -0,0 +1,33 @@
+# slogin - simple login manager
+# See LICENSE file for license details.
+
+include config.mk
+
+SRC = slogin.c
+OBJ = ${SRC:.c=.o}
+
+all: slogin
+
+.c.o:
+ ${CC} -c ${CFLAGS} $<
+
+${OBJ}: config.h config.mk
+
+config.h:
+ cp config.def.h $@
+
+slogin: ${OBJ}
+ ${CC} -o $@ ${OBJ} ${LDFLAGS}
+
+clean:
+ rm -f slogin ${OBJ}
+
+install: all
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp -f slogin ${DESTDIR}${PREFIX}/bin
+ chmod 755 ${DESTDIR}${PREFIX}/bin/slogin
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/slogin
+
+.PHONY: all clean install uninstall