# flext - C++ layer for Max/MSP and pd (pure data) externals # Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net) # # Makefile for gcc @ linux # # usage: # to build run "make -f makefile.pd-linux" # to install (as root), do "make -f makefile.pd-linux install" # ## EDIT ZONE ################################## # pd path PDPATH=/usr/local/include # where to install INSTDIR=/usr/lib/pd/flext ############################################### # where to build (temporary) TARGDIR=./pd-linux # compiler+linker stuff INCLUDES=$(PDPATH) FLAGS=-DPD CFLAGS=-O6 -mcpu=pentiumpro CFLAGS_D=-mcpu=pentiumpro -g CFLAGS_T=-DFLEXT_THREADS LIBS= # ---------------------------------------------- # the rest can stay untouched # ---------------------------------------------- NAME=flext # all the source files from the package SRCS=flbase.cpp flext.cpp flbuf.cpp fldsp.cpp fllib.cpp flxlet.cpp flsetup.cpp flutil.cpp HDRS=flstdc.h flbase.h flclass.h fldefs.h flext.h flthr.h fldsp.h IHDRS=flinternal.h MAKEFILE=makefile.pd-linux TARGET=$(TARGDIR)/$(NAME).a TARGET_D=$(TARGDIR)/$(NAME)_d.a TARGET_T=$(TARGDIR)/$(NAME)_t.a TARGET_TD=$(TARGDIR)/$(NAME)_td.a all: $(TARGDIR) $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGDIR): mkdir $(TARGDIR) $(SRCS): $(HDRS) $(IHDRS) $(MAKEFILE) touch $@ $(TARGDIR)/%.o : %.cpp $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) .) $< -o $@ $(TARGDIR)/%.do : %.cpp $(CXX) -c $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) .) $< -o $@ $(TARGDIR)/%.to : %.cpp $(CXX) -c $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) .) $< -o $@ $(TARGDIR)/%.tdo : %.cpp $(CXX) -c $(CFLAGS_T) $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) .) $< -o $@ $(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) ar rc $@ $^ chmod 755 $@ $(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS)) ar rc $@ $^ chmod 755 $@ $(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.to,$(SRCS)) ar rc $@ $^ chmod 755 $@ $(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS)) ar rc $@ $^ chmod 755 $@ $(INSTDIR): mkdir $(INSTDIR) install:: $(INSTDIR) install:: $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(HDRS) cp $^ $(INSTDIR) chown root.root $(patsubst %,$(INSTDIR)/%,$(notdir $^)) .PHONY: clean clean: rm -f $(TARGDIR)/*.o $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD)