CPPFLAGS += @osl_cppflags@
CPPFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"'
-BINARIES = para_server para_audiod para_client para_audioc para_recv \
- para_filter para_write para_afh @extra_binaries@
-man_binaries := $(BINARIES)
-man_pages := $(patsubst %, man/man1/%.1, $(man_binaries))
-man_pages_in := $(patsubst %, web/%.man.in.html, $(man_binaries))
+man_pages := $(patsubst %, man/man1/%.1, @executables@)
+man_pages_in := $(patsubst %, web/%.man.in.html, @executables@)
ggo_dir := ggo
object_dir := objects
.PHONY: all clean distclean maintainer-clean install man tarball\
.FORCE-GIT-VERSION-FILE
-all: $(BINARIES) $(man_pages)
+all: @executables@ $(man_pages)
man: $(man_pages)
tarball: $(tarball)
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
@./GIT-VERSION-GEN GIT-VERSION-FILE
-include GIT-VERSION-FILE
-$(BINARIES): GIT-VERSION-FILE
+@executables@: GIT-VERSION-FILE
-include $(ggo_dir)/makefile
wma_common wmadec_filter buffer_tree
"
-all_executables="server recv filter audioc write client afh audiod"
+executables="server recv filter audioc write client afh audiod"
recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv)"
AC_SUBST(ncurses_cppflags)
AC_SUBST(ncurses_libs)
AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on ncurses support])
- extras="$extras para_gui"
- all_executables="$all_executables gui"
+ extras="$extras gui"
+ executables="$executables gui"
else
AC_MSG_WARN([cannot build para_gui])
fi
msg="=> will not build para_fade/oss writer"
AC_CHECK_HEADER(sys/soundcard.h, [
- extras="$extras para_fade"
- all_executables="$all_executables fade"
+ extras="$extras fade"
+ executables="$executables fade"
all_errlist_objs="$all_errlist_objs oss_write"
audiod_errlist_objs="$audiod_errlist_objs oss_write"
audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(oss_write)"
LDFLAGS="$OLD_LDFLAGS"
LIBS="$OLD_LIBS"
-AC_SUBST(extra_binaries, [$extras])
-AC_SUBST(extra_filter_objs, [$extra_filter_objs])
-AC_SUBST(extra_filter_libs, [$extra_filter_libs])
AC_SUBST(install_sh, [$INSTALL])
AC_CONFIG_FILES([Makefile])
AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
+AC_DEFUN([add_para],[$(for i in $@; do printf "para_$i "; done)])
AC_DEFUN([objlist_to_errlist],[$(for i in $@; do printf "DEFINE_ERRLIST($(echo $i| tr 'a-z' 'A-Z'));"; done) [const char **para_errlist[[]]] = {$(for i in $@; do printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; done) }])
-
############################################################# error2.h
AC_DEFUN([define_safe_error_enums],
[
exe=""
- for i in $all_executables; do
+ for i in $executables; do
# eval echo checking if $1 is linked into $i
for j in $(eval echo \$${i}_errlist_objs); do
if test $j = $1; then
)
+AC_SUBST(executables, add_para($executables))
+
recv_objs="$recv_cmdline_objs $recv_errlist_objs"
filter_objs="$filter_cmdline_objs $filter_errlist_objs"
audiod_objs="$audiod_cmdline_objs $audiod_errlist_objs"