Re: [linux-audio-dev] compiling LADSPA for Mac OS X

From: James McDermott <jamesmichaelmcdermott@email-addr-hidden>
Date: Sun Apr 10 2005 - 22:38:01 EEST

Hi Taybin,

the installer works fine here! Very nice. (I need to be able to
compile plugins and a host by hand though ;)

For the record, I got most of the sdk to compile after some
experimentation with flags. The listplugins program still fails to
compile, with this error:

cc -I. -I/usr/include/ppc -Wall -Werror -O3 -fPIC -c -o search.o search.c
In file included from search.c:14:
/usr/include/unistd.h:236: error: parse error before '*' token
make: *** [search.o] Error 1

When the compiler reports parse errors in the standard library, that's
when I give up!

But the plugins and the applyplugin and analyseplugin programs are
working fine, and the make test target works after editing out the
listplugin line, and changing 'play' to 'sndfile-play'. Next up, DSSI!

Here are the changes I made to the compilation targets:

#############################################################
#
# GENERAL
#

# jmmcd - added /usr/include/ppc to find endian.h
INCLUDES = -I. -I/usr/include/ppc
LIBRARIES = -ldl -lm

# jmmcd - added different flags for programs and plugins, and used
them later on.
PLUGLDFLAGS = -flat_namespace -undefined suppress -bundle -lbundle1.o -lmx -lm
CXXLINKFLAGS = -flat_namespace -undefined suppress -bundle -lbundle1.o
-lmx -lm -nostartfiles
CFLAGS = $(INCLUDES) -Wall -Werror -O3 -fPIC
CXXFLAGS = $(CFLAGS)
PLUGINS = ../plugins/amp.so \
                        ../plugins/delay.so \
                        ../plugins/filter.so \
                        ../plugins/noise.so \
                        ../plugins/sine.so
PROGRAMS = ../bin/analyseplugin \
                        ../bin/applyplugin \
# ../bin/listplugins
CC = cc
CPP = c++

##############################################################
#
# RULES TO BUILD PLUGINS FROM C OR C++ CODE
#

../plugins/%.so: plugins/%.c ladspa.h
        $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
        $(LD) $(PLUGLDFLAGS) -o ../plugins/$*.so plugins/$*.o

../plugins/%.so: plugins/%.cpp ladspa.h
        $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
        $(CPP) $(CXXLINKFLAGS) -o ../plugins/$*.so plugins/$*.o

###############################################################
Received on Mon Apr 11 00:15:17 2005

This archive was generated by hypermail 2.1.8 : Mon Apr 11 2005 - 00:15:18 EEST