Commit baaf5864 authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@237 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 778de969
make -f makefile.pd-cygwin
. config-pd-cygwin.txt
make -f makefile.pd-cygwin &&
{
if [ $INSTALL = "yes" ]; then
make -f makefile.pd-cygwin install
fi
}
. config-pd-linux.txt
make -f makefile.pd-linux &&
{
echo Now install as root
su -c "make -f makefile.pd-linux install"
if [ $INSTALL = "yes" ]; then
echo Now install as root
su -c "make -f makefile.pd-linux install"
fi
}
@echo --- Building flext with MS Visual C++ ---
nmake -f makefile.msvc
nmake -f makefile.pd-msvc clean
nmake -f makefile.pd-msvc
# flext - C++ layer for Max/MSP and pd (pure data) externals
# Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
#
# where is PD?
PDPATH=c:\programme\audio\pd
# where is BorlandC++?
BCCPATH=c:\programme\prog\bcc55
# build directory for flext libraries?
OUTPATH=.\pd-bcc
# should the flext stuff be installed? (yes/no)
INSTALL=yes
# where should flext libraries be installed?
INSTDIR=$(PDPATH)\flext
# flext - C++ layer for Max/MSP and pd (pure data) externals
# Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
#
# where is PD?
PDPATH=/cygdrive/c/programme/audio/pd
# where should flext libraries be built?
TARGDIR=./pd-cygwin
# should the flext stuff be installed? (yes/no)
INSTALL=yes
# where should flext libraries be installed?
INSTDIR=${PDPATH}/flext
# flext - C++ layer for Max/MSP and pd (pure data) externals
# Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
#
# where are the PD header files?
PDPATH=/usr/local/include
# where should flext libraries be built?
TARGDIR=./pd-linux
# should the flext stuff be installed? (yes/no)
INSTALL=yes
# where should flext libraries be installed?
INSTDIR=/usr/local/lib/pd/flext
# flext - C++ layer for Max/MSP and pd (pure data) externals
# Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
#
# where is PD?
PDPATH=c:\programme\audio\pd
# where is MS VC++?
MSVCPATH="c:\programme\prog\microsoft visual studio\VC98"
# where should flext libraries be built?
# object files will be placed in subfolders
OUTPATH=".\pd-msvc"
# should the flext stuff be installed? (yes/no)
INSTALL=yes
# where should flext libraries be installed?
INSTDIR=$(PDPATH)\flext
......@@ -4,61 +4,90 @@
# ----- for internal use ----------------------
#
# paths to adjust
MSVCPATH="c:\programme\prog\microsoft visual studio\VC98" ### EDIT! ##
PDPATH=c:\programme\audio\pd ### EDIT! ##
!include config-pd-msvc.txt
# source files
SOURCE=source
# includes
INCPATH=/I$(MSVCPATH)\include /I$(PDPATH)\src /Isource
INCPATH=/I$(MSVCPATH)\include /I$(PDPATH)\src /I$(SOURCE)
# compiler definitions and flags
DEFS=-DPD -DNT
DEFS=/DPD /DNT
CFLAGS= /G6 /GD /GR /Ox
CFLAGS=/GR /GD /G6
OFLAGS=/Ox
DFLAGS=/Od /Zi
TARGET=pdwin # appendix to lib name
!ifdef FLEXT_THREADS
DEFS=$(DEFS) /DFLEXT_THREADS
!ifndef _DEBUG
CFLAGS=$(CFLAGS) $(OFLAGS) /MT
OBJPATH=t
!else
CFLAGS=$(CFLAGS) $(DFLAGS) /MTd
OBJPATH=td
!endif
!else
!ifndef _DEBUG
CFLAGS=$(CFLAGS) $(OFLAGS) /ML
OBJPATH=s
!else
CFLAGS=$(CFLAGS) $(DFLAGS) /MLd
OBJPATH=sd
!endif
!endif
# the rest can stay untouched
# ----------------------------------------------
# all the source files from the package
SRCS=flbase.cpp flext.cpp flbuf.cpp fldsp.cpp fllib.cpp flxlet.cpp flsetup.cpp flutil.cpp flatom.cpp
HDRS=flstdc.h flbase.h flclass.h fldefs.h flext.h
SRCS=flbase.cpp flext.cpp flbuf.cpp fldsp.cpp fllib.cpp flxlet.cpp flsetup.cpp flutil.cpp flatom.cpp flthr.cpp
HDRS=flstdc.h flbase.h flclass.h fldefs.h flext.h flthr.h fldsp.h
IHDRS=flinternal.h
!ifdef FLEXT_THREADS
DEFS=$(DEFS) -DFLEXT_THREADS
!endif
#default target
all: $(OUTPATH)\$(NAME)-$(TARGET).lib
# remove build
clean:
-del /s /q $(OUTPATH) > nul
rmdir $(OUTPATH)
-cd $(OUTPATH)
-del /s /q $(OBJPATH) > nul
-rmdir $(OBJPATH)
-cd ..
-del /q $(OUTPATH)\$(NAME)-$(TARGET).lib > nul
-rmdir $(OUTPATH)
# -----------------------------------------------
OBJS= $(SRCS:.cpp=.obj)
{source\}.cpp.obj:
{$(SOURCE)\}.cpp.obj:
@-if not exist $(OUTPATH) mkdir $(OUTPATH)
cl /c $(CFLAGS) $(DEFS) $(INCPATH) /Fo$(OUTPATH)\$@ $<
$(OUTPATH)\$(NAME)-$(TARGET).lib: $(OBJS)
@cd $(OUTPATH)
lib /OUT:$(@F) $**
@-if not exist $(OBJPATH) mkdir $(OBJPATH)
@cd ..
cl /c $(CFLAGS) $(DEFS) $(INCPATH) /Fo$(OUTPATH)\$(OBJPATH)\$@ $<
$(OUTPATH)\$(NAME)-$(TARGET).lib: $(OBJS)
@cd $(OUTPATH)\$(OBJPATH)
lib /OUT:..\$(NAME)-$(TARGET).lib $**
@cd ..\..
!ifdef INSTALL
!if "$(INSTALL)" == "yes"
@-if not exist $(OBJPATH) mkdir $(INSTDIR)
copy $(OUTPATH)\$(NAME)-$(TARGET).lib $(INSTDIR) > nul
copy $(SOURCE)\*.h $(INSTDIR) > nul
!endif
!endif
......@@ -11,18 +11,15 @@
#
# ---------------------------------------------
NAME=flext
TARGET=pdwin # appendix to lib name
!include config-pd-bcc.txt
# where to put the build
OUTPATH=.\bcc
SOURCE=source
# paths
BCCPATH=c:\programme\prog\bcc55 ### EDIT! ##
PDPATH=c:\programme\audio\pd ### EDIT! ##
NAME=flext
TARGET=pdwin # appendix to lib name
# includes
INCPATH=-I$(BCCPATH)\include -I$(PDPATH)\src -Isource
INCPATH=-I$(BCCPATH)\include -I$(PDPATH)\src -I$(SOURCE)
# compiler definitions and flags
DEFS=-DPD -DNT
......@@ -51,9 +48,9 @@ clean:
OBJS= $(SRCS:.cpp=.obj)
.PATH.obj=$(OUTPATH)
#.PATH.obj=$(OUTPATH)
{source}.cpp.obj:
{$(SOURCE)}.cpp.obj:
bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(OUTPATH) $<
$(OUTPATH):
......@@ -63,7 +60,17 @@ $(OUTPATH)\$(NAME)-$(TARGET).lib:: $(OUTPATH)
$(OUTPATH)\$(NAME)-$(TARGET).lib:: $(OBJS)
@-del "$<"
tlib "$<" +$(**: = +)
cd $(OUTPATH)
tlib "..\$<" +$(**: = +)
cd ..
!ifdef INSTALL
!if "$(INSTALL)" == "yes"
@-if not exist $(INSTDIR) mkdir $(INSTDIR)
copy $< $(INSTDIR) >nul
copy $(SOURCE)\*.h $(INSTDIR) >nul
!endif
!endif
......
......@@ -11,24 +11,18 @@
# compiling for threaded usage is not supported
#
## EDIT ZONE ##################################
include config-pd-cygwin.txt
# pd path
PDPATH=c:/programme/audio/pd/src
###############################################
# where to build (temporary)
TARGDIR=./pd-cygwin
# compiler+linker stuff
INCLUDES=$(PDPATH)
INCLUDES=$(PDPATH)/src
FLAGS=-DPD -DNT
CFLAGS=-O6 -mcpu=pentiumpro
CFLAGS_D=-mcpu=pentiumpro -g
CFLAGS_T=-DFLEXT_THREADS
LIBS=
INSTDIR=$(PDPATH)/flext
# ----------------------------------------------
# the rest can stay untouched
......@@ -37,20 +31,20 @@ LIBS=
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 flatom.cpp
HDRS=flstdc.h flbase.h flclass.h fldefs.h flext.h
SRCS=flbase.cpp flext.cpp flbuf.cpp fldsp.cpp fllib.cpp flxlet.cpp flsetup.cpp flutil.cpp flatom.cpp flthr.cpp
HDRS=flstdc.h flbase.h flclass.h fldefs.h flext.h fldsp.h flthr.h
IHDRS=flinternal.h
MAKEFILE=makefile.pd-cygwin
TARGET=$(TARGDIR)/$(NAME).lib
TARGET_D=$(TARGDIR)/$(NAME)_d.lib
TARGET_T=$(TARGDIR)/$(NAME)_t.lib
TARGET_TD=$(TARGDIR)/$(NAME)_td.lib
TARGET=$(TARGDIR)/$(NAME)-pdwin.lib
TARGET_D=$(TARGDIR)/$(NAME)_d-pdwin.lib
TARGET_T=$(TARGDIR)/$(NAME)_t-pdwin.lib
TARGET_TD=$(TARGDIR)/$(NAME)_td-pdwin.lib
all: $(TARGDIR) $(TARGET) $(TARGET_D) # $(TARGET_T) $(TARGET_TD)
$(TARGDIR):
mkdir $(TARGDIR)
-mkdir $(TARGDIR)
$(SRCS): $(HDRS) $(IHDRS) $(MAKEFILE)
touch $@
......@@ -62,10 +56,10 @@ $(TARGDIR)/%.do : source/%.cpp
$(CXX) -c $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(TARGDIR)/%.to : source/%.cpp
$(CXX) -c $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(CXX) -c $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(TARGDIR)/%.tdo : source/%.cpp
$(CXX) -c $(CFLAGS_T) $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
ar rc $@ $^
......@@ -83,10 +77,18 @@ $(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
ar rc $@ $^
chmod 755 $@
.PHONY: clean
.PHONY: clean install
clean:
rm -f $(TARGDIR)/*.o $(TARGET) $(TARGET_D)
$(INSTDIR):
-mkdir $(INSTDIR)
install:: $(INSTDIR)
install:: $(TARGET) $(TARGET_D) $(patsubst %,source/%,$(HDRS)) # $(TARGET_T) $(TARGET_TD)
cp $^ $(INSTDIR)
......
......@@ -8,18 +8,7 @@
# to install (as root), do "make -f makefile.pd-linux install"
#
## EDIT ZONE ##################################
# pd path
PDPATH=/usr/local/include
# where to install
INSTDIR=/usr/local/lib/pd/flext
###############################################
# where to build (temporary)
TARGDIR=./pd-linux
include config-pd-linux.txt
# compiler+linker stuff
INCLUDES=$(PDPATH)
......@@ -63,10 +52,10 @@ $(TARGDIR)/%.do : source/%.cpp
$(CXX) -c $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(TARGDIR)/%.to : source/%.cpp
$(CXX) -c $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(CXX) -c $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(TARGDIR)/%.tdo : source/%.cpp
$(CXX) -c $(CFLAGS_T) $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) source) $< -o $@
$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
ar rc $@ $^
......@@ -84,6 +73,11 @@ $(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
ar rc $@ $^
chmod 755 $@
.PHONY: clean install
clean:
rm -f $(TARGDIR)/*.o $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD)
$(INSTDIR):
mkdir $(INSTDIR)
......@@ -94,10 +88,6 @@ install:: $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(patsubst %,source/%,
chmod 755 $(patsubst %,$(INSTDIR)/%,$(notdir $^))
chown root.users $(patsubst %,$(INSTDIR)/%,$(notdir $^))
.PHONY: clean
clean:
rm -f $(TARGDIR)/*.o $(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD)
......
......@@ -4,18 +4,28 @@
# Makefile for MSVC++
#
#
# IMPORTANT: Adjust all paths in makefile-inc.msvc
# IMPORTANT: Adjust some of the paths also in makefile-inc.msvc
#
# usage: make -f makefile.msvc
# usage: make -f makefile.pd-msvc
#
# ---------------------------------------------
# ---------------------------------------------------------------
all: flext flext_t
!include config-pd-msvc.txt
all: flext flext_t flext_d flext_td
flext:
nmake /f makefile-inc.msvc NAME=$* OUTPATH=".\msvc"
nmake /f make-inc.pd-msvc NAME=$*
flext_d:
nmake /f make-inc.pd-msvc NAME=$* _DEBUG=1
flext_t:
nmake /f makefile-inc.msvc NAME=$* OUTPATH=".\msvc-t" FLEXT_THREADS=
nmake /f make-inc.pd-msvc NAME=$* FLEXT_THREADS=1
flext_td:
nmake /f make-inc.pd-msvc NAME=$* FLEXT_THREADS=1 _DEBUG=1
clean:
nmake /f make-inc.pd-msvc clean
......@@ -39,16 +39,15 @@ The package should at least compile (and is tested) with the following compilers
pd - Windows:
-------------
o Borland C++ 5.5 (free): edit & run "make -f makefile.bcc"
o Borland C++ 5.5 (free): edit "paths-pd-bcc.txt" & run "build-pd-bcc.bat"
o Microsoft Visual C++ 6: use the "flext.dsp" project file
> you have to edit the pd path in the project properties/C-C++/preprocessor tab!
o Microsoft Visual C++ 6: edit "paths-pd-msvc.txt" & run "build-pd-msvc.bat"
o Cygwin: edit "makefile.pd-cygwin" & run "sh build-pd-cygwin.sh"
o Cygwin: edit "paths-pd-cygwin.txt" & run "sh build-pd-cygwin.sh"
pd - linux:
-----------
o GCC: edit "makefile.pd-linux" & run "sh build-pd-linux.sh"
o GCC: edit "paths-pd-linux.txt" & run "sh build-pd-linux.sh"
Max/MSP - MacOS:
----------------
......@@ -82,6 +81,7 @@ Version history:
0.3.1:
- added some more functionality to the AtomList class
- fixed forgotten Sleep implementation in pd@unix
- reorganized file structure and make procedures
0.3.0:
- added CYGWIN support
......
......@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief Definitions for handling the t_atom type and lists thereof.
*/
#include <flext.h>
#include "flext.h"
flext_base::AtomList::AtomList(int argc,const t_atom *argv):
lst(NULL),cnt(0)
......
......@@ -19,7 +19,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef __FLEXT_BASE_H
#define __FLEXT_BASE_H
#include <flstdc.h>
#include "flstdc.h"
#ifdef FLEXT_THREADS
#include <pthread.h>
......
......@@ -8,7 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#include <flext.h>
#include "flext.h"
#ifdef MAXMSP
#include "flmspbuffer.h" // include inofficial buffer.h
......
......@@ -18,7 +18,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#define __FLCLASS_H
//! include the header file declaring the base classes
#include <flbase.h>
#include "flbase.h"
#ifdef _MSC_VER
#pragma warning(disable: 4786)
......
......@@ -8,8 +8,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#include <flext.h>
#include <flinternal.h>
#include "flext.h"
#include "flinternal.h"
#include <string.h>
// === flext_dsp ==============================================
......
......@@ -18,7 +18,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#define __FLDSP_H
//! include the header file declaring the base classes
#include <flext.h>
#include "flext.h"
// === flext_dsp ==================================================
......
......@@ -8,8 +8,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
#include <flext.h>
#include <flinternal.h>
#include "flext.h"
#include "flinternal.h"
#include <string.h>
#include <stdarg.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment