### Do not edit -- Generated by 'configure --with-whatever' from Makefile.in
### STK demo Makefile - for various flavors of unix

PROGRAMS = stk-demo
RM = /bin/rm
SRC_PATH = ../../src
OBJECT_PATH = @object_path@
vpath %.o $(OBJECT_PATH)

OBJECTS	=	Stk.o Noise.o Envelope.o ADSR.o \
					Modulate.o SingWave.o SineWave.o FileRead.o FileWrite.o \
					FileWvIn.o FileLoop.o FileWvOut.o \
					OneZero.o OnePole.o PoleZero.o TwoZero.o Fir.o Iir.o \
					BiQuad.o FormSwep.o Delay.o DelayL.o DelayA.o \
					ReedTable.o JetTable.o BowTable.o \
					JCRev.o \
					Voicer.o Vector3D.o Sphere.o Twang.o \
					\
					Clarinet.o BlowHole.o Saxofony.o Flute.o Brass.o BlowBotl.o Recorder.o \
					Bowed.o Plucked.o StifKarp.o Sitar.o PluckTwo.o Mandolin.o Mesh2D.o \
					FM.o Rhodey.o Wurley.o TubeBell.o HevyMetl.o PercFlut.o BeeThree.o FMVoices.o \
					Sampler.o Moog.o Simple.o Drummer.o Shakers.o \
					Modal.o ModalBar.o BandedWG.o Resonate.o VoicForm.o Phonemes.o Whistle.o \
					\
					Messager.o Skini.o utilities.o

INCLUDE = @include@
ifeq ($(strip $(INCLUDE)), )
	INCLUDE = ../../include
endif
vpath %.h $(INCLUDE)

CC       = @CXX@
DEFS     = @CPPFLAGS@
DEFS    += @byte_order@
CFLAGS   = @CXXFLAGS@
CFLAGS  += -I$(INCLUDE) -I$(INCLUDE)/../src/include
LIBRARY = @LIBS@

REALTIME = @realtime@
ifeq ($(REALTIME),yes)
  PROGRAMS += stk-demo
	OBJECTS += RtMidi.o RtAudio.o Thread.o Mutex.o Socket.o TcpServer.o @objects@
endif

RAWWAVES = @rawwaves@
ifeq ($(strip $(RAWWAVES)), )
	RAWWAVES = ../../rawwaves/
endif
DEFS    += -DRAWWAVE_PATH=\"$(RAWWAVES)\"

%.o : $(SRC_PATH)/%.cpp $(OBJECT_PATH)/.placeholder
	$(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@

%.o : ../../src/include/%.cpp $(OBJECT_PATH)/.placeholder
	$(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@

all : $(PROGRAMS)

$(OBJECT_PATH)/.placeholder:
	mkdir -vp $(OBJECT_PATH)
	touch $(OBJECT_PATH)/.placeholder

stk-demo: demo.cpp $(OBJECTS)
	$(CC) $(LDFLAGS) $(CFLAGS) $(DEFS) -o stk-demo demo.cpp $(OBJECT_PATH)/*.o $(LIBRARY)

libdemo: demo.cpp
	$(CC) $(LDFLAGS) $(CFLAGS) $(DEFS) -o stk-demo utilities.cpp demo.cpp -L../../src -lstk $(LIBRARY)

Md2Skini: Md2Skini.cpp Stk.o RtMidi.o
	$(CC) $(LDFLAGS) $(CFLAGS) $(DEFS) -o Md2Skini Md2Skini.cpp $(OBJECT_PATH)/Stk.o $(OBJECT_PATH)/RtMidi.o $(LIBRARY)

libMd2Skini: Md2Skini.cpp
	$(CC) $(LDFLAGS) $(CFLAGS) $(DEFS) -o Md2Skini Md2Skini.cpp -L../../src -lstk $(LIBRARY)

$(OBJECTS) : Stk.h

clean : 
	$(RM) -f $(OBJECT_PATH)/*.o
	$(RM) -f $(PROGRAMS) *.exe
	$(RM) -fR *~ *.dSYM

distclean: clean
	$(RM) Makefile

strip : 
	strip $(PROGRAMS)

# Project specific objects:

utilities.o: utilities.cpp
	$(CC) $(CFLAGS) $(DEFS) -c utilities.cpp -o $(OBJECT_PATH)/$@
