# Unix base make file for Aspic.

# The normal targets in this Makefile are not called directly, but should be
# called from the top-level Makefile. To make it easy when developing from
# within the source directory, a call with no target gets passed back up to
# the outer Makefile, as does "make test".

intcall:;      cd ..; $(MAKE);
test:;         cd ..; $(MAKE) test;

# Compile step for the modules

.SUFFIXES:     .o .c
.c.o:;         @echo "$(CC) $*.c"
	       $(FE)$(CC) -c $(CFLAGS) $*.c


# Object module lists for the program

ASPICOBJ =     aspic.o rditem.o rdsubs.o read.o tables.o tree.o \
               write.o wrps.o wrsg.o wrsv.o


# Link step for the program

aspic:         $(ASPICOBJ)
	       @echo "$(CC) -o aspic"
	       $(FE)$(CC) $(LFLAGS) -o aspic $(ASPICOBJ) -lm
	       @echo ">>> aspic command built"; echo ""


# Dependencies

aspic.o:       Makefile ../Makefile aspic.c   aspic.h mytypes.h
rditem.o:      Makefile ../Makefile rditem.c  aspic.h mytypes.h
rdsubs.o:      Makefile ../Makefile rdsubs.c  aspic.h mytypes.h
read.o:        Makefile ../Makefile read.c    aspic.h mytypes.h
tables.o:      Makefile ../Makefile tables.c  aspic.h mytypes.h
tree.o:        Makefile ../Makefile tree.c    aspic.h mytypes.h
write.o:       Makefile ../Makefile write.c   aspic.h mytypes.h
wrps.o:        Makefile ../Makefile wrps.c    aspic.h mytypes.h
wrsg.o:        Makefile ../Makefile wrsg.c    aspic.h mytypes.h
wrsv.o:        Makefile ../Makefile wrsv.c    aspic.h mytypes.h
            
# Clean up etc

clean:;        /bin/rm -f *.o aspic 

# End
