# Installation directories:
INSTALLDIR = INSTALLDIR_IS_UNDEFINED
INC = $(INSTALLDIR)/gcc/include
LIB = $(INSTALLDIR)/lib

HFILES =

HOFILES =

OFILES =
  
MAINOBJ = \
  aatimes.o
  
LIBS = \
  $(LIB)/libaa.a \
  $(LIB)/libia.a \
  $(LIB)/libflt.a \
  $(LIB)/libjs.a

PROG = \
  aatimes
  
OPTFLAGS = -g

GCCFLAGS = \
  -I$(INC) \
  $(OPTFLAGS) \
  -ansi \
  -Wall -Wtraditional -Wpointer-arith -Wmissing-prototypes \
  -mfpu

all:   $(HOFILES) $(PROG)

cleanup: ;\
  rm -f *.o *.a *.ho $(PROG) 

install: 

%.o: %.s ;\
  gcc -c $(GCCFLAGS) $*.s

%.o: %.c ;\
  gcc -c $(GCCFLAGS) $*.c
  
%.ho: %.h ;\
  gcc -o $*.ho -c $(GCCFLAGS) -x c $*.h \
  || /bin/rm -f $*.ho
  
$(PROG): $(MAINOBJ) $(OFILES) $(LIBS) ;\
  rm -f $(PROG) && \
  gcc -L$(LIB) -o $(PROG) $(MAINOBJ) $(OFILES) $(LIBS) -lm &&\
  $(PROG)

# Dependencies of .h files:
  
# Dependencies of .c and .s files:

aatimes.o:: aatimes.c $(INC)/js.ho $(INC)/ioprotos.ho \
            $(INC)/timefunc.ho \
            $(INC)/flt.ho $(INC)/ia.ho $(INC)/aa.ho