#
# Makefile for ttc and ttc daemon.
# You may have to edit this for some systems.
#
# Change INST_DEST if you want to install programs somewhere else.
#

INST_DEST = /usr/local/bin

srcdir		= .
prefix		= /usr
libdir		= $(prefix)/lib
includedir	= $(prefix)/include

CC		= gcc
CFLAGS		= -O2
CPPFLAGS	= -I. -I$(includedir)
CCFLAGS		= $(CFLAGS) $(CPPFLAGS)

# Some systems may need here 'LIBS = -L$(libdir) -lsocket'
LIBS		=

TTC_OBJS	= ttc.o options.o confauth.o
TTCD_OBJS	= ttcd.o

PROGRAMS 	= ttc ttcd

all: $(PROGRAMS)

ttc:	$(TTC_OBJS)
	-rm -f ttc
	$(CC) -o ttc $(TTC_OBJS) $(LIBS)

ttcd:	$(TTCD_OBJS)
	-rm -f ttcd
	$(CC) -o ttcd $(TTCD_OBJS) $(LIBS)

install:
	install -o 0 -g 0 -m 0755 ./ttc $(INST_DEST)/ttc
	install -o 0 -g 0 -m 0755 ./ttcd $(INST_DEST)/ttcd
clean:
	-rm -f *.o rm ttc ttcd

