Makefile 2.24 KB
INC = -I/usr/include -I/usr/local/include -I/opt/local/include -I/opt/local/include/DDClientLibC
LIB = -L/usr/lib64 -L/usr/local/lib64  -L/opt/local/lib -L/opt/local/lib
CFLAGS = -ggdb -DLINUX -m64 -march=core2 -fPIC -Dlinux -D_REENTRANT -malign-double 
CC = gcc

EXE = nctimestring2double nctimeinfo getncvars ncvarinfo \
      ncinfo_remote \
      cdfinfo cdfvarinfo cdfstartstopfromdata cdfsamplingfromdata \
      AddVI

lib: ${EXE}

AddVI: AddVI.c
	${CC} ${CFLAGS} -o AddVI AddVI.c ${INC} ${LIB} -lDDClientLibC
	
ncinfo_remote: ncinfo_remote.c
	${CC} ${CFLAGS} -o ncinfo_remote ncinfo_remote.c  ${INC} ${LIB} -lnetcdf	
	
nctimestring2double: nctimestring2double.c
	${CC} ${CFLAGS} -o nctimestring2double nctimestring2double.c ${INC} ${LIB} -lDDClientLibC -lnetcdf

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

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

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

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

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

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

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

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

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

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

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

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

install:
	install -d -m a+rx,ug+w ${IHM_DIR}/php/bin
	cp ${EXE} ${IHM_DIR}/php/bin

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