# 
# Makefile for XVT
#
#  Configured to compile for Atari MiNT and stripped down to look tidy
#
######################################################################

ARCH=MINT
FSTACK=/d/gcc/fixstk.ttp          # Fix the stack size under MiNT
STRIP=/d/gcc/xstrip.ttp

######################################################################
# Directories to install the binary and the manual page
#
#BIN=/usr/local/X11
BIN=.
#MANDIR=/usr/local/man/man1
MANDIR=.

######################################################################
# Enable some extra debugging code
#DEBUG=-DDEBUG
#
#ARCH SUNOS5 OSF1 AIX3 ULTRIX MINT
OPTIONS=$(MAGIC_COOKIE) $(DEBUG)


######################################################################
# Additional directories to search for include files.  These may need
# modifying if you have local include directories.
#
#Atari MiNT
INCLUDE=-I/usr/include/X11

######################################################################
# Any architecture dependent libraries or library search paths.
#
#ARCH Atari MiNT
LIBS=-lX11 -lank -lsocket -lmint
LIB=-L/usr/lib $(LIBS)

######################################################################
# The C compiler 
# Atari MiNT
CC=gcc -v -ansi -Wall -Wmissing-prototypes
LD=gcc-ld -v

######################################################################

OBJ=xvt.o xsetup.o command.o screen.o sbar.o ttyinit.o
SRC=xvt.c xsetup.c command.c screen.c sbar.c ttyinit.c

CFLAGS=-O $(INCLUDE) $(OPTIONS) -D$(ARCH)

xvt.tos: $(OBJ) Makefile
	$(LD) -o xvt.tos /usr/lib/mcrt0.o $(OBJ) $(LIB)
	mv xvt.tos xvt
	$(FSTACK) 10000 xvt
	$(STRIP) xvt
	chmod aug+rx xvt

clean:
	rm -f $(OBJ) xvt


