## ## ## $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++ FC = gfortran #FC = g77 LIBDIR =../../lib INCDIR =../../include OPTIONS = -O3 -m32 INCLUDES = -I./ -I../../include -I/usr/include/netcdf-3 LINCLUDES = -L./ -L$(LIBDIR) #LDOPTIONS = -b elf32-i386 LDOPTIONS = DEFINES = CFLAGS = $(OPTIONS) $(DEFINES) $(INCLUDES) FFLAGS = $(OPTIONS) -fsecond-underscore #LCFLAGS = $(OPTIONS) $(DEFINES) $(INCLUDES) $(LINCLUDES) PROG = S3SofieRet MAIN = MAIN_DIR = ./SOFIE_L2 INIT_DIRS = GATS_Exception \ CMarkup \ GATS_DB \ Radtran4-1_4a \ S3_V2 SRC_DIRS = SOFIE_L2 ALL_DIRS = $(INIT_DIRS) $(SRC_DIRS) ## ##----------------------------------------------------------------------- ## Objects: ##----------------------------------------------------------------------- ## LIB = libSOFIE_L1.$(VERSION).a LIBMAJ = libSOFIE_L1.a SHLIB = libSOFIE_L1.so.$(VERSION) SHLIBMAJ = libSOFIE_L1.so.$(MAJOR) PyMOD = ConfigFile.so INCFILE = EventVar.h GracePlot.h OBJS = $(LIB)(ConfigLexer.o) \ $(LIB)(ConfigFile.o) ## ##----------------------------------------------------------------------- ## Targets: ##----------------------------------------------------------------------- ## # #------------------------------------------------------------------------ # Target for creating the library #------------------------------------------------------------------------ # $(LIB): $(OBJS) $(DEFS) ranlib $(LIB) ln -sf $(LIB) $(LIBMAJ) lib: init list='$(ALL_DIRS)'; for subdir in $$list; do \ (cd $$subdir && make -e FC='$(FC)' CPPFLAGS='$(CFLAGS)' CFLAGS='$(CFLAGS)' FFLAGS='$(FFLAGS)' lib) \ done # #------------------------------------------------------------------------ # Target for creating the main program #------------------------------------------------------------------------ # #$(PROG): $(LIB) $(MAIN) $(OBJS) # $(CPP) $(CFLAGS) -o $@ $(MAIN) $(LIB) $(LINCLUDES) $(LDFLAGS) prog: (cd $(MAIN_DIR) && make -e CPPFLAGS='$(CFLAGS)' CFLAGS='$(CFLAGS)' LDOPTIONS='$(LDOPTIONS)' prog) clean: cleanlib cleaninclude list='$(ALL_DIRS)'; for subdir in $$list; do \ (cd $$subdir && make clean) \ done cleandoc: -rm -rf ../doc/html/* cleanbin: -rm ../bin/* cleanlib: -rm ../lib/* cleaninclude: -rm ../include/* init: list='$(INIT_DIRS)'; for subdir in $$list; do \ ($(MAKE) -C $$subdir init) \ done #install: init # list='$(ALL_DIRS)'; for subdir in $$list; do \ # (cd $$subdir && make -e FC='$(FC)' CFLAGS='$(CFLAGS)' FFLAGS='$(FFLAGS)' install) \ # done doc: doxygen SOFIE.dox dummy: files := $(foreach dir,$(INIT_DIRS),$(wildcard $(dir)/*.a)); # echo $(files); ## ##----------------------------------------------------------------------- ## Dependencies: ##----------------------------------------------------------------------- ## #ConfigFile_wrap.c: ConfigFile.i # swig -python ConfigFile.i