Makefile 2.84 KB
INC = -I/usr/include -I/usr/local/include -I/usr/local/cdf/include -I/usr/local/cef/include -I/home/budnik/AMDANEW/DDLIB/include
LIB = -L/usr/lib -L/usr/local/lib  -L/usr/local/cdf/lib  -L/usr/local/cef/lib -L/home/budnik/AMDANEW/DDLIB/lib
CFLAGS = -ggdb -DLINUX -march=i686 -fPIC -Dlinux -D_REENTRANT -malign-double
CC = gcc

EXE = nctimestring2double nctimeinfo getncvars ncvarinfo \
      cefstartstop cefvarinfo cefinfo cefsampling ceftimeinfo \
      cdfinfo cdfvarinfo cdfstartstopfromdata cdfsamplingfromdata

lib: $(EXE)

nctimestring2double: nctimestring2double.o
	${CC} -o nctimestring2double nctimestring2double.o ${LIB} -lDD -lnetcdf

nctimestring2double.o: nctimestring2double.c
	${CC} ${CFLAGS} -c nctimestring2double.c ${INC}

nctimeinfo: nctimeinfo.o
	${CC} -o nctimeinfo nctimeinfo.o ${LIB} -lnetcdf

nctimeinfo.o: nctimeinfo.c
	${CC} ${CFLAGS} -c nctimeinfo.c ${INC}

getncvars: getncvars.o
	${CC} -o getncvars getncvars.o ${LIB} -lnetcdf

getncvars.o: getncvars.c
	${CC} ${CFLAGS} -c getncvars.c ${INC}

ncvarinfo: ncvarinfo.o
	${CC} -o ncvarinfo ncvarinfo.o ${LIB} -lnetcdf

ncvarinfo.o: ncvarinfo.c
	${CC} ${CFLAGS} -c ncvarinfo.c ${INC}

cefvarinfo: cefvarinfo.o
	${CC} -o cefvarinfo cefvarinfo.o ${LIB}  -lm -lz -lCEF_gcc -lCIS_gcc

cefvarinfo.o: cefvarinfo.c
	${CC} ${CFLAGS} -c cefvarinfo.c ${INC}

cefinfo: cefinfo.o
	${CC} -o cefinfo cefinfo.o ${LIB}  -lm -lz -lCEF_gcc -lCIS_gcc

cefinfo.o: cefinfo.c
	${CC} ${CFLAGS} -c cefinfo.c ${INC}

cefstartstop: cefstartstop.o
	${CC} -o cefstartstop  cefstartstop.o ${LIB}  -lm -lz -lCEF_gcc -lCIS_gcc

cefstartstop.o: cefstartstop.c
	${CC} ${CFLAGS} -c cefstartstop.c ${INC}

cefsampling: cefsampling.o
	${CC} -o cefsampling cefsampling.o ${LIB}  -lm -lz -lCEF_gcc -lCIS_gcc

cefsampling.o: cefsampling.c
	${CC} ${CFLAGS} -c cefsampling.c ${INC}

ceftimeinfo: ceftimeinfo.o
	${CC} -o ceftimeinfo ceftimeinfo.o ${LIB}  -lm -lz -lCEF_gcc -lCIS_gcc

ceftimeinfo.o: ceftimeinfo.c
	${CC} ${CFLAGS} -c ceftimeinfo.c ${INC}

cdfinfo: cdfinfo.o
	${CC} -o cdfinfo cdfinfo.o ${LIB} -lcdf

cdfinfo.o: cdfinfo.c
	${CC} ${CFLAGS} -c cdfinfo.c ${INC}

cdfvarinfo: cdfvarinfo.o
	${CC} -o cdfvarinfo cdfvarinfo.o ${LIB} -lcdf

cdfvarinfo.o: cdfvarinfo.c
	${CC} ${CFLAGS} -c cdfvarinfo.c ${INC}

cdfstartstopfromdata: cdfstartstopfromdata.o
	${CC} -o cdfstartstopfromdata cdfstartstopfromdata.o ${LIB} -lcdf

cdfstartstopfromdata.o: cdfstartstopfromdata.c
	${CC} ${CFLAGS} -c cdfstartstopfromdata.c ${INC}

cdfsamplingfromdata: cdfsamplingfromdata.o
	${CC} -o cdfsamplingfromdata cdfsamplingfromdata.o ${LIB} -lcdf

cdfsamplingfromdata.o: cdfsamplingfromdata.c
	${CC} ${CFLAGS} -c cdfsamplingfromdata.c ${INC}

install:
	cp $(EXE) ../bin

clean:	
	tag="*.o ${EXE}";\
        for file in $$tag; do \
	echo $$file; rm -f $$file;\
	done
	find -name \*~ -delete