CC		= gcc
CPP		= $(CC) -E
CFLAGS		= -DTFKISS_LINUX -funsigned-char -O2
#CFLAGS		= -DTFKISS_LINUX -funsigned-char -ggdb
LD		= $(CC)
LDFLAGS		=  
DEFS		=
LIBS		=

HDRS		= all.h \
		  l2.h \
                  l2ext.h \
                  l2s.h \
                  tf.h \
                  tfext.h \
                  version.h \
		  kiss.h \
		  init.h \
		  config.h \
		  axip.h

OBJS		= l2a.o \
		  l2b.o \
		  l2c.o \
                  l2d.o \
		  l2e.o \
                  l2s.o \
                  l2v.o \
                  tfa.o \
                  tfb.o \
                  tfc.o \
                  tfd.o \
                  tfv.o \
		  crc.o \
		  init.o \
		  main.o \
		  process.o \
		  routing.o

SRCS		= l2a.c \
		  l2b.c \
                  l2c.c \
                  l2d.c \
		  l2e.c \
                  l2s.c \
                  l2v.c \
                  tfa.c \
                  tfb.c \
                  tfc.c \
                  tfd.c \
                  tfv.c \
		  crc.c \
		  init.c \
		  main.c \
		  process.c \
		  routing.c

OTHERS          = Makefile \
                  alas.txt \
		  alas.eng \
                  copyrght.txt \
		  tfkiss.ini.smpl \
		  tfkiss.cfg.smpl \
		  rfc1226 \
		  tfkiss.doc

all:		tfkiss

tgz:
		@echo Creating tfkiss.tgz
		@tar -cvzf tfkiss.tgz $(SRCS) $(HDRS) $(OTHERS)

tfkiss:		$(OBJS)
		$(CC) $(CFLAGS) $(OBJS) $(LIBS) -o tfkiss;

clean:
	rm -f   *.o *~ .*~ tfkiss .depend

dep:
	$(CPP) -M $(SRCS) $(CFLAGS) > .depend

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
