2013-06-28 18:36:45 +02:00
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -O2 -s -D_GNU_SOURCE
|
|
|
|
LDLIBS = -lcrypt
|
|
|
|
PREFIX =
|
|
|
|
BINDIR = $(PREFIX)/usr/sbin
|
|
|
|
|
2013-07-26 17:40:19 +02:00
|
|
|
ifeq ($(USE_SHADOW), 1)
|
|
|
|
DEFS:=-DUSE_SHADOW
|
|
|
|
else
|
|
|
|
DEFS:=
|
|
|
|
endif
|
|
|
|
|
2013-06-28 18:36:45 +02:00
|
|
|
all: sessmgr
|
|
|
|
@echo "All done!"
|
|
|
|
|
|
|
|
sessmgr: sessmgr.o sha256.o
|
|
|
|
$(CC) $(CFLAGS) $(LDLIBS) sessmgr.o sha256.o -o sessmgr
|
|
|
|
|
|
|
|
sessmgr.o: sessmgr.c
|
2013-07-26 17:40:19 +02:00
|
|
|
$(CC) $(CFLAGS) $(DEFS) -c sessmgr.c
|
2013-06-28 18:36:45 +02:00
|
|
|
|
|
|
|
sha256.o: sha256.c
|
2013-07-26 17:40:19 +02:00
|
|
|
$(CC) $(CFLAGS) $(DEFS) -c sha256.c
|
2013-06-28 18:36:45 +02:00
|
|
|
|
|
|
|
install:
|
|
|
|
mkdir -p $(BINDIR)
|
|
|
|
cp sessmgr $(BINDIR)
|
|
|
|
@echo "All done!"
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f $(BINDIR)/sessmgr
|
|
|
|
@echo "All done!"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f sessmgr *.o
|
|
|
|
@echo "All done!"
|