[Demudi-commits] r13 - / brutefir brutefir/branches brutefir/branches/upstream brutefir/branches/upstream/current
Free Ekanayaka
free-guest@haydn.debian.org
Sat, 30 Oct 2004 05:26:23 -0600
Author: free-guest
Date: 2004-10-30 05:25:56 -0600 (Sat, 30 Oct 2004)
New Revision: 13
Added:
brutefir/
brutefir/branches/
brutefir/branches/upstream/
brutefir/branches/upstream/current/
brutefir/branches/upstream/current/Makefile
brutefir/tags/
Log:
[svn-inject] Installing original source of brutefir
Added: brutefir/branches/upstream/current/Makefile
===================================================================
--- brutefir/branches/upstream/current/Makefile 2004-10-30 11:24:54 UTC (rev 12)
+++ brutefir/branches/upstream/current/Makefile 2004-10-30 11:25:56 UTC (rev 13)
@@ -0,0 +1,155 @@
+###################################
+# Where to install
+INSTALL_PREFIX = $(DESTDIR)/usr/local
+
+###################################
+# Where to find libraries, and their header files.
+LIBPATHS = -L/usr/local/lib
+INCLUDE = -I/usr/local/include
+ifdef FFTW_PATH
+LIBPATHS += -L$(FFTW_PATH)/lib
+INCLUDE += -I$(FFTW_PATH)/include
+endif
+
+###################################
+# FFTW3 libraries for single and double precision
+FFTW_LIB = -lfftw3 -lfftw3f
+
+###################################
+# Binaries
+FLEX = flex
+LD = ld
+CC = gcc
+AS = as
+
+###################################
+# Flags
+CC_WARN = -Wall -Wlong-long -Wpointer-arith -Wshadow \
+-Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes \
+-Wmissing-prototypes -Wmissing-declarations -Wnested-externs
+CC_FLAGS = $(DEFINE) -O2
+CC_FPIC = -fPIC
+LD_SHARED = -shared
+
+###################################
+# Objects and libs for targets
+BRUTEFIR_LIBS = $(FFTW_LIB) -lm
+BRUTEFIR_OBJS = brutefir.o fftw_convolver.o bfconf.o bfrun.o \
+emalloc.o shmalloc.o dai.o bfconf_lexical.o inout.o dither.o delay.o
+BRUTEFIR_IA32_OBJS = convolver_sse2.o convolver_sse.o \
+convolver_3dnow.o convolver_x87.o
+
+BFIO_FILE_OBJS = bfio_file.fpic.o
+
+BFIO_ALSA_LIBS = -lasound
+BFIO_ALSA_OBJS = bfio_alsa.fpic.o emalloc.fpic.o inout.fpic.o
+
+BFIO_OSS_OBJS = bfio_oss.fpic.o emalloc.fpic.o
+
+BFIO_JACK_LIBS = -ljack
+BFIO_JACK_OBJS = bfio_jack.fpic.o emalloc.fpic.o inout.fpic.o
+
+BFLOGIC_CLI_OBJS = bflogic_cli.fpic.o inout.fpic.o
+BFLOGIC_EQ_OBJS = bflogic_eq.fpic.o emalloc.fpic.o shmalloc.fpic.o
+
+BIN_TARGETS = brutefir
+LIB_TARGETS = cli.bflogic eq.bflogic file.bfio
+
+###################################
+# System-specific settings
+
+UNAME = $(shell uname)
+UNAME_P = $(shell uname -p)
+UNAME_M = $(shell uname -m)
+
+# Linux
+ifeq ($(UNAME),Linux)
+ifeq ($(UNAME_M),i386)
+BRUTEFIR_OBJS += $(BRUTEFIR_IA32_OBJS)
+endif
+ifeq ($(UNAME_M),i586)
+BRUTEFIR_OBJS += $(BRUTEFIR_IA32_OBJS)
+endif
+ifeq ($(UNAME_M),i686)
+BRUTEFIR_OBJS += $(BRUTEFIR_IA32_OBJS)
+endif
+BRUTEFIR_LIBS += -ldl
+LDMULTIPLEDEFS = -Xlinker --allow-multiple-definition
+# assume that we have alsa, osss and jack
+LIB_TARGETS += alsa.bfio
+LIB_TARGETS += oss.bfio
+LIB_TARGETS += jack.bfio
+endif
+
+# Solaris
+ifeq ($(UNAME),SunOS)
+CC_WARN = -Wall -Wlong-long -Wpointer-arith -Wshadow \
+-Wcast-qual -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations \
+-Wnested-externs
+ifeq ($(UNAME_P),sparc)
+CC_FLAGS += -Wa,-xarch=v8plus
+endif
+BRUTEFIR_LIBS += -lrt -ldl
+endif
+
+# FreeBSD
+ifeq ($(UNAME),FreeBSD)
+ifeq ($(UNAME_M),i386)
+BRUTEFIR_OBJS += $(BRUTEFIR_IA32_OBJS)
+endif
+# assume that we have oss
+LIB_TARGETS += oss.bfio
+endif
+
+TARGETS = $(BIN_TARGETS) $(LIB_TARGETS)
+
+###################################
+# Targets
+
+all: $(TARGETS)
+
+%.o: %.s
+ $(AS) -o $@ $<
+
+%.fpic.o: %.c
+ $(CC) -o $@ -c $(INCLUDE) $(CC_FPIC) $(CC_WARN) $(CC_FLAGS) $<
+
+%.o: %.c
+ $(CC) -o $@ -c $(INCLUDE) $(CC_WARN) $(CC_FLAGS) $<
+
+# special rule to avoid to get warnings from code generated by flex
+bfconf_lexical.o: bfconf_lexical.c
+ $(CC) -o $@ -c $(INCLUDE) $(CC_FLAGS) $<
+
+%.c: %.lex
+ $(FLEX) -o$@ $<
+
+brutefir: $(BRUTEFIR_OBJS)
+ $(CC) $(LIBPATHS) $(LDMULTIPLEDEFS) -o $@ $(BRUTEFIR_OBJS) $(BRUTEFIR_LIBS)
+
+alsa.bfio: $(BFIO_ALSA_OBJS)
+ $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_ALSA_OBJS) $(BFIO_ALSA_LIBS) -lc
+
+oss.bfio: $(BFIO_OSS_OBJS)
+ $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_OSS_OBJS) -lc
+
+jack.bfio: $(BFIO_JACK_OBJS)
+ $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_JACK_OBJS) $(BFIO_JACK_LIBS) -lc
+
+file.bfio: $(BFIO_FILE_OBJS)
+ $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_FILE_OBJS) -lc
+
+cli.bflogic: $(BFLOGIC_CLI_OBJS)
+ $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFLOGIC_CLI_OBJS) -lc
+
+eq.bflogic: $(BFLOGIC_EQ_OBJS)
+ $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFLOGIC_EQ_OBJS) -lc
+
+install: $(BIN_TARGETS) $(LIB_TARGETS)
+ install $(BIN_TARGETS) $(INSTALL_PREFIX)/bin
+ install $(LIB_TARGETS) $(INSTALL_PREFIX)/lib/brutefir
+
+clean:
+ rm -f *.core core bfconf_lexical.c $(BRUTEFIR_OBJS) $(BFIO_FILE_OBJS) \
+$(BFLOGIC_CLI_OBJS) $(BFLOGIC_EQ_OBJS) $(BFIO_ALSA_OBJS) $(BFIO_OSS_OBJS) \
+$(BFIO_JACK_OBJS) $(TARGETS)