@@ -1,5 +1,6 @@
CC = gcc
LIBS = -ludev -luuid -lkmod
+DEST = /usr/bin
OBJS = ../ndctl/lib/.libs/libndctl.o ../daxctl/lib/.libs/libdaxctl.o ../util/.libs/sysfs.o ../util/.libs/log.o ../ndctl/lib/.libs/libndctl-smart.o
IDIR = -I../ -I../ndctl
PROGRAM = nvdimmd
@@ -11,5 +12,8 @@ libnvdimmd.o: libnvdimmd.c
$(CC) -o libnvdimmd.o $(IDIR) -c libnvdimmd.c
nvdimmd.o: nvdimmd.c
$(CC) -o nvdimmd.o $(IDIR) -c nvdimmd.c
+install: nvdimmd nvdimmd.service
+ install -s nvdimmd $(DEST)
+ cp nvdimmd.service /usr/lib/systemd/system/
clean:
rm -rf *.o $(PROGRAM)
new file mode 100644
@@ -0,0 +1,7 @@
+[Unit]
+Description=Nvdimm Daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/nvdimmd
+ExecStop=/usr/bin/kill ${MAINPID}