# Generated automatically from Makefile.in by configure.
# SocksCleaner Makefile (C) Nedelcho Stanew 2000
# $Id: Makefile.in,v 1.0.0 2000/03/02 16:06:24 decho stable $

# Set this to the directory to install the sockscleaner binary
BINDIR = /home/piro/sockscleaner

# Set this to the directory to install sockscleaner.conf,  etc
CONFDIR = /home/piro/sockscleaner

# Set this to the user who will own BINDIR
WHOAMI = piro

############ Don't change anything below here ############

# SocksCleaner Version
VERSION = SecuServ1.0

CC = gcc
CFLAGS = -g -O2 -D_REENTRANT -Wall

# Debugging CFLAGS
#CFLAGS = -g -Wall
#CFLAGS = -g -Wall -D_REENTRANT

LDFLAGS = 
LIBS =  -lnsl -lcrypt
LIBP = -lpthread
RM = /bin/rm -f
RMR = /bin/rm -rf
CP = /bin/cp
CPR = /bin/cp -R
LN = /bin/ln -f
CHMOD = /bin/chmod
CHOWN = /bin/chown -R
LS = /bin/ls -l

INSTALL=/usr/bin/install -c
INSTALL_DATA=${INSTALL} -m 644
INSTALL_BIN=${INSTALL} -m 755
INSTALL_SECURE=${INSTALL} -m 600

# Secure configuration files (mode 600)
SECUREFILES = sockscleaner.conf\
              elines.conf\
              settings.conf


all: libString source
	@echo '** Building libString **'
	@cd libString ; $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)"
	@echo '** Building source **'
	@cd source ; $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS)" "VERSION=$(VERSION)"
	@echo
	@echo "*** Done building $(VERSION) ***"
	@echo

build: all

clean:
	@echo '** Removing objects **'
	@cd libString ; $(MAKE) clean
	@cd source ; $(MAKE) clean

distclean:
	@cd libString ; $(MAKE) distclean
	@cd source ; $(MAKE) distclean
	$(RM) Makefile include/defs.h config.status config.cache config.log ~* core sockscleaner.core

depend:
	@cd source ; $(MAKE) depend

install: all
	@if test ! -d $(BINDIR); then \
		echo Creating $(BINDIR); \
		mkdir $(BINDIR) 2>/dev/null; \
	fi
	@if test ! -d $(CONFDIR); then \
		echo Creating $(CONFDIR); \
		mkdir $(CONFDIR) 2>/dev/null; \
	fi
	@echo '** Installing SocksCleaner in $(BINDIR) **'
	@$(INSTALL_BIN) "bin/sockscleaner" "$(BINDIR)/sockscleaner"
	@for file in $(BINPROGS); do \
		if test ! -f "$(BINDIR)/$$file"; then \
			echo "** Installing $$file in $(BINDIR) **"; \
			$(INSTALL_BIN) "bin/$$file" "$(BINDIR)/$$file"; \
		fi \
	done
	@for file in $(SECUREFILES); do \
		if test ! -f "$(CONFDIR)/$$file"; then \
			echo "** Installing $$file in $(CONFDIR) **"; \
			$(INSTALL_SECURE) "bin/$$file" "$(CONFDIR)/$$file"; \
		fi \
	done
	@echo
	-@$(LS) $(BINDIR)/sockscleaner\
          $(CONFDIR)/sockscleaner.conf\
          $(CONFDIR)/elines.conf\
          $(CONFDIR)/settings.conf
	@echo
	@echo '** Changing ownership of $(BINDIR) to $(WHOAMI) **'
	@$(CHOWN) $(WHOAMI) $(BINDIR)
	@if test $(BINDIR) != $(CONFDIR); then \
		echo '** Changing ownership of $(CONFDIR) to $(WHOAMI) **'; \
		$(CHOWN) $(WHOAMI) $(CONFDIR); \
	fi
	@echo
	@echo "*** Done installing  $(VERSION) ***"
	@echo
	@if test -f "install-banner"; then \
		cat install-banner; \
	fi

# End of Makefile
