Makefile for Easy LDAS Code Development ---------------------------------------- On the early stage of writing new code for LDAS it is convinient to place files with new code outside of LDAS directory tree. In this case you will not mix your stuff with large number of existent LDAS source files. Compiling new code and test programs will not require editing of LDAS 'automake' template files. For this purpose you will need your own Makefile to compile new code and build test programs for it. For this to work you need to compile and install LDAS (with prefix /ldcg in example). You also will need LDAS source directory tree (just unpacked from distribution or one which was used for building LDAS), /ligo/tmp3/sw/install/ldas-0.0.17 - in example below. tTypeConversion is a test program to build, TypeConversion.cc and TypeConversion.hh are source files for new CallChain function. Find below example of how Makefile should like. This file works fine for version 0.0.17 but for newer LDAS it may require changes. #------------------------------------------------------ # Package: # File name: Makefile # # Makefile for new Data Conditioning API code development. # This file and new *.cc and .h files can be placed in # any directory. #-------------------------------------------------------- LDCG = /ldcg TCL_VER = 8.3 API = /ligo/tmp3/sw/install/ldas-0.0.17/api CPP = g++ -g LD = libtool g++ -g CPPFLAGS = -O2 -Wall CPPFLAGS += -I$(API)/datacondAPI/so/src CPPFLAGS += -I$(LDCG)/include LIBS = $(LDCG)/lib/datacondAPI/libdatacondAPI.la LIBS += $(LDCG)/lib/genericAPI/libgenericAPI.la LIBS += $(LDCG)/lib/libApiCommon.la #LIBS += -lilwd -lgeneral LIBS += -ltcl$(TCL_VER) -ltclstub$(TCL_VER) LIBS += -lz -lposix4 LDFLAGS = -L$(LDCG)/lib LDFLAGS += $(LIBS) obj: TypeConversion.o clean: \rm -f *.o tTypeConversion : tTypeConversion.o TypeConversion.o $(LD) $^ -o $@ $(LDFLAGS) %.o : %.cc $(CPP) -c $(CPPFLAGS) $< -o $@ % : %.o $(LD) $< -o $@ $(LDFLAGS) ----------------------------------------------------------- Andrei Sazonov (sazonov@phys.ufl.edu) June 4, 200