diff options
Diffstat (limited to 'externals/grill/py')
-rw-r--r-- | externals/grill/py/config-pd-linux.txt | 4 | ||||
-rw-r--r-- | externals/grill/py/makefile.pd-linux | 35 |
2 files changed, 28 insertions, 11 deletions
diff --git a/externals/grill/py/config-pd-linux.txt b/externals/grill/py/config-pd-linux.txt index 16f65f6e..5b02d4f8 100644 --- a/externals/grill/py/config-pd-linux.txt +++ b/externals/grill/py/config-pd-linux.txt @@ -27,5 +27,5 @@ TARGDIR=./pd-linux # (leave blank to omit installation) INSTPATH=/usr/local/lib/pd/extra - - +# define for shared build +#FLEXT_SHARED=1 diff --git a/externals/grill/py/makefile.pd-linux b/externals/grill/py/makefile.pd-linux index 0c90892f..01c4b9c2 100644 --- a/externals/grill/py/makefile.pd-linux +++ b/externals/grill/py/makefile.pd-linux @@ -12,15 +12,31 @@ CONFIG=config-pd-linux.txt include $(CONFIG) -FLEXTLIB=$(FLEXTPATH)/flext_t.a # compiler+linker stuff INCLUDES=$(PDPATH) $(PYTHONINCLUDE) LIBPATH=$(PYTHONLIB) FLAGS=-DFLEXT_SYS=2 -DFLEXT_THREADS -CFLAGS=-O6 -mcpu=pentiumpro -#CFLAGS=-g -LIBS=m util python$(PYTHONVER) +CFLAGS=-O2 $(UFLAGS) +LIBS=stdc++ python$(PYTHONVER) + + +ifdef FLEXT_SHARED +CFLAGS+=-shared -DFLEXT_SHARED +LIBPATH+=$(FLEXTPATH) +LIBFLEXT=-lflext + +ifeq ($(CXX),icc) +LDFLAGS+=-i_dynamic +else +LDFLAGS+=-Wl,-Bdynamic +endif + +else + +LIBFLEXT=$(FLEXTPATH)/libflext_t.a + +endif # --------------------------------------------- @@ -37,21 +53,22 @@ TARGET=$(TARGDIR)/$(NAME).pd_linux # default target all: $(TARGDIR) $(TARGET) -$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTLIB) $(CONFIG) +$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(MAKEFILE) $(CONFIG) touch $@ $(TARGDIR): - mkdir $(TARGDIR) + -mkdir $(TARGDIR) $(TARGDIR)/%.o : $(SRCDIR)/%.cpp $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@ -$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(FLEXTLIB) - $(CXX) -shared $^ $(patsubst %,-L%,$(LIBPATH)) $(patsubst %,-l%,$(LIBS)) -o $@ +$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) + $(CXX) -shared $(LDFLAGS) -o $@ $^ $(patsubst %,-L%,$(LIBPATH)) $(LIBFLEXT) $(patsubst %,-l%,$(LIBS)) + strip --strip-unneeded $@ chmod 755 $@ $(INSTPATH): - mkdir $(INSTDIR) + -mkdir $(INSTDIR) install:: $(INSTDIR) |