##############################################################
#    SndObj g++ makefile
#    makes:    all
#              install
##############################################################

# Choose the compiler 
# On Linux/Cygwin use gnu g++
# On Irix use MipsPRO if you have it
CC	=	g++
      
libDir  =   ../../lib
iDir    =    ../../include
binDir = ../../bin

LIBNAME = $(libDir)/libsndobj.a
LIB    = -L../../lib -lsndobj 

#  CHOOSE ONE OF THE FOLLOWING OPTIONS ############
############# RT ON CYGWIN ########################
DEFS = -DWIN 
CFLAGS = -O -I$(iDir) $(DEFS) -Xlinker --enable-stdcall-fixup 
LFLAGS = -lwinmm
ext = .exe

############# RT ON LINUX ##########################
#DEFS = -DOSS
#CFLAGS =    -O -I$(iDir) $(DEFS)
#LFLAGS = 
#ext =

############# RT ON IRIX ###########################
#DEFS = -DSGI
#CFLAGS =  -O -I$(iDir) $(DEFS)
#LFLAGS =  -dont_warn_unused -laudio -lmd -lm -lpthread
#ext =

progrs = midisynth$(ext) pluck$(ext) streson$(ext)  \
schroeder$(ext) cvoc$(ext) example1$(ext) example2$(ext) \
example3$(ext) sinus$(ext)

all: $(progrs)

install: $(progrs)
	 mv $(progrs) $(binDir)

$(progrs): %$(ext) : %.cpp 
	$(CC) -o $@ $(CFLAGS) $< $(LIB) $(LFLAGS) 
