aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormusil <tmusil@users.sourceforge.net>2006-03-10 01:42:56 +0000
committermusil <tmusil@users.sourceforge.net>2006-03-10 01:42:56 +0000
commit8ee3ef0b1d4be21dcf53e3ba2d505a8b80e1f790 (patch)
tree0c6598243206236a84ab5375448dd239b00e91f3
parent5d703274d45d8bbf4d1d7a54e1eb8d5dd956f0ce (diff)
good old makefiles
svn path=/trunk/externals/iem/iem_ambi/; revision=4677
-rw-r--r--src/Make.config.in28
-rw-r--r--src/Makefile88
-rw-r--r--src/iem_ambi.c22
-rw-r--r--src/iem_ambi_sources.c17
-rw-r--r--src/iem_ambi_sources.h15
-rw-r--r--src/makefile_win12
-rw-r--r--src/makesource.sh65
7 files changed, 22 insertions, 225 deletions
diff --git a/src/Make.config.in b/src/Make.config.in
deleted file mode 100644
index 21cb481..0000000
--- a/src/Make.config.in
+++ /dev/null
@@ -1,28 +0,0 @@
-LIBNAME =iem_ambi
-
-PREFIX =@prefix@@PDLIBDIR@
-
-INSTALL_BIN=$(PREFIX)/extra
-INSTALL_DOC=$(PREFIX)/@REFERENCEPATH@$(LIBNAME)
-
-EXT = @EXT@
-DEFS = @DFLAGS@
-IFLAGS = -I. @INCLUDES@
-
-CC = @CC@
-LD = @LD@
-STRIP = @STRIP@
-STRIPFLAGS= @STRIPFLAGS@
-
-AFLAGS =
-LFLAGS = @LFLAGS@
-WFLAGS =
-
-TARNAME = $(LIBNAME)-@IEMAMBI_VERSION@.tgz
-
-# ICCFLAGS=-march=pentiumiii -axK
-Z_CFLAGS = $(IFLAGS) $(DEFS) -DPD $(WFLAGS) @CFLAGS@ $(CFLAGS)
-
-MAKEDEP_FLAGS = @MAKEDEP_FLAGS@
-
-LIBS = @LIBS@
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 9d90699..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,88 +0,0 @@
-default: all
-
-.PHONEY: default all everything dist \
- clean realclean distclean \
- install install-bin install-doc install-abs
-
-SOURCES=$(sort $(filter %.c, $(wildcard *.c)))
-
-ifeq (,$(findstring clean, $(MAKECMDGOALS)))
-Make.config: Make.config.in configure
- ./configure
-endif
-
-iem_ambi_sources.c iem_ambi_sources.h:
- sh ./makesource.sh
-
-configure: configure.ac
- autoconf
-
-## uaehh, here comes some magic
-## 1st we don't want depend and config-makefiles to be included on "clean"-targets
-
-ifeq (,$(findstring clean, $(MAKECMDGOALS)))
--include $(SOURCES:.c=.d)
-endif
-
--include Make.config
-
-## 2nd only generate depend-files when we have Make.config included
-## and thus MAKEDEP_FLAGS defined
-ifdef MAKEDEP_FLAGS
-## dependencies: as proposed by the GNU-make documentation
-## see http://www.gnu.org/software/make/manual/html_node/make_47.html#SEC51
-%.d: %.c
- @set -e; rm -f $@; \
- $(CPP) $(MAKEDEP_FLAGS) $(Z_CFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-endif
-
-.SUFFIXES: .$(EXT)
-
-TARGETS = $(SOURCES:.c=.o)
-
-
-all: $(LIBNAME)
- cp $(LIBNAME).$(EXT) ..
-
-$(LIBNAME): $(TARGETS) iem_ambi_sources.c iem_ambi_sources.h
- $(LD) $(LFLAGS) -o $(LIBNAME).$(EXT) *.o $(LIBS)
- $(STRIP) $(STRIPFLAGS) $(LIBNAME).$(EXT)
-
-$(TARGETS): %.o : %.c
- $(CC) $(Z_CFLAGS) -c -o $@ $*.c
-
-
-clean:
- -rm -f *.$(EXT) *.o
-
-realclean: clean
- -rm -f *~ _* config.*
- -rm -f *.d *.d.*
-
-distclean: realclean
- -rm -f Make.config ../*.$(EXT)
- -rm -f *.exp *.lib *.ncb \
- *.opt *.plg
- -rm -rf autom4te.cache/
-
-install: install-bin install-doc install-abs
-
-install-bin:
- -install -d $(INSTALL_BIN)
- -install -m 644 $(LIBNAME).$(EXT) $(INSTALL_BIN)
-
-install-doc:
- -install -d $(INSTALL_DOC)
- -install -m 644 ../examples/*.pd $(INSTALL_DOC)
-
-install-abs:
- -install -d $(INSTALL_BIN)
- -install -m 644 ../abs/*.pd $(INSTALL_BIN)
-
-dist: all realclean
- (cd ../..;tar czvf $(TARNAME) $(LIBNAME))
-
-everything: clean all install distclean
-
diff --git a/src/iem_ambi.c b/src/iem_ambi.c
index 7792620..7b06298 100644
--- a/src/iem_ambi.c
+++ b/src/iem_ambi.c
@@ -11,7 +11,6 @@ iem_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005
#include "m_pd.h"
#include "iemlib.h"
-#include "iem_ambi_sources.h"
static t_class *iem_ambi_class;
@@ -22,13 +21,24 @@ static void *iem_ambi_new(void)
return (x);
}
+void ambi_encode_setup(void);
+void ambi_decode_setup(void);
+void ambi_decode2_setup(void);
+void ambi_decode3_setup(void);
+void ambi_decode_cube_setup(void);
+void ambi_rot_setup(void);
+
/* ------------------------ setup routine ------------------------- */
-void iem_ambi_sources_setup(void);
void iem_ambi_setup(void)
{
- iem_ambi_sources_setup();
-
- post("iem_ambi (R-1.16) library loaded! (c) Thomas Musil 05.2005");
- post(" musil%ciem.at iem KUG Graz Austria", '@');
+ ambi_encode_setup();
+ ambi_decode_setup();
+ ambi_decode2_setup();
+ ambi_decode3_setup();
+ ambi_decode_cube_setup();
+ ambi_rot_setup();
+
+ post("iem_ambi (R-1.16) library loaded! (c) Thomas Musil 05.2005");
+ post(" musil%ciem.at iem KUG Graz Austria", '@');
}
diff --git a/src/iem_ambi_sources.c b/src/iem_ambi_sources.c
deleted file mode 100644
index fea4647..0000000
--- a/src/iem_ambi_sources.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* iem_ambi-setup autogenerated setup-file
- * generated by "./makesource.sh"
- * !! DO NOT MANUALLY EDIT !!
- */
-
-#include "iem_ambi_sources.h"
-
-void iem_ambi_sources_setup(void)
-{
- ambi_decode2_setup(); /* ambi_decode2.c */
- ambi_decode3_setup(); /* ambi_decode3.c */
- ambi_decode_setup(); /* ambi_decode.c */
- ambi_decode_cube_setup(); /* ambi_decode_cube.c */
- ambi_encode_setup(); /* ambi_encode.c */
- ambi_rot_setup(); /* ambi_rot.c */
-}
-
diff --git a/src/iem_ambi_sources.h b/src/iem_ambi_sources.h
deleted file mode 100644
index ae146b6..0000000
--- a/src/iem_ambi_sources.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* iem_ambi-setup autogenerated header-file
- * generated by "./makesource.sh"
- * !! DO NOT MANUALLY EDIT !!
- */
-
-#ifndef IEMAMBI_SOURCES_H__
-#define IEMAMBI_SOURCES_H__
-void ambi_decode2_setup(void); /* ambi_decode2.c */
-void ambi_decode3_setup(void); /* ambi_decode3.c */
-void ambi_decode_setup(void); /* ambi_decode.c */
-void ambi_decode_cube_setup(void); /* ambi_decode_cube.c */
-void ambi_encode_setup(void); /* ambi_encode.c */
-void ambi_rot_setup(void); /* ambi_rot.c */
-#endif /* IEMAMBI_SOURCES_H__ */
-
diff --git a/src/makefile_win b/src/makefile_win
index 70a1bdb..4293ecf 100644
--- a/src/makefile_win
+++ b/src/makefile_win
@@ -21,12 +21,12 @@ PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NOD
SRC = ambi_decode.c \
- ambi_decode2.c \
- ambi_decode3.c \
- ambi_decode_cube.c \
- ambi_encode.c \
- ambi_rot.c \
- iem_ambi.c
+ ambi_decode2.c \
+ ambi_decode3.c \
+ ambi_decode_cube.c \
+ ambi_encode.c \
+ ambi_rot.c \
+ iem_ambi.c
OBJ = $(SRC:.c=.obj)
diff --git a/src/makesource.sh b/src/makesource.sh
deleted file mode 100644
index 920742b..0000000
--- a/src/makesource.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-
-IEMAMBI_H=iem_ambi_sources.h
-IEMAMBI_C=iem_ambi_sources.c
-
-EGREP=egrep
-SED=sed
-LS=ls
-
-#################################
-## functions
-
-function head_h() {
- echo "/* iem_ambi-setup autogenerated header-file"
- echo " * generated by \"$0\""
- echo " * !! DO NOT MANUALLY EDIT !!"
- echo " */"
- echo
- echo "#ifndef IEMAMBI_SOURCES_H__"
- echo "#define IEMAMBI_SOURCES_H__"
-}
-
-function foot_h() {
- echo "#endif /* IEMAMBI_SOURCES_H__ */"
- echo ""
-}
-
-function head_c() {
- echo "/* iem_ambi-setup autogenerated setup-file"
- echo " * generated by \"$0\""
- echo " * !! DO NOT MANUALLY EDIT !!"
- echo " */"
- echo
- echo "#include \"$IEMAMBI_H\""
- echo
- echo "void iem_ambi_sources_setup(void)"
- echo "{"
-}
-
-function foot_c() {
- echo "}"
- echo
-}
-
-
-##################################
-## body
-
-head_h > $IEMAMBI_H
-head_c > $IEMAMBI_C
-
-for i in $(${LS} *.c | ${EGREP} -v "iem_ambi.*\.c")
-do
-## each c-file in iem_ambi needs to have an <file>_setup()-function
-## that calls all needed setup-functions
-## any non-alpha-numeric-character is replaced by "_"
-## e.g. "bla~.c" -> "bla__setup()"
- SETUPNAME=$(echo ${i%.c} | ${SED} -e 's/[^[:alnum:]]/_/g')_setup
- echo "void ${SETUPNAME}(void); /* $i */" >> $IEMAMBI_H
- echo " ${SETUPNAME}(); /* $i */" >> $IEMAMBI_C
-done
-
-foot_h >> $IEMAMBI_H
-foot_c >> $IEMAMBI_C
-