Update of /cvsroot/pure-data/externals/grill/flext/build/win
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24525/build/win
Added Files:
make-bcc.inc make-cygwin.inc make-mingw.inc make-msvc.inc
Log Message:
simplified make system
updated make system
--- NEW FILE: make-cygwin.inc ---
LDFLAGS += -shared -Wl,-x
ifdef DEBUG
CFLAGS += -g -D_DEBUG
else
CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
##############################################
INCPATH += -I$(FLEXTPATH)
LIBPATH += -L$(FLEXTPATH)
ifdef SHARED
# --- shared ---
DEFS += -DFLEXT_SHARED
else
ifdef THREADED
# --- static multi-threaded ---
DEFS += -DFLEXT_THREADS
else
# --- static single-threaded ---
endif
endif
##############################################
TARGET=$(OUTPATH)/$(NAME).$(EXT)
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
COBJS=$(patsubst %.c,$(OUTPATH)/%.o,$(filter %.c,$(SRCS)))
CPPOBJS=$(patsubst %.cpp,$(OUTPATH)/%.opp,$(filter %.cpp,$(SRCS)))
# default target
all: $(OUTPATH) $(TARGET)
$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
touch $@
$(OUTPATH):
mkdir $(OUTPATH)
$(OUTPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(OUTPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) : $(COBJS) $(CPPOBJS)
$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
chmod 755 $@
$(INSTPATH):
mkdir $(INSTPATH)
install:: $(INSTPATH)
install:: $(TARGET)
install $^ $(INSTPATH)
.PHONY: clean
clean:
$(RM) $(COBJS) $(CPPOBJS) $(TARGET)
--- NEW FILE: make-bcc.inc ---
INCPATH=$(INCPATH) -I$(FLEXTPATH)
LIBPATH=$(LIBPATH) -L$(FLEXTPATH)
!ifdef BCCPATH
INCPATH=$(INCPATH) -I$(BCCPATH)\include
LIBPATH=$(LIBPATH) -L$(BCCPATH)\lib
!endif
LIBS=$(LIBS) cw32.lib import32.lib C0D32.OBJ
CFLAGS=$(CFLAGS) -tWD -tWM -w-8004 -w-8027 -w-8057
LDFLAGS=$(LDFLAGS) /C /Tpd
##############################################
# use multithreaded static libraries
!ifdef DEBUG
CFLAGS=$(CFLAGS) -v -D_DEBUG
LDFLAGS=$(LDFLAGS) /v
!else
CFLAGS=$(CFLAGS) $(OFLAGS) -DNDEBUG
!endif
!ifdef SHARED
# --- shared ---
DEFS=$(DEFS) -DFLEXT_SHARED
!else
!ifdef THREADED
# --- static multi-threaded ---
DEFS=$(DEFS) -DFLEXT_THREADS
!else
# --- static single-threaded ---
!endif
!endif
##############################################
TARGET=$(OUTPATH)\$(NAME).$(EXT)
# default target
all: $(OUTPATH) print $(TARGET)
# convert both *.c and *.cpp
OBJSTMP= $(SRCS:.c=.obj)
OBJS= $(OBJSTMP:.objpp=.obj)
print:
echo $(OBJS)
$(OUTPATH):
@-if not exist $< mkdir $<
SETUPFUNCTION=$(NAME)_setup
$(OUTPATH)\$(NAME).def:
@echo EXPORTS $(SETUPFUNCTION) = _$(SETUPFUNCTION) > $<
# this next line fixes a strange problem with implib - lacking underscore?!
@echo IMPORTS _rtext_retext=PD.rtext_retext >> $<
{$(SRCDIR)}.cpp{}.obj:
bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(OUTPATH) $<
{$(SRCDIR)}.c{}.obj:
bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(OUTPATH) $<
$(TARGET) :: $(OUTPATH) $(OUTPATH)\$(NAME).def
$(TARGET) :: $(OBJS)
cd $(OUTPATH)
ilink32 $(LDFLAGS) $(LIBPATH) $** ,..\$<,,$(LIBS),$(NAME).def
cd ..
$(INSTPATH):
-mkdir $@
# remove build
clean:
-del /q $(OUTPATH) > nul
-rmdir $(OUTPATH) > nul
# install build
install: $(INSTPATH) $(TARGET)
copy $(TARGET) $(INSTPATH) > nul
--- NEW FILE: make-msvc.inc ---
INCPATH=$(INCPATH) /I$(FLEXTPATH)
LIBPATH=$(LIBPATH) /LIBPATH:$(FLEXTPATH)
!ifdef MSVCPATH
INCPATH=$(INCPATH) /I$(MSVCPATH)\include
LIBPATH=$(LIBPATH) /LIBPATH:$(MSVCPATH)\lib
!endif
# for VC7 - enable exception handling
CFLAGS=$(CFLAGS) /EHsc
##############################################
# use multithreaded static libraries
!ifdef DEBUG
CFLAGS=$(CFLAGS) /D_DEBUG /DMTd
LDFLAGS=$(LDFLAGS) /DEBUG
!else
CFLAGS=$(CFLAGS) $(OFLAGS) /DNDEBUG /DMT
LDFLAGS=$(LDFLAGS) /INCREMENTAL:NO
!endif
!ifdef SHARED
# --- shared ---
DEFS=$(DEFS) /DFLEXT_SHARED
!elseifdef THREADED
# --- static multi-threaded ---
DEFS=$(DEFS) /DFLEXT_THREADS
!else
# --- static single-threaded ---
!endif
##############################################
# default target
all: $(OUTPATH) $(OUTPATH)\$(NAME).$(EXT)
OBJS= $(SRCS:.c=.obj)
OBJS= $(OBJS:.objpp=.obj)
$(OUTPATH):
-mkdir $(OUTPATH) > nul
{$(SRCDIR)}.cpp{}.obj:
cl /c /LD $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(OUTPATH)\$@
{$(SRCDIR)}.c{}.obj:
cl /c /LD $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(OUTPATH)\$@
$(OUTPATH)\$(NAME).$(EXT): $(OBJS)
cd $(OUTPATH)
link /DLL $(LDFLAGS) /out:$(NAME).$(EXT) $** $(LIBS) $(LIBPATH)
@-del *.exp
@-del *.lib
cd ..
# remove build
clean:
-del /q $(OUTPATH) > nul
-rmdir $(OUTPATH) > nul
# install build
install:
@-if not exist $(INSTPATH) mkdir $(INSTPATH)
copy $(OUTPATH)\$(NAME).$(EXT) $(INSTPATH) > nul
--- NEW FILE: make-mingw.inc ---
LDFLAGS += -shared -Wl,-x
ifdef DEBUG
CFLAGS += -g -D_DEBUG
else
CFLAGS += $(OFLAGS) -DNDEBUG
LDFLAGS += -Wl,-S
endif
##############################################
INCPATH += -I$(FLEXTPATH)
LIBPATH += -L$(FLEXTPATH)
ifdef SHARED
# --- shared ---
DEFS += -DFLEXT_SHARED
else
ifdef THREADED
# --- static multi-threaded ---
DEFS += -DFLEXT_THREADS
else
# --- static single-threaded ---
endif
endif
##############################################
TARGET=$(OUTPATH)/$(NAME).$(EXT)
CSRCS=$(patsubst %.c,$(SRCDIR)/%.c,$(filter %.c,$(SRCS)))
CPPSRCS=$(patsubst %.cpp,$(SRCDIR)/%.cpp,$(filter %.cpp,$(SRCS)))
COBJS=$(patsubst %.c,$(OUTPATH)/%.o,$(filter %.c,$(SRCS)))
CPPOBJS=$(patsubst %.cpp,$(OUTPATH)/%.opp,$(filter %.cpp,$(SRCS)))
# default target
all: $(OUTPATH) $(TARGET)
#$(CSRCS) $(CPPSRCS): $(patsubst %,$(SRCDIR)/%,$(HDRS))
# touch $@
$(OUTPATH):
-mkdir $(subst /,\,$@)
$(OUTPATH)/%.opp : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(OUTPATH)/%.o : $(SRCDIR)/%.c
$(CC) -c $(CFLAGS) $(DEFS) $(INCPATH) $< -o $@
$(TARGET) : $(COBJS) $(CPPOBJS)
$(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $^ $(LIBS)
$(INSTPATH):
-mkdir $(subst /,\,$@)
install:: $(INSTPATH)
install:: $(TARGET)
copy $(subst /,\,$^ $(INSTPATH))
.PHONY: clean
clean:
-del $(subst /,\,$(COBJS) $(CPPOBJS) $(TARGET))