#!/bin/sh


notused="../Pixes/pix_indycam.cpp ../Base/GemWinCreateNT.cpp ../Pixes/pix_videoNT.cpp ../Pixes/pix_videoSGI.cpp"

echo     '## Process this file with automake to produce Makefile.in'

echo 'gemdir = $(libdir)/gem'
echo vpath %.cpp @source_dirs@

echo -n Gem_pd_SOURCES = 
for i in `find .. -maxdepth 2 -name *.cpp`
do
   dontuse=0
   for j in $notused 
   do 
      if test $i == $j; then dontuse=1;fi
   done
   if test $dontuse -eq 0; 
   then 
        echo $i \\
   fi
done


echo
echo 'Gem_pd_LDADD = @arch_ld_flags@'

echo 'Gem_pd_LDFLAGS = -shared'
echo 'noinst_PROGRAMS = Gem.pd'

echo ##
echo ## Additional Makefile rules
echo ##

echo all: 
echo $'\tcp Gem.pd ../../Gem.@target@'

echo clean:
echo $'\trm ../../Gem.@target@'

echo install:
echo $'\tinstall -c -m 644 ../../Gem.@target@ $(DESTDIR)/usr/lib/pd/externs'
echo $'\tinstall -d $(DESTDIR)/usr/lib/pd/doc/gem.manual'
echo $'\tinstall -d $(DESTDIR)/usr/lib/pd/doc/gem.examples '
echo $'\tinstall -d $(DESTDIR)/usr/lib/pd/doc/gem.reference'
echo $'\tcp -r ../../doc/* $(DESTDIR)/usr/lib/pd/doc/gem.manual'
echo $'\tcp -r ../../examples/* $(DESTDIR)/usr/lib/pd/doc/gem.examples'
echo $'\tcp -r ../../help/* $(DESTDIR)/usr/lib/pd/doc/gem.reference'
