Commit 5b38165a authored by thomas's avatar thomas
Browse files

updated build system

git-svn-id: https://svn.grrrr.org/ext/trunk@930 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent b0bf2023
......@@ -42,20 +42,20 @@ TARGETTYPE=single
##############################
# flext-specific make stuff
!include $(BUILDPATH)bmake.inc
!include $(BUILDPATH)bmake-$(BUILDCLASS).inc
!include $(BUILDPATH)bmake.inc
##############################
# platform-specific make stuff
!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\bmake-$(COMPILER).inc
!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\bmake-$(COMPILER)-$(BUILDCLASS).inc
!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\bmake-$(COMPILER).inc
##############################
# general make stuff
!include $(BUILDPATH)$(PLATFORM)\bmake-$(COMPILER).inc
!include $(BUILDPATH)$(PLATFORM)\bmake-$(COMPILER)-$(BUILDCLASS).inc
!include $(BUILDPATH)$(PLATFORM)\bmake-$(COMPILER).inc
......@@ -42,20 +42,20 @@ endif
##############################
# flext-specific definitions
include $(BUILDPATH)gnumake.inc
include $(BUILDPATH)gnumake-$(BUILDCLASS).inc
include $(BUILDPATH)gnumake.inc
##############################
# platform-specific make stuff
include $(BUILDPATH)$(PLATFORM)/$(RTSYS)/gnumake-$(COMPILER).inc
include $(BUILDPATH)$(PLATFORM)/$(RTSYS)/gnumake-$(COMPILER)-$(BUILDCLASS).inc
include $(BUILDPATH)$(PLATFORM)/$(RTSYS)/gnumake-$(COMPILER).inc
##############################
# general make stuff
include $(BUILDPATH)$(PLATFORM)/gnumake-$(COMPILER).inc
include $(BUILDPATH)$(PLATFORM)/gnumake-$(COMPILER)-$(BUILDCLASS).inc
include $(BUILDPATH)$(PLATFORM)/gnumake-$(COMPILER).inc
##############################################
TARGETPATH=$(OUTPATH)/$(OUTSUB)
TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT)
##############################################
LDFLAGS += -shared -Wl,-x
##############################################
......@@ -15,10 +10,3 @@ else
CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
##############################################
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
COBJS=$(patsubst %.c,$(TARGETPATH)/%.o,$(filter %.c,$(SRCS)))
CPPOBJS=$(patsubst %.cpp,$(TARGETPATH)/%.opp,$(filter %.cpp,$(SRCS)))
......@@ -4,13 +4,13 @@ PDPATH=/usr/local/src/pd
###############################################################
# where do/should the flext headers reside/be built?
FLEXTINC=/usr/local/lib/pd/include
FLEXTINC=/usr/local/include/flext
# where do/should the flext static libraries reside/be built?
FLEXTLIB=/usr/local/lib/pd/flext
FLEXTLIB=/usr/local/lib
# where do/should the flext shared libraries reside/be built?
FLEXTSHLIB=/usr/local/lib
FLEXTSHLIB=$(FLEXTLIB)
###############################################################
......
# build class specific settings
INCPATH += -I$(FLEXTINC)
LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
LIBS += -l$(FLEXTNAME)
##############################################
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS)))
CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS)))
##############################################
# default target
_build_: $(TARGET)
$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
touch $@
$(OBJPATH):
-mkdir -p $@
$(TARGETPATH):
-mkdir -p $@
$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(OBJPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) :: $(OBJPATH) $(TARGETPATH)
$(TARGET) :: $(COBJS) $(CPPOBJS)
$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
chmod 755 $@
##############################################
_clean_:
rm $(COBJS) $(CPPOBJS) $(TARGET)
##############################################
$(INSTPATH):
-mkdir -p $@
_install_:: $(INSTPATH)
install $(TARGET) $(INSTPATH)
ifndef FLEXTBUILD
INCPATH += -I$(FLEXTPATH)
LIBPATH += -L$(FLEXTPATH)
LIBS+=$(FLEXTPATH)/$(FLEXTNAME).a
endif
LDFLAGS += -Wl,-x -framework ApplicationServices -framework vecLib -dynamiclib -dynamic
##############################################
ifndef DEBUG
CFLAGS += -g -D_DEBUG
else
CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
##############################################
ifdef FLEXTBUILD
OUTNAME=$(FLEXTNAME)
ifdef SHARED
EXT=dylib
else
EXT=a
BUILDLIB=1
endif
else
OUTNAME=$(NAME)
endif
##############################################
OBJPATH=$(OUTPATH)/$(OUTSUB)
ifdef FLEXTBUILD
TARGETPATH=$(OBJPATH)
TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT)
else
TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS
TARGET=$(TARGETPATH)/$(OUTNAME)
endif
##############################################
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS)))
CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS)))
# default target
_all_: $(TARGET)
$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
touch $@
$(OBJPATH):
-mkdir -p $@
$(TARGETPATH):
-mkdir -p $@
$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(OBJPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) :: $(OBJPATH) $(TARGETPATH)
$(TARGET) :: $(COBJS) $(CPPOBJS)
ifdef BUILDLIB
libtool -static -o $@ $(COBJS) $(CPPOBJS)
else
# $(CXX) $(LDFLAGS) $(LIBPATH) -dylib_install_name $(INSTPATH)/$(notdir $@) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
chmod 755 $@
endif
##############################################
_clean_:
rm $(COBJS) $(CPPOBJS) $(TARGET)
##############################################
$(INSTPATH):
-mkdir -p $@
$(FLEXTPATH):
-mkdir -p $@
_install_:: $(INSTPATH) $(FLEXTPATH)
_install_:: $(TARGET)
ifdef FLEXTBUILD
cp $(TARGET) $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTPATH)
else
install $(TARGET) $(INSTPATH)
endif
ifndef FLEXTBUILD
INCPATH += -I$(FLEXTPATH)
LIBPATH += -L$(FLEXTPATH)
LIBS+=$(FLEXTPATH)/$(FLEXTNAME).a
endif
LDFLAGS += -Wl,-x -framework ApplicationServices -framework vecLib -dynamiclib -dynamic
##############################################
ifndef DEBUG
CFLAGS += -g -D_DEBUG
else
CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
TARGETPATH=$(OUTPATH)/$(OUTSUB)
TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT)
##############################################
ifdef FLEXTBUILD
OUTNAME=$(FLEXTNAME)
ifdef SHARED
EXT=dylib
else
EXT=a
BUILDLIB=1
endif
else
OUTNAME=$(NAME)
endif
LDFLAGS += -dynamic -Wl,-x -framework ApplicationServices -framework vecLib
##############################################
OBJPATH=$(OUTPATH)/$(OUTSUB)
ifdef FLEXTBUILD
TARGETPATH=$(OBJPATH)
TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT)
ifndef DEBUG
CFLAGS += -g -D_DEBUG
else
TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS
TARGET=$(TARGETPATH)/$(OUTNAME)
CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
##############################################
......@@ -49,54 +22,3 @@ CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
COBJS=$(patsubst %.c,$(OBJPATH)/%.o,$(filter %.c,$(SRCS)))
CPPOBJS=$(patsubst %.cpp,$(OBJPATH)/%.opp,$(filter %.cpp,$(SRCS)))
# default target
_all_: $(TARGET)
$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
touch $@
$(OBJPATH):
-mkdir -p $@
$(TARGETPATH):
-mkdir -p $@
$(OBJPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(OBJPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) :: $(OBJPATH) $(TARGETPATH)
$(TARGET) :: $(COBJS) $(CPPOBJS)
ifdef BUILDLIB
libtool -static -o $@ $(COBJS) $(CPPOBJS)
else
# $(CXX) $(LDFLAGS) $(LIBPATH) -dylib_install_name $(INSTPATH)/$(notdir $@) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS)
chmod 755 $@
endif
##############################################
_clean_:
rm $(COBJS) $(CPPOBJS) $(TARGET)
##############################################
$(INSTPATH):
-mkdir -p $@
$(FLEXTPATH):
-mkdir -p $@
_install_:: $(INSTPATH) $(FLEXTPATH)
_install_:: $(TARGET)
ifdef FLEXTBUILD
cp $(TARGET) $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTPATH)
else
install $(TARGET) $(INSTPATH)
endif
......@@ -2,15 +2,27 @@
# you should have the latest version!
MAXSDKPATH=/Volumes/Daten/Prog/MaxMSP-SDK/4.5\ headers/c74support
# where should the external be installed?
INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals
###############################################################
# where do/should the flext headers reside/be built?
FLEXTINC=/usr/local/include/flext
# where do/should the flext static libraries reside/be built?
FLEXTLIB=/usr/local/lib
# where do/should the flext shared libraries reside/be built?
FLEXTSHLIB=$(FLEXTLIB)
# where do the flext headers and libraries reside?
FLEXTPATH=/Library/Application\ Support/Cycling\ \'74/flext
###############################################################
# where should the external be built?
OUTPATH=max-darwin
# where should the external be installed?
INSTPATH=/Library/Application\ Support/Cycling\ \'74/externals
###############################################################
# user defined compiler flags
# (check if they match your system!)
OFLAGS=-O2 -mcpu=G4 -malign-natural -maltivec -faltivec
ifdef SHARED
EXT=dylib
else
EXT=a
endif
......@@ -4,4 +4,9 @@ INCPATH += -I$(MAXSDKPATH)/max-includes -I$(MAXSDKPATH)/msp-includes
LDFLAGS += -framework MaxAPI -framework MaxAudioAPI
EXT=mxo
##############################################
OBJPATH=$(OUTPATH)/$(OUTSUB)
TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS
TARGET=$(TARGETPATH)/$(OUTNAME)
# where is the PD installation including source code?
PDPATH=/Applications/Pd-0.38-0test10.app/Contents/Resources
PDPATH=/Applications/audio/Pd-0.38-0test13.app/Contents/Resources
# where is the PD executable?
PDBIN=/usr/local/bin/pd
PDBIN=$(PDPATH)/bin/pd
# where should the external be installed?
INSTPATH=$(PDPATH)/extra
###############################################################
# where do/should the flext headers reside/be built?
FLEXTINC=/usr/local/include/flext
# where do/should the flext static libraries reside/be built?
FLEXTLIB=/usr/local/lib
# where do/should the flext shared libraries reside/be built?
FLEXTSHLIB=$(FLEXTLIB)
# where do the flext headers and libraries reside?
FLEXTPATH=$(PDPATH)/flext
###############################################################
# where should the external be built?
OUTPATH=pd-darwin
# where should the external be installed?
INSTPATH=$(PDPATH)/extra
###############################################################
# user defined compiler flags
# (check if they match your system!)
OFLAGS=-O2 -mcpu=G4 -malign-natural -maltivec -faltivec
ifdef SHARED
EXT=dylib
else
EXT=a
endif
......@@ -5,6 +5,9 @@ LIBPATH += -L$(PDPATH)/bin
LDFLAGS += -bundle -bundle_loader $(PDBIN)
LIBS +=
##############################################
EXT=pd_darwin
OBJPATH=$(OUTPATH)/$(OUTSUB)
TARGETPATH=$(OBJPATH)/$(OUTNAME).$(EXT)/Contents/MacOS
TARGET=$(TARGETPATH)/$(OUTNAME)
......@@ -42,20 +42,20 @@ TARGETTYPE=single
##############################
# flext-specific definitions
!include $(BUILDPATH)nmake.inc
!include $(BUILDPATH)nmake-$(BUILDCLASS).inc
!include $(BUILDPATH)nmake.inc
##############################
# platform-specific make stuff
!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\nmake-$(COMPILER).inc
!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\nmake-$(COMPILER)-$(BUILDCLASS).inc
!include $(BUILDPATH)$(PLATFORM)\$(RTSYS)\nmake-$(COMPILER).inc
##############################
# general make stuff
!include $(BUILDPATH)$(PLATFORM)\nmake-$(COMPILER).inc
!include $(BUILDPATH)$(PLATFORM)\nmake-$(COMPILER)-$(BUILDCLASS).inc
!include $(BUILDPATH)$(PLATFORM)\nmake-$(COMPILER).inc
# build class specific settings
INCPATH += -I$(FLEXTINC)
LIBPATH += -L$(FLEXTLIB)
LIBS += $(FLEXTLIB)/$(FLEXTNAME).a
LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
LIBS += -l$(FLEXTNAME)
##############################################
......
# build class specific settings
INCPATH += -I$(FLEXTINC)
LIBPATH += -L$(FLEXTLIB)
LIBS+=$(FLEXTLIB)/$(FLEXTNAME).lib
LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB)
LIBS += -l$(FLEXTNAME)
##############################################
......
......@@ -2,16 +2,32 @@
# you should have the latest version!
MAXSDKPATH="c:/data/prog/audio/maxmspsdk_win/4.5 headers/c74support"
# where should the external be installed?
INSTPATH="%CommonProgramFiles%/Cycling '74/externals/flext"
# where is MS VC++?
# (not necessary if the build is run with the compiler environment)
# MSVCPATH=C:/Programme/Microsoft Visual Studio .NET 2003/Vc7
###############################################################
# where do/should the flext headers reside/be built?
FLEXTINC="%CommonProgramFiles%/Cycling '74/flext"
# where do/should the flext static libraries reside/be built?
FLEXTLIB=$(FLEXTINC)
# where do the flext headers and libraries reside?
FLEXTPATH="%CommonProgramFiles%/Cycling '74/flext"
# where do/should the flext shared libraries reside/be built?
FLEXTSHLIB=$(FLEXTINC)
###############################################################
# where should the external be built?
# (path for temporary files)
OUTPATH=max-mingw
# where should the external be installed?
INSTPATH="%CommonProgramFiles%/Cycling '74/externals/flext"
###############################################################
# some user-definable flags
# (check if they match your system!)
OFLAGS=-O2 -march=pentium4 -msse
Supports Markdown
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