# flext tutorial examples # # Makefile for gcc @ linux # # usage: make -f makefile.pd-linux # # ----------------------------------------------------- # pd path PDPATH=/usr/local/include # where to build TARGDIR=./pd-linux # flext stuff ### EDIT! ### FLEXTPATH=/usr/local/lib/pd/flext FLEXTLIB=$(FLEXTPATH)/flext_t.a # take threaded library for all # where to install INSTDIR=/usr/local/lib/pd/flext/tutorial # compiler+linker stuff ### EDIT! ### INCLUDES=$(PDPATH) LIBPATH= FLAGS=-DPD -DFLEXT_THREADS CFLAGS=-O6 -mcpu=pentiumpro LIBS=m # the rest can stay untouched # ---------------------------------------------- # all the source files from the package EXAMPLES=simple1 simple2 simple3 adv1 signal1~ signal2~ thread1 thread2 TARGETS=$(patsubst %,$(TARGDIR)/%.pd_linux,$(EXAMPLES)) # default target all: $(TARGDIR) $(TARGETS) $(TARGDIR)/%~.pd_linux : $(TARGDIR)/%.pd_linux mv $^ $@ $(SRCS): $(HDRS) touch $@ $(TARGDIR): mkdir $(TARGDIR) $(TARGDIR)/%.o : %/main.cpp $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@ $(TARGDIR)/%.pd_linux : $(TARGDIR)/%.o $(FLEXTLIB) $(CXX) $(LDFLAGS) -shared $(patsubst %,-L%,$(LIBPATH)) $^ $(patsubst %,-l%,$(LIBS)) -o $@ chmod 755 $@ .PHONY: clean clean: rm -f $(TARGDIR)/*.o $(TARGETS)