Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
logiconcepts819 committed Apr 14, 2014
1 parent aba58a6 commit 1ff29d4
Show file tree
Hide file tree
Showing 12 changed files with 2,751 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.unix
@@ -0,0 +1,4 @@
PLATFORM_CFLAGS = -fPIC -DPIC -nostartfiles
PLATFORM_EXT = .so
RES_FILE =
include generic.mk
12 changes: 12 additions & 0 deletions Makefile.win
@@ -0,0 +1,12 @@
PLATFORM_CFLAGS =
PLATFORM_EXT = .dll
RC_FILE = mbandcomp.rc
RES_FILE = mbandcomp.res

WINDRES = windres
WINDRES_FLAGS = -O coff

include generic.mk

$(RES_FILE): $(RC_FILE)
$(WINDRES) $(WINDRES_FLAGS) $(RC_FILE) -o $(RES_FILE)
12 changes: 12 additions & 0 deletions Makefile.win32
@@ -0,0 +1,12 @@
PLATFORM_CFLAGS = -m32
PLATFORM_EXT = .dll
RC_FILE = mbandcomp.rc
RES_FILE = mbandcomp.res

WINDRES = windres
WINDRES_FLAGS = -O coff -F pe-i386

include generic.mk

$(RES_FILE): $(RC_FILE)
$(WINDRES) $(WINDRES_FLAGS) $(RC_FILE) -o $(RES_FILE)
58 changes: 58 additions & 0 deletions README.md
Expand Up @@ -2,3 +2,61 @@ ladspa-mbandcomp
================

A LADSPA plugin for multiband compression, which uses Linkwitz-Riley filters for the frequency splits. This is an extension of my compressor plugin implementation in VLC.

#Building ladspa-mbandcomp

##MinGW in Windows

If you wish to build a 64-bit plugin, execute the following in an msys shell:

```
make -f Makefile.win
```
If you wish to build a 32-bit plugin, execute the following:
```
make -f Makefile.win32
```

##MinGW in Linux

If you wish to build a 64-bit plugin, execute the following in a terminal:
```
./win64make
```
If you wish to build a 32-bit plugin, execute the following:
```
./win32make
```
If gcc and windres go by different filenames than what are used in the
win32make and win64make scripts, you can override the CC and WINDRES variables
with the correct filenames. For example, for the old version of MinGW, one
would run
```
CC=i586-mingw32msvc-gcc WINDRES=i586-mingw32msvc-windres ./win32make
```

##Linux

Execute the following in a terminal:
```
make -f Makefile.unix
```

#Installation

##Windows

Set the LADSPA_PATH environment variable with all possible paths you wish to
designate for LADSPA plugins. For example, on Windows 64-bit systems, one may
want to designate a 32-bit directory and a 64-bit directory for LADSPA plugins,
so the value of LADSPA_PATH would be something like
```
C:\Program Files\LADSPA;C:\Program Files (x86)\LADSPA
```
After setting the environment variable, copy the compiled DLL to the
appropriate location(s).

##Linux

Copy the compiled .so to a location that is recognized by LADSPA hosts such as
/usr/lib/ladspa or /usr/local/lib/ladspa.
45 changes: 45 additions & 0 deletions generic.mk
@@ -0,0 +1,45 @@
CC = gcc
ifeq ($(DEBUG),0)
DBGFLAGS = -O3
else ifeq ($(strip $(DEBUG)),)
DBGFLAGS = -O3
else
DBGFLAGS = -g3 -O0
endif
CFLAGS = --std=gnu99 -shared $(PLATFORM_CFLAGS) $(DBGFLAGS) -W -Wall
CD = cd
LDFLAGS = -lm
INSTALL = install
INSTALLFLAGS = -m0755
INSTALLROOT = /usr/local
INSTALLDIR = $(DESTDIR)$(INSTALLROOT)/lib/ladspa
MKDIR = mkdir
MKDIRFLAGS = -p
RM = rm
RMFLAGS = -Rf
RMDIR = rmdir
TRUE = true

TARGET = mbandcomp$(PLATFORM_EXT)
CFILES = mbandcomp.c linkwitzriley.c

.PHONY: all
all: $(TARGET)

$(TARGET): $(CFILES) $(RES_FILE)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

.PHONY: clean
clean:
$(RM) $(RMFLAGS) $(RES_FILE) $(TARGET)

.PHONY: install
install:
$(MKDIR) $(MKDIRFLAGS) $(INSTALLDIR) && \
$(INSTALL) $(INSTALLFLAGS) $(TARGET) $(INSTALLDIR)

.PHONY: uninstall
uninstall:
$(CD) $(INSTALLDIR) 2>/dev/null && { $(RM) $(RMFLAGS) $(TARGET) && \
{ $(RMDIR) $(INSTALLDIR) 2>/dev/null || $(TRUE); }; } || \
$(TRUE)

0 comments on commit 1ff29d4

Please sign in to comment.