Commit 5bae673a authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

new header and new include dir structure

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1457
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 94ca9f8a
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.3 2003-12-22 09:08:58 tforb Exp $
# $Id: Makefile,v 1.4 2004-01-28 14:14:46 tforb Exp $
#
# Copyright (c) 2003 by Thomas Forbriger (BFO Schiltach)
#
......@@ -10,6 +10,29 @@
# 18/12/2003 V1.0 Thomas Forbriger
#
# ============================================================================
HEADERS=$(shell find . -name \*.h)
#SRC=misc/fortranio.cc misc/commandline.cc misc/ioswap.cc misc/error.cc \
# misc/blitzfortranio.cc hacks/hack_blitztogrepg.cc
LIBSRC=tsxx.cc
INCINSTALLPATH=$(LOCINCLUDEDIR)/tsxx
LIBINSTALLPATH=$(LOCLIBDIR)
# name of headers with comments stripped off
STRIPHEADER=$(addsuffix .strip,$(notdir $(HEADERS)))
# name of installed (exported) header files
INSTHEADER=$(addprefix $(INCINSTALLPATH)/,$(notdir $(HEADERS)))
# if defined, empty lines are kept in stripped comment headers
# to synchronize line numbers
EMPTYPRINT=1
#EMPTYPRINT=0
# define this to be cat in case you do not have remcmmnt available
REMCMMNT=remcmmnt
#REMCMMNT=cat
#
# general part
# ------------
......@@ -48,9 +71,6 @@ clean: ;
# library part
# ------------
LIBSRC=tsxx.cc
INCSRC=tsxx.h
-include $(patsubst %.cc,%.d,$(LIBSRC))
libtsxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
......@@ -58,7 +78,32 @@ libtsxx.a: $(patsubst %.cc,%.o,$(LIBSRC))
ranlib $@
newlib $@
install-include: ; newinclude tsxx.h
#----------------------------------------------------------------------
# comment stripping
%.hd: %.h; echo $(notdir $<.strip): $< > $@
-include $(patsubst %.h,%.hd,$(HEADERS))
# first awk rule assumes that the first non-comment line starts with '#'
# and that the first (copyright) comment end with pattern "^ */"
%.h.strip:
awk 'BEGIN {hot=1;} /^ \*\// { if (hot) { hot=2; print; next;} }\
/^#/ { hot=0; } \
{ if (hot==2) { print ""; } else if (hot) { print; } }' $< > $@
$(REMCMMNT) $< | awk 'BEGIN {hot=0;} \
/^ *$$/ { if ((hot) && ($(EMPTYPRINT))) { print; } next; } \
/^#/ { hot=1; } { if (hot) print; }' >> $@
#----------------------------------------------------------------------
$(INCINSTALLPATH)/%.h: %.h.strip
mkdir -p $(INCINSTALLPATH)
-rm -fv $@
ln -svf $$(pwd)/$< $@
install-include: $(INSTHEADER)
touch $@
#======================================================================
# documentation part
......@@ -68,7 +113,7 @@ DOXYWWWPATH=$(HOME)/public_html/txt/cxx/libtsxx
doxyclean: ;/bin/rm -rfv doc docbrief
DOXYSRC=$(LIBSRC) $(INCSRC)
DOXYSRC=$(LIBSRC) $(HEADERS)
doc/%: doxyfull.cfg $(DOXYSRC)
mkdir -vp $(DOXYWWWPATH)
......
/*! \file bundles.h
* \brief bundles of header and data (prototypes)
*
* ----------------------------------------------------------------------------
*
* $Id: bundles.h,v 1.1 2004-01-28 14:14:47 tforb Exp $
* \author Thomas Forbriger
* \date 28/01/2004
*
* bundles of header and data (prototypes)
*
* Copyright (c) 2004 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 28/01/2004 V1.0 Thomas Forbriger
*
* ============================================================================
*/
// include guard
#ifndef TF_BUNDLES_H_VERSION
#define TF_BUNDLES_H_VERSION \
"TF_BUNDLES_H V1.0 "
#define TF_BUNDLES_H_CVSID \
"$Id: bundles.h,v 1.1 2004-01-28 14:14:47 tforb Exp $"
#include<aff/series.h>
#include<sffxx.h>
namespace ts {
/*! Bundle of header and series
* is a struct to indicate public data access
*/
template<class H, class S>
struct Bundle {
public:
typedef H Theader;
typedef S Tseries;
H header;
S series;
}; // struct Bundle
// define bundle typedefs
typedef Bundle<sff::WID2, aff::Series<double> > TDsffbundle;
typedef Bundle<sff::WID2, aff::Series<float> > TSsffbundle;
}
#endif // TF_BUNDLES_H_VERSION (includeguard)
/* ----- END OF bundles.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