#----------------------------------------------------------------------------
#  circd server for Linux
#
#  Copyright (c) 2005-2016 - Oliver Dawid, fli4l-Team <team@fli4l.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#----------------------------------------------------------------------------

CC=gcc
CFLAGS=-DDEBUG -g -Wall -fstrength-reduce
LDFLAGS=-lcrypt
TARGETS=circd

OBJFILES=circd.o connection.o eth.o isdn.o dsl.o ppp.o vpn.o data.o config.o events.o usercmd.o syslog.o md5.o circuit.o date.o circ_common.o iobytes.o

# Use makedepend from X (fast!) or fall back to gcc (slow!)
.depend: MKDEP=$(shell which makedepend > /dev/null && echo "makedepend -f-" || echo "$(CC) -MM")
.depend: $(wildcard *.c)
	$(MKDEP) $^ > $@

all: $(TARGETS)

circd: $(OBJFILES)
	$(CC) $^ $(LDFLAGS) -o $@

clean:
	rm -rf *.o .depend $(TARGETS) doc

-include .depend

