Commit 3edf9646 authored by sebastien's avatar sebastien
Browse files

Build system: delete obsolete files


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3117 ac1d8469-bf42-47a9-8791-bf33cf982152
parent cb52002b
include ../../Makefile.include
#CC = gcc
CC_FLAGS = -Wall -I../../sylv/cc -I../../tl/cc -I../../kord -I../../integ/cc
LDFLAGS = -llapack -lblas -lg2c -lstdc++
ifeq ($(DEBUG),yes)
CC_FLAGS := $(CC_FLAGS) -g -DTL_DEBUG=2
else
CC_FLAGS := $(CC_FLAGS) -O3 -DPOSIX_THREADS
endif
ifeq ($(OS),Windows_NT)
CC_FLAGS := -mno-cygwin -mthreads $(CC_FLAGS)
LDFLAGS := -mno-cygwin -mthreads $(LDFLAGS) -lpthreadGC2
ARCH := w32
MEX_SUFFIX = dll
else
CC_FLAGS := -fPIC $(CC_FLAGS)
LDFLAGS := $(LDFLAGS) -lpthread
ARCH := linux
# MEX_SUFFIX = mexglx
MEX_SUFFIX = mexa64
endif
sylvcppsource := $(wildcard ../../sylv/cc/*.cpp)
sylvhsource := $(wildcard ../../sylv/cc/*.h)
sylvobjects := $(patsubst %.cpp, %.o, $(sylvcppsource))
tlcwebsource := $(wildcard ../../tl/cc/*.cweb)
tlcppsource := $(patsubst %.cweb,%.cpp,$(tlcwebsource))
tlhwebsource := $(wildcard ../../tl/cc/*.hweb)
tlhsource := $(patsubst %.hweb,%.h,$(tlhwebsource))
tlobjects := $(patsubst %.cweb,%.o,$(tlcwebsource))
kordcwebsource := $(wildcard ../../kord/*.cweb)
kordcppsource := $(patsubst %.cweb,%.cpp,$(kordcwebsource))
kordhwebsource := $(wildcard ../../kord/*.hweb)
kordhsource := $(patsubst %.hweb,%.h,$(kordhwebsource))
kordobjects := $(patsubst %.cweb,%.o,$(kordcwebsource))
integcwebsource := $(wildcard ../../integ/cc/*.cweb)
integcppsource := $(patsubst %.cweb,%.cpp,$(integcwebsource))
integhwebsource := $(wildcard ../../integ/cc/*.hweb)
integhsource := $(patsubst %.hweb,%.h,$(integhwebsource))
integobjects := $(patsubst %.cweb,%.o,$(integcwebsource))
cppsource := $(wildcard *.cpp)
mexobjects := $(patsubst %.cpp,%_.$(MEX_SUFFIX),$(cppsource))
all: $(mexobjects)
../../tl/cc/dummy.ch:
make -C ../../tl/cc dummy.ch
../../tl/cc/%.cpp: ../../tl/cc/%.cweb ../../tl/cc/dummy.ch
make -C ../../tl/cc $*.cpp
../../tl/cc/%.h: ../../tl/cc/%.hweb ../../tl/cc/dummy.ch
make -C ../../tl/cc $*.h
../../tl/cc/%.o: ../../tl/cc/%.cpp $(tlhsource)
make -C ../../tl/cc $*.o
../../integ/cc/dummy.ch:
make -C ../../integ/cc dummy.ch
../../integ/cc/%.cpp: ../../integ/cc/%.cweb ../../integ/cc/dummy.ch
make -C ../../integ/cc $*.cpp
../../integ/cc/%.h: ../../integ/cc/%.hweb ../../integ/cc/dummy.ch
make -C ../../integ/cc $*.h
../../integ/cc/%.o: ../../integ/cc/%.cpp $(integhsource) $(tlhsource)
make -C ../../integ/cc $*.o
../../sylv/cc/%.o: ../../sylv/cc/%.cpp $(sylvhsource)
make -C ../../sylv/cc $*.o
../../kord/dummy.ch:
make -C ../../kord dummy.ch
../../kord/%.cpp: ../../kord/%.cweb ../../kord/dummy.ch
make -C ../../kord $*.cpp
../../kord/%.h: ../../kord/%.hweb ../../kord/dummy.ch
make -C ../../kord $*.h
../../kord/%.o: ../../kord/%.cpp $(tlhsource) $(kordhsource) $(integhsource)
make -C ../../kord $*.o
dynarelib.a: $(tlhwebsource) $(tlcwebsoure) $(tlhsource) $(tlcppsource) \
$(integhwebsource) $(integcwebsoure) $(integhsource) $(integcppsource) \
$(kordhwebsource) $(kordcwebsoure) $(kordhsource) $(kordcppsource) \
$(sylvhsource) $(sylvcppsource) \
$(kordobjects) $(tlobjects) $(integobjects) $(sylvobjects)
ar cr dynarelib.a $(kordobjects) $(tlobjects) $(integobjects) $(sylvobjects)
ranlib dynarelib.a
# to compile mex objects for Windows do:
# 1. install gnumex
# 2. create mexopts.bat via gnumex in this directory, specify MinGW compilation, and dll output
# 3. in created mexopts.bat add "-llapack -lblas -lg2c -lstdc++
# -lpthreadGC2" in the beginning of GM_ADD_LIBS
# 4. in created mexopts.bat add "-fexceptions -DPOSIX_THREADS" to COMPFLAGS in the end
# 5. in created mexopts.bat change suffix mexw32 to dll in NAME_OUTPUT
# 6. pray it works
# OR: just use the mexopt.bat from the repository and check MATLAB
# root directory and gnumex root directories
%_.$(MEX_SUFFIX): %.cpp $(tlhwebsource) $(tlcwebsoure) $(tlhsource) $(tlcppsource) \
$(integhwebsource) $(integcwebsoure) $(integhsource) $(integcppsource) \
$(kordhwebsource) $(kordcwebsoure) $(kordhsource) $(kordcppsource) \
$(sylvhsource) $(sylvcppsource) \
dynarelib.a
ifeq ($(OS),Windows_NT)
mex.bat -I../../sylv/cc -I../../tl/cc -I../../kord -I../../integ/cc $*.cpp dynarelib.a
else
mex -I../../sylv/cc/ -I../../tl/cc -I../../kord -I../../integ/cc $*.cpp CFLAGS='$$CFLAGS -fexceptions' dynarelib.a -lmwlapack -lmwblas
endif
mv $*.$(MEX_SUFFIX) $*_.$(MEX_SUFFIX)
clear:
rm -f dynarelib.a
rm -f *.mexglx
rm -f *.dll
make -C ../../tl/testing clear
make -C ../../tl/cc clear
make -C ../../integ/testing clear
make -C ../../integ/cc clear
make -C ../../sylv/testing clear
make -C ../../sylv/cc clear
make -C ../../kord clear
@echo off
rem C:\ondra\work\dpp\dynare++\extern\matlab\mexopts.bat
rem Generated by gnumex.m script in c:\fs\gnumex
rem gnumex version: 2.01
rem Compile and link options used for building MEX etc files with
rem the Mingw/Cygwin tools. Options here are:
rem Gnumex, version 2.01
rem MinGW linking
rem Mex (*.dll) creation
rem Libraries regenerated now
rem Language: C / C++
rem Optimization level: -O3 (full optimization)
rem Matlab version 7.7
rem
set MATLAB=C:\PROGRA~1\MATLAB\R2008b
set GM_PERLPATH=C:\PROGRA~1\MATLAB\R2008b\sys\perl\win32\bin\perl.exe
set GM_UTIL_PATH=c:\fs\gnumex
set PATH=c:\fs\mingw\bin;%PATH%
set PATH=%PATH%;C:\Cygwin\usr\local\gfortran\libexec\gcc\i686-pc-cygwin\4.3.0
set LIBRARY_PATH=c:\fs\mingw\lib
set G95_LIBRARY_PATH=c:\fs\mingw\lib
rem
rem precompiled library directory and library files
set GM_QLIB_NAME=C:\\ondra\work\dpp\dynare++\extern\matlab\gnumex
rem
rem directory for .def-files
set GM_DEF_PATH=C:\\ondra\work\dpp\dynare++\extern\matlab\gnumex
rem
rem Type of file to compile (mex or engine)
set GM_MEXTYPE=mex
rem
rem Language for compilation
set GM_MEXLANG=c
rem
rem File for exporting mexFunction symbol
set GM_MEXDEF=C:\\ondra\work\dpp\dynare++\extern\matlab\gnumex\mex.def
rem
set GM_ADD_LIBS=-llapack -lblas -lg2c -lstdc++ -lpthreadGC2 -llibmx -llibmex -llibmat
rem
rem compiler options; add compiler flags to compflags as desired
set NAME_OBJECT=-o
set COMPILER=gcc
set COMPFLAGS=-c -DMATLAB_MEX_FILE -fexceptions -DPOSIX_THREADS
set OPTIMFLAGS=-O3
set DEBUGFLAGS=-g
set CPPCOMPFLAGS=%COMPFLAGS% -x c++
set CPPOPTIMFLAGS=%OPTIMFLAGS%
set CPPDEBUGFLAGS=%DEBUGFLAGS%
rem
rem NB Library creation commands occur in linker scripts
rem
rem Linker parameters
set LINKER=%GM_PERLPATH% %GM_UTIL_PATH%\linkmex.pl
set LINKFLAGS=
set CPPLINKFLAGS=GM_ISCPP
set LINKOPTIMFLAGS=-s
set LINKDEBUGFLAGS=-g -Wl,--image-base,0x28000000\n
set LINKFLAGS= -LC:\\ondra\work\dpp\dynare++\extern\matlab\gnumex
set LINK_FILE=
set LINK_LIB=
set NAME_OUTPUT=-o %OUTDIR%%MEX_NAME%.dll
rem
rem Resource compiler parameters
set RC_COMPILER=%GM_PERLPATH% %GM_UTIL_PATH%\rccompile.pl -o %OUTDIR%mexversion.res
set RC_LINKER=
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