2012-04-10 06:03:02 +08:00
|
|
|
# Test c output
|
2015-08-16 06:26:35 +08:00
|
|
|
T=t
|
|
|
|
#CMD=valgrind --leak-check=full
|
|
|
|
#CMD=gdb --args
|
|
|
|
|
|
|
|
CC=mpicc
|
2012-04-10 06:03:02 +08:00
|
|
|
|
|
|
|
CFLAGS=-g -O0 -I.. -I../include
|
2015-08-16 06:26:35 +08:00
|
|
|
#LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl
|
|
|
|
|
|
|
|
LDFLAGS=-L/usr/local/lib -lhdf5_hl -lhdf5 -lz ../liblib/.libs/libnetcdf.a -ldl -lm -lcurl
|
|
|
|
|
|
|
|
CC=/usr/local/bin/mpicc
|
|
|
|
LDFLAGS=-L/usr/local/lib -lhdf5_hl -lhdf5 -lz ../liblib/.libs/libnetcdf.a -ldl -lcurl -lpnetcdf -lmpich -lm
|
2012-04-10 06:03:02 +08:00
|
|
|
|
|
|
|
# cd .. ; ${MAKE} all
|
|
|
|
|
2015-08-16 06:26:35 +08:00
|
|
|
LLP=/usr/local/lib:${LD_LIBRARY_PATH}
|
|
|
|
|
2012-04-10 06:03:02 +08:00
|
|
|
all::
|
2015-08-16 06:26:35 +08:00
|
|
|
echo ${LD_RUN_PATH}
|
|
|
|
export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
|
|
|
|
${CC} -o t ${CFLAGS} ${T}.c ${LDFLAGS}; \
|
|
|
|
${CMD} ./t
|
|
|
|
|
|
|
|
cpp::
|
|
|
|
${CC} -E ${CFLAGS} ${T}.c > ${T}.txt
|
2012-04-10 06:03:02 +08:00
|
|
|
|
2015-08-16 06:26:35 +08:00
|
|
|
all::
|
|
|
|
echo ${LD_RUN_PATH}
|
|
|
|
export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
|
|
|
|
gcc -o t ${CFLAGS} ${T}.c ${LDFLAGS}; \
|
|
|
|
${CMD} ./t
|