# General Purpose Makefile 

# Put the program name (executable file) here
CC=g++-2.1

# find my other headers
INCLUDE= -I../note -I../beat -I../chord -I../change
# -O optimization -g debugging info
CFLAGS =   $(INCLUDE) -O # -g
LIBS = -L../lib -lmuslib

all:  timed

#primary object files
OBJ= beat_pred.o

BLIB = ../lib/libmuslib.a

blib $(BLIB): $(OBJ)
	ar rv $(BLIB) $(OBJ)
	ranlib $(BLIB)

# Meta Rule for compiling .C extensions
# I have selected as C++ extension the .C one.
.cc.o :
	$(CC) $(CFLAGS) -c $*.cc

.C.o :
	$(CC) $(CFLAGS) -c $*.C


# stuff for the time competence

timed.o : timed.cc timed.h
	$(CC) $(CFLAGS) -c timed.cc

beat_pred.o : beat_pred.cc timed.h 
	$(CC) $(CFLAGS) -c beat_pred.cc

timed : timed.o $(BLIB)            # doesn't notice change in nlib or clib!
	$(CC) -o timed $(CFLAGS) $@.o $(LIBS)
