# Turbo C Makefile for ADC FITS Table Browser
#
# Assumes Borland C 3.x compiler, using huge memory model.  Check the CC,
# INCDIR, an LIBDIR macros to make sure that they are valid for your system.
# This makefile assumes that curses.h and curspriv.h are installed in the
# INCDIR directory, and that hcurses.lib is installed in the LIBDIR directory.
# CFLAGS and LFLAGS should be correct, however you can choose the compile
# FTB either with debugging or without it.  The file FTB.RSP is a response file
# included in the source distribution (FTB3SRC.ZIP) that contains a list of
# all the FTB object modules.  It is required in order to link FTB without
# disobeying DOS' annoying 128-character command line limit.
#
CC  = bcc
MDL = h
INCDIR = d:\borlandc\include
LIBDIR = d:\borlandc\lib
#
# Options for debugging
#
# CFLAGS = -DMSDOS -DSYSV -O -f -w -v -I$(INCDIR) -L$(LIBDIR)
# LFLAGS = /x /v
#
# Options for distribution version
#
CFLAGS = -DMSDOS -DSYSV -O -f -w -I$(INCDIR) -L$(LIBDIR)
LFLAGS = /x

.c.obj:
  $(CC) -c -m$(MDL) $(CFLAGS)  $<

OBJS = ftb.obj display.obj extract.obj fitsio.obj fitsscan.obj list.obj\
 open.obj readf.obj screen.obj select.obj table.obj utility.obj

#
# executable dependancies
#
all: ftb.exe

ftb.exe: $(OBJS)
  $(CC) -m$(MDL) $(CFLAGS) @ftb.rsp $(MDL)curses.lib

#
# module dependencies
#
ftb.obj: display.h extract.h fitsio.h list.h open.h screen.h select.h \
 table.h utility.h ftb.h ftb.c

display.obj: ftb.h screen.h table.h utility.h display.h display.c

extract.obj: ftb.h display.h fitsio.h screen.h table.h utility.h \
 extract.h extract.c

fitsio.obj: ftb.h readf.c screen.h select.h table.h utility.h fitsio.h fitsio.c

fitsscan.obj: ftb.h fitsio.h screen.h table.h utility.h fitsscan.h fitsscan.c

list.obj: ftb.h fitsio.h screen.h table.h utility.h list.h list.c

open.obj: ftb.h fitsscan.h screen.h table.h utility.h open.h open.c

readf.obj: readf.c

screen.obj: ftb.h utility.h screen.h screen.c

select.obj: ftb.h screen.h table.h utility.h select.h select.c

table.obj: ftb.h screen.h utility.h table.h table.c

utility.obj: ftb.h utility.h utility.c

clean:
   del *.obj
   del ftb.exe
