37 行
		
	
	
		
			567 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			37 行
		
	
	
		
			567 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
CC =		gcc
 | 
						|
CFLAGS =	-O2 -s -D_GNU_SOURCE
 | 
						|
LDLIBS =	-lcrypt
 | 
						|
PREFIX =
 | 
						|
BINDIR =	$(PREFIX)/usr/sbin
 | 
						|
 | 
						|
ifeq ($(USE_SHADOW), 1)
 | 
						|
	DEFS:=-DUSE_SHADOW
 | 
						|
else
 | 
						|
	DEFS:=
 | 
						|
endif
 | 
						|
 | 
						|
all: sessmgr
 | 
						|
	@echo "All done!"
 | 
						|
 | 
						|
sessmgr: sessmgr.o sha256.o
 | 
						|
	$(CC) $(CFLAGS) $(LDLIBS) sessmgr.o sha256.o -o sessmgr
 | 
						|
 | 
						|
sessmgr.o: sessmgr.c
 | 
						|
	$(CC) $(CFLAGS) $(DEFS) -c sessmgr.c
 | 
						|
 | 
						|
sha256.o: sha256.c
 | 
						|
	$(CC) $(CFLAGS) $(DEFS) -c sha256.c
 | 
						|
 | 
						|
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!"
 |