From e78c12fd42456df8f852dbef8df1852f23479f22 Mon Sep 17 00:00:00 2001 From: Thibaut Paumard Date: Tue, 1 May 2012 13:41:58 +0200 Subject: [PATCH] 0.0.3 release --- ChangeLog | 5 +++++ bin/Makefile | 6 +++--- lib/Makefile | 6 +++--- lib/Makefile.lorene | 5 ++--- lib/PatternDisk.C | 4 ++-- local_settings | 28 +++++++++++++++++----------- yorick/Makefile | 6 +++--- yorick/stdplug/Makefile | 4 ++-- 8 files changed, 37 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 822610c2..222ad0b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +0.0.3 2012/05/01 BUG + * fix a tiny bug in PatternDisk (initialization of phimin/max) + * rearrange flags in Makefiles/local_settings + for easier downstream packaging + 0.0.2 2012/04/19 PKG * install include files in include/Gyoto * add this ChangeLog diff --git a/bin/Makefile b/bin/Makefile index db1add1b..21d91f64 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -22,13 +22,13 @@ endif all: $(EXE) .C.o: - $(CXX) -c $(CXXFLAGS) $(GYOTO_INC) $< + $(CXX) -c $(GYOTO_FLAGS) -I../include $(CPPFLAGS) $(CXXFLAGS) $< ray: RayTracing.o ../lib/libgyoto.a $(CXX) -o $@ $(CXXFLAGS) $(GYOTO_INC) $^ $(LIB_CXX_Gyoto) -gyoto: gyoto.C ../lib/$(LIBGYOTO_FILE) - $(CXX) -o $@ $(GYOTO_FLAGS) $(CXXFLAGS_G) $(GYOTO_INC) $< $(LIB_CXX) $(CFITSIO_LIB) -L../lib -lgyoto -ldl +gyoto: gyoto.o ../lib/$(LIBGYOTO_FILE) + $(CXX) -o $@ $(LDFLAGS) $(LDLIBS) $< -L../lib -lgyoto -ldl dbgyoto: debugyoto.C ../lib/libgyoto.a $(CXX) -o $@ $(CXXFLAGS) $(GYOTO_INC) $^ $(LIB_CXX_Gyoto) $(LIB_CXX) $(LIB_CFITSIO) $(LIB_LORENE) $(LIB_LAPACK) $(LIB_GSL) $(LIB_PGPLOT) -Wno-long-long diff --git a/lib/Makefile b/lib/Makefile index 32c43bd0..fded031a 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -40,7 +40,7 @@ list_src: echo $(SRC) .C.o: - $(CXX) -c $(GYOTO_FLAGS) $(CXXFLAGS_G) $(GYOTO_INC) $< + $(CXX) -c $(GYOTO_FLAGS) -I../include $(CPPFLAGS) $(CXXFLAGS) $< libgyoto.a: $(OBJ) rm -f $@ @@ -51,10 +51,10 @@ ifeq ($(SYS),Linux) ln -fs $(LIBGYOTO_FILE) libgyoto.so.$(SOVERS_MAJOR) ln -fs $(LIBGYOTO_FILE) libgyoto.so endif - g++ -o $(LIBGYOTO_FILE) $(DYLIB_CFLAG) $(LIB_CXX) $^ + $(CXX) -o $(LIBGYOTO_FILE) $(DYLIB_FLAG) $(LDFLAGS) $(LDLIBS) $^ libgyoto-stdplug.$(DYLIB_SFX): $(STDPLUG_OBJ) StdPlug.o $(LIBGYOTO_FILE) Metric.o - g++ -o $@ $(PLUG_FLAGS) $(STDPLUG_OBJ) StdPlug.o $(LIB_CXX) + $(CXX) -o $@ $(PLUG_FLAGS) $(STDPLUG_OBJ) StdPlug.o $(LDFLAGS) $(LDLIBS) $(LORENEPLUG_OBJ): $(LORENEPLUG_SRC) make -f Makefile.lorene $@ diff --git a/lib/Makefile.lorene b/lib/Makefile.lorene index bc7cf0c2..8a403735 100644 --- a/lib/Makefile.lorene +++ b/lib/Makefile.lorene @@ -19,7 +19,6 @@ LORENE_LIBLOR = $(HOME_LORENE)/Lib/liblorene_g.a \ $(HOME_LORENE)/Lib/liblorenef77_g.a \ $(LIB_LAPACK) $(LIB_GSL) $(LIB_PGPLOT) \ $(LIB_LORENE) -INC += $(GYOTO_INC) $(LORENE_INC) LIB_CXX += $(LORENE_LIB_G) LORENEPLUG_SRC= RotStar3_1.C LorenePlug.C @@ -28,9 +27,9 @@ LORENEPLUG_OBJ = $(LORENEPLUG_SRC:.C=.o) all: libgyoto-lorene.$(DYLIB_SFX) libgyoto-lorene.$(DYLIB_SFX): $(LORENEPLUG_OBJ) - g++ -o $@ $(PLUG_FLAGS) $(LORENEPLUG_OBJ) $(LIB_CXX) + $(CXX) -o $@ $(PLUG_FLAGS) $(LORENEPLUG_OBJ) $(LDFLAGS) $(LDLIBS) .C.o: - $(CXX) -c $(GYOTO_FLAGS) $(CXXFLAGS_G) $(INC) $< + $(CXX) -c $(GYOTO_FLAGS) -I../include $(LORENE_INC) $(CPPFLAGS) $(CXXFLAGS) $< .PHONY: all \ No newline at end of file diff --git a/lib/PatternDisk.C b/lib/PatternDisk.C index faae8cbb..522367ad 100644 --- a/lib/PatternDisk.C +++ b/lib/PatternDisk.C @@ -46,8 +46,8 @@ PatternDisk::PatternDisk() : emission_(NULL), opacity_(NULL), velocity_(NULL), radius_(NULL), Omega_(0.), t0_(0.), dnu_(1.), nu0_(0), nnu_(0), - dphi_(0.), phimin_(-DBL_MAX), - nphi_(0), phimax_(DBL_MAX), repeat_phi_(1), + dphi_(0.), phimin_(0.), + nphi_(0), phimax_(2*M_PI), repeat_phi_(1), dr_(0.), nr_(0) { GYOTO_DEBUG << "PatternDisk Construction" << endl; diff --git a/local_settings b/local_settings index 713938a9..5dae7034 100644 --- a/local_settings +++ b/local_settings @@ -30,7 +30,7 @@ GYOTO_FLAGS += -DGYOTO_USE_XERCES # Where are Xerces include files: XERCES_INC = -I/opt/local/include # Where is libxercesc.so/.dylib/.a: -XERCES_LIB = -L/opt/local/lib -lxerces-c +XERCES_LDFLAGS = -L/opt/local/lib # Options for using cfisio: # ------------------------- @@ -39,47 +39,49 @@ XERCES_LIB = -L/opt/local/lib -lxerces-c # Parts of the library will not be built if GYOTO_USE_CFITSIO is not set. GYOTO_FLAGS += -DGYOTO_USE_CFITSIO CFITSIO_INC = -I/opt/local/include -CFITSIO_LIB = -L/opt/local/lib -lcfitsio +CFITSIO_PATH = -L/opt/local/lib # ________________________________________________________________ # It shouldn't be necessary to change anything below this line -# Options for the C++ compiler for debugging: -# ------------------------------------------- -CXXFLAGS_G = -g -pedantic -Wall -W -Wundef -Wshadow -Wcast-qual \ +# Options for the C++ compiler +# ---------------------------- +CXXFLAGS = -g -pedantic -Wall -W -Wundef -Wshadow -Wcast-qual \ -Wcast-align -Wconversion -Winline \ -Wabi -Woverloaded-virtual -Wno-long-long -fPIC # Path for the include files # -------------------------------------------- -GYOTO_INC = -I../include $(CFITSIO_INC) +GYOTO_INC = $(CFITSIO_INC) ifneq (,$(findstring -DGYOTO_USE_XERCES,$(GYOTO_FLAGS))) GYOTO_INC += $(XERCES_INC) endif -# C, C++ libarary, mathematical library +# C, C++ library, mathematical library # ------------------------------------- LIB_CXX += -lstdc++ -lm ifneq (,$(findstring -DGYOTO_USE_XERCES,$(GYOTO_FLAGS))) -LIB_CXX += $(XERCES_LIB) +LIB_CXX += -lxerces-c +GYOTO_LDFLAGS += $(XERCES_LDFLAGS) endif ifneq (,$(findstring -DGYOTO_USE_CFITSIO,$(GYOTO_FLAGS))) -LIB_CXX += $(CFITSIO_LIB) +LIB_CXX += -lcfitsio +GYOTO_LDFLAGS += $(CFITSIO_LDFLAGS) endif SYS=$(shell uname -s) ifeq ($(SYS),Darwin) DYLIB_SFX=dylib -DYLIB_CFLAG=-dynamiclib +DYLIB_FLAG=-dynamiclib LIBGYOTO_FILE=libgyoto.$(DYLIB_SFX) STLIB_CMD=libtool -static -o PLUG_FLAGS=-flat_namespace -bundle -bundle_loader $(LIBGYOTO_PATH)$(LIBGYOTO_FILE) DYLIB_VAR=DYLD_LIBRARY_PATH else DYLIB_SFX=so -DYLIB_CFLAG=-shared -Wl,-soname,libgyoto.$(DYLIB_SFX).$(SOVERS_MAJOR) +DYLIB_FLAG=-shared -Wl,-soname,libgyoto.$(DYLIB_SFX).$(SOVERS_MAJOR) LIBGYOTO_FILE=libgyoto.$(DYLIB_SFX).$(SOVERS) GYOTO_FLAGS += -rdynamic STLIB_CMD=ar qc @@ -90,3 +92,7 @@ endif GYOTO_FLAGS += -DGYOTO_PLUGIN_SFX=\"$(DYLIB_SFX)\" GYOTO_FLAGS += -DGYOTO_PREFIX=\"$(PREFIX)\" GYOTO_FLAGS += -DGYOTO_SOVERS=\"$(SOVERS)\" + +CPPFLAGS = $(CFITSIO_INC) $(XERCES_INC) +LDFLAGS = $(GYOTO_LDFLAGS) +LDLIBS = $(LIB_CXX) diff --git a/yorick/Makefile b/yorick/Makefile index 7fbd3c43..1c2b6a9a 100644 --- a/yorick/Makefile +++ b/yorick/Makefile @@ -36,9 +36,9 @@ OBJS=gyoto_utils.o gyoto_Metric.o gyoto_Astrobj.o gyoto_Photon.o \ PKG_EXENAME=yorick # PKG_DEPLIBS=-Lsomedir -lsomelib for dependencies of this package -PKG_DEPLIBS=-L../lib -lgyoto $(LIB_CXX) +PKG_DEPLIBS=-L../lib -lgyoto $(LDLIBS) # set compiler (or rarely loader) flags specific to this package -PKG_CFLAGS= -I../include $(GYOTO_INC) +PKG_CFLAGS= -I../include PKG_LDFLAGS= # list of additional package names you want in PKG_EXENAME @@ -74,7 +74,7 @@ Y_SITE=$(Y_EXE_SITE) # ------------begin C++ source hacks # must use C++ to load yorick with this C++ package # this assumes make default CXX macro points to C++ compiler -CXXFLAGS=$(CFLAGS) $(GYOTO_FLAGS) $(INC) +CXXFLAGS=$(CFLAGS) $(GYOTO_FLAGS) LD_DLL=$(CXX) $(LDFLAGS) $(PLUG_SHARED) LD_EXE=$(CXX) $(LDFLAGS) $(PLUG_EXPORT) diff --git a/yorick/stdplug/Makefile b/yorick/stdplug/Makefile index 3b9312a1..a2f951e9 100644 --- a/yorick/stdplug/Makefile +++ b/yorick/stdplug/Makefile @@ -42,7 +42,7 @@ PKG_DEPLIBS+=-bundle_loader ../../lib/libgyoto-stdplug.$(DYLIB_SFX) \ endif # set compiler (or rarely loader) flags specific to this package -PKG_CFLAGS= -I../../include -I.. $(GYOTO_INC) +PKG_CFLAGS= -I../../include -I.. PKG_LDFLAGS= # list of additional package names you want in PKG_EXENAME @@ -78,7 +78,7 @@ Y_SITE=$(Y_EXE_SITE) # ------------begin C++ source hacks # must use C++ to load yorick with this C++ package # this assumes make default CXX macro points to C++ compiler -CXXFLAGS=$(CFLAGS) $(GYOTO_FLAGS) $(INC) -DYGYOTO_LOCAL_SUPPLIER=GyotoStdPlugSupplier +CXXFLAGS=$(CFLAGS) $(GYOTO_FLAGS) -DYGYOTO_LOCAL_SUPPLIER=GyotoStdPlugSupplier LD_DLL=$(CXX) $(LDFLAGS) $(PLUG_SHARED) LD_EXE=$(CXX) $(LDFLAGS) $(PLUG_EXPORT)