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

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

OBJECTS	=	Stk.o Generator.o Envelope.o SineWave.o \
					Filter.o Delay.o DelayL.o OnePole.o \
					Effect.o Echo.o PitShift.o Chorus.o LentPitShift.o \
					PRCRev.o JCRev.o NRev.o FreeVerb.o \
					FileRead.o WvIn.o FileWvIn.o WaveLoop.o Skini.o Messager.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 += effects
	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

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

libeffects: effects.cpp
	$(CC) $(LDFLAGS) $(CFLAGS) $(DEFS) -o effects effects.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)
