2005-11-12 16:27:19 -05:00
|
|
|
#!/bin/sh
|
|
|
|
pwd=$1
|
|
|
|
shift
|
|
|
|
mod=$1
|
|
|
|
shift
|
|
|
|
|
2006-02-13 14:51:17 -05:00
|
|
|
if [ -f $pwd/build/freeswitch.env ] ; then
|
|
|
|
. $pwd/build/freeswitch.env
|
|
|
|
fi
|
|
|
|
|
2005-11-12 16:27:19 -05:00
|
|
|
make=`which gmake`
|
|
|
|
|
|
|
|
if [ -z $make ] ; then
|
2006-01-03 16:58:16 -05:00
|
|
|
make=`which make`
|
|
|
|
fi
|
|
|
|
|
|
|
|
end=`echo $mod | sed "s/^.*\///g"`
|
|
|
|
if [ -z $end ] ; then
|
|
|
|
end=$mod
|
2005-11-12 16:27:19 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $mod/Makefile ] ; then
|
2006-08-21 20:56:27 -04:00
|
|
|
CFLAGS="$MOD_CFLAGS $CFLAGS " MODNAME=$end $make -C $mod $@
|
2005-11-12 16:27:19 -05:00
|
|
|
else
|
2006-08-21 20:56:27 -04:00
|
|
|
CFLAGS="$MOD_CFLAGS $CFLAGS" MODNAME=$end $make -f $pwd/generic_mod.mk -C $mod $@
|
2005-11-12 16:27:19 -05:00
|
|
|
fi
|
|
|
|
|