#
# Makefile for TINTIN III
# 

# I'm using GNU's gcc compiler. The most important is that the 
# compiler is ANSI-compatible. If gcc isn't installed on your
# system, then try change the 'gcc' below to 'cc' If 
CC = gcc

# Some people's ANSI-compiler somehow don't have the full
# ANSI-defined standard-library. Uncomment the lines below
# if your compiler don't have 'strstr'
#F1 = -DDUNNO_strstr

# If you recive lots of error from the 'echo.c' file, then try
# to uncomment the next line:
#F2 = -DDO_TERMIO

# Somehow people using Sun and gcc have to redefine the values
# for the macros TIOCGETP and TIOCSETP. This is really dirty 
# coding and shouldn't be nercessary(but it is sometime). So 
# comment the next line if you recieve an error from the 
# ioctl routine:
F3 = -DDIRTY_REDEFINE

CFLAGS= -g $(F1) $(F2) $(F3)

# uncomment the line below for SysV/Sequent
# if your SysV system don't know all this libraries, then remove
# the unknown ones.
#LIB = -lsocket -linet -lnsl

CFILES = main.c parse.c action.c alias.c substitute.c session.c \
files.c history.c ticks.c misc.c path.c net.c llist.c utils.c echo.c
OFILES = main.o parse.o action.o alias.o substitute.o session.o \
files.o history.o ticks.o misc.o path.o net.o llist.o utils.o echo.o 

tintin: $(OFILES) 
	$(CC) $(CFLAGS) -o tintin $(OFILES) $(LIB)

main.o: tintin.h
parse.o: tintin.h
action.o: tintin.h
alias.o: tintin.h
substitute.o: tintin.h
session.o: tintin.h
files.o: tintin.h
history.o: tintin.h
ticks.o: tintin.h
misc.o: tintin.h
path.o: tintin.h
net.o: tintin.h
llist.o: tintin.h
utils.o: tintin.h
echo.o: tintin.h