# Makefile for adagio
# Copyright 1989 Carnegie Mellon University
# Last modified date: 

CAMDDIR = :camd/include
CAMDLIB = :camd/lib/camd.lib
CMTDIR = //lib
CMTLIB = $(CMTDIR)/cmt

# Definition of Compiler, Linker, and Flags
CC     = cc
CFLAGS = -bs -I$(CAMDDIR) -I$(CMTDIR)
LN     = ln
LFLAGS = -g -l$(CMTLIB) -lm -lc

# EVERYTHING is everything this makefile knows how to make
EVERYTHING = adagio

# CURRENT is the file we want to make now.
CURRENT = $(EVERYTHING) aamakefile

ADOBJ  = adagio.o handlers.o 
CLEANOBJ = #?.o #?.dbg
RECOMP = adag?o ; wildcard to avoid error return

MOXC = $(CMTDIR)/moxc.o

#-------------------------------------------------------------------------

current : $(CURRENT)
	echo "made $(CURRENT)"

everything : $(EVERYTHING)
	echo "made $(EVERYTHING)"

adagio : $(ADOBJ) $(MOXC) $(CMTLIB).lib
	$(LN) $(ADOBJ) $(MOXC) $(LFLAGS) 

adagio.o : adagio.c adagio.h
	$(CC) $(CFLAGS) adagio.c

aamakefile : makefile
	copy makefile aamakefile

# clean objects for library
clean :
	delete $(CLEANOBJ)

purge : clean
	delete $(RECOMP)

