## ## ## $Id$ ##----------------------------------------------------------------------- ## ## (c) Copyright 2002 by GATS, Inc., ## 11864 Canon Blvd, Suite 101, Newport News VA 23606 ## ## All Rights Reserved. No part of this software or publication may be ## reproduced, stored in a retrieval system, or transmitted, in any form ## or by any means, electronic, mechanical, photocopying, recording, or ## otherwise without the prior written permission of GATS, Inc. ## ##----------------------------------------------------------------------- ## ## Module: Makefile ## ## Author: John Burton ## ## Date: Wed Sep 25 15:28:00 2002 ## ##----------------------------------------------------------------------- ## ## Modification History: ## ## $Log$ ## ##----------------------------------------------------------------------- ## ##----------------------------------------------------------------------- ## Include Files: ##----------------------------------------------------------------------- ## ## ##----------------------------------------------------------------------- ## Defines and Macros: ##----------------------------------------------------------------------- ## MAJOR = 0 MINOR = 1 PATCH = 0 VERSION = $(MAJOR).$(MINOR).$(PATCH) CC = gcc CPP = g++ HOST = 'hostname' LFLAGS = -+ LIBDIR = ../../lib INCDIR = ../../include #OPTIONS = -O3 OPTIONS = -g INCLUDES = -I./ -I$(INCDIR) -I/users/gats/local/include LINCLUDES = -L./ -L$(LIBDIR) -L/users/gats/local/lib LDFLAGS = -lgrace_np #DEFINES = -DDEBUG=1 CFLAGS = $(OPTIONS) $(DEFINES) $(INCLUDES) PROG = TestTimeRegistration MAIN = TestTimeRegistration.cpp CPPFLAGS = $(CFLAGS) #TEST OPTIONS TEST = TimeRegisterTestDriver.cpp TESTLDFLAGS = -lAltitudeRegistration -lAuxDataInput \ -lCO2ProfileSimulation -lTimeRegistration -lDetectorTimeShift \ -lLevel1DataOutput -lNonLinearityCorrection \ -lRefractionAngleCalc -lRefractionAngleTPRetrieval \ -lSignalCorrection -lSolarSourceModel -lUtils\ -lLevel0DataInput -lConfig -lEvent -lGATS_DB -lGATS_Exception \ -lgrace_np ## ##----------------------------------------------------------------------- ## Objects: ##----------------------------------------------------------------------- ## LIB = libTimeRegistration.$(VERSION).a LIBMAJ = libTimeRegistration.a SHLIB = libTimeRegistration.so.$(VERSION) SHLIBMAJ = libTimeRegistration.so.$(MAJOR) INCFILE = TimeRegistration.h ## Satellite.h Ephemeris.h GeoCal.h \ ## HInterpolate.h DMatrix.h DVector.h GeneralConsts.h \ ## General_Dimension_Math_Consts.h GeneralFunctions.h OBJS = $(LIB)(TimeRegistration.o) \ $(LIB)(Ephemeris.o) \ $(LIB)(Satellite.o) \ $(LIB)(GeoCal.o) \ $(LIB)(DVector.o) \ $(LIB)(DMatrix.o) \ $(LIB)(HInterpolate.o) \ $(LIB)(Add83kmLatLon.o) \ $(LIB)(FindRefAltLatLon.o) ## ##----------------------------------------------------------------------- ## Targets: ##----------------------------------------------------------------------- ## # #------------------------------------------------------------------------ # Target for converting a lex or yacc file to C code, then compiling and # adding it to an archive file #------------------------------------------------------------------------ # .l.a: $(LEX) $(LFLAGS) $< mv lex.yy.cc $*.cpp $(CPP) -c $(CFLAGS) -o $*.o $*.cpp $(AR) $(ARFLAGS) $@ $*.o rm -f $*.o # rm -f $*.cpp .y.a: $(YACC) $(YFLAGS) $< mv $*.tab.c $*.c $(CC) -c $(CFLAGS) $*.c $(AR) $(ARFLAGS) $@ $*.o rm -f $*.o rm -f $*.c # #------------------------------------------------------------------------ # Target for creating the main program #------------------------------------------------------------------------ # $(LIB): $(OBJS) $(DEFS) ranlib $(LIB) ln -sf $(LIB) $(LIBMAJ) lib: $(LIB) cp $(LIB) $(LIBDIR)/$(LIB) cp $(INCFILE) $(INCDIR)/ cd $(LIBDIR); ln -sf $(LIB) $(LIBMAJ) $(PROG): $(LIB) $(MAIN) $(OBJS) $(CPP) $(CFLAGS) -o $@ $(MAIN) $(LIB) $(LINCLUDES) $(LDFLAGS) testdriver: $(LIB) $(TEST) $(OBJS) $(CPP) $(CFLAGS) -o $@ $(TEST) $(LIB) $(LINCLUDES) $(TESTLDFLAGS) clean: rm $(PROG) $(LIB) $(LIBMAJ) *.o *~ install: cp $(LIB) $(LIBDIR)/$(LIB) cp $(INCFILE) $(INCDIR)/ cd $(LIBDIR); ln -sf $(LIB) $(LIBMAJ)