# Generated automatically from Makefile.in by configure.
#
#TinTin++
#Copyright (C) 2001 Davin Chan, Robert Ellsworth, etc. (See CREDITS file)
#
#This program is protected under the GNU GPL (See COPYING).
#
#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 of the License, 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
#
# Makefile for TINTIN++ 
# 

# It's a bad idea to edit Makefile if you don't know what you're doing.
# Makefile is automatically generated by ./configure from Makefile.in.
# If you want to change something, most likely you'll want to edit
# Makefile.in and change it there, then run ./configure.

DEFINES = -D_GNU_SOURCE -DHAVE_CONFIG_H

CC = gcc -O3 -static
MAKE = gmake

#this is the standard CFLAGS options, this is what most people should use
CFLAGS = -Wall $(DEFINES) 

#this is the debugging CFLAGS options, should only be used if you want to
#debug/code tintin
#CFLAGS = -g -Wall $(DEFINES)

LDFLAGS = 
INCS = 

# Use the second line below if you do not have the readline library installed
# You also need to configure and make the readline library before you
# make the tintin++ program.
#LIBS = -lnsl -lncurses 
#
#Since readline and history are required, I'll hard code it in here.
#Guess we'll add zlib as well - Scandum

LIBS =  -lreadline -lhistory -lz -lncurses -lnsl -lncurses 

# If you prefer to be able to enter ISO latin-1 characters instead
# of being able to use the meta key for special emacs-like commands
# uncomment the following line.
#F1 = -DUSE_ISO_LATIN_ONE

# If you need to make connections through a SOCKS server, uncomment
# these 2 lines.  You also need to modify LIBSOCKS to point to the location
# of your SOCKS library.
#F6 = -DSOCKS
#LIBSOCKS = -lsocks5

# BINDIR is the directory you wish tt++ to be placed if you wish to use
# make install.  
BINDIR = .

# DEFAULT_FILE_DIR is the path to tintin files. 
# DEFAULT_FILE_DIR = @HOME@
DEFAULT_FILE_DIR = $(HOME)

#########################################
# You shouldn't need to change anything #
# below this line.                      #
#########################################
# GREP-FOR-ME (this is for gripe)       #
#########################################

FFLAGS= $(F1) $(F6)

OFILES = action.o alias.o antisub.o files.o help.o highlight.o                \
         llist.o log.o main.o misc.o net.o parse.o path.o rl.o rlhist.o       \
         tab.o vt102.o scrsize.o session.o text.o substitute.o tick.o         \
         utils.o variables.o function.o debug.o tables.o strhash.o telopt.o   \
         buffer.o macro.o config.o tinexp.o split.o math.o mapper.o

default: all

all:	tt++

tt++:	Makefile $(OFILES) tintin.h
	@echo "---- Linking..."
	$(CC) $(INCS) $(CFLAGS) $(FFLAGS) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) ${LIBSOCKS}

Makefile: Makefile.in
	@echo "You need to run ./configure first; then try make."
	@exit 1

install: tt++
	@./install-sh $(BINDIR) $(DEFAULT_FILE_DIR) $(COMPRESSED_HELP)

# Autocompile all .c files into .o files using this rule:
.c.o:
	$(CC) $(PIPE) $(CFLAGS) $(FFLAGS) $(INCS) -c $<

clean:
	rm -f *.o tt++ core config.h config.cache config.status config.log

distclean: clean
	rm -f Makefile config.h config.status config.log config.cache
