2016-01-06 12:26:25 +08:00
|
|
|
# Test c output
|
2016-05-04 11:17:06 +08:00
|
|
|
T=tst_fileinfo
|
2016-01-06 12:26:25 +08:00
|
|
|
#CMD=valgrind --leak-check=full
|
2016-05-04 11:17:06 +08:00
|
|
|
CMD=gdb --args
|
2016-01-06 12:26:25 +08:00
|
|
|
|
2016-05-04 11:17:06 +08:00
|
|
|
#PAR=1
|
2016-01-06 12:26:25 +08:00
|
|
|
|
2016-05-04 11:17:06 +08:00
|
|
|
CFLAGS=-Wall -g -O0 -I.. -I../include
|
|
|
|
|
|
|
|
ifdef PAR
|
|
|
|
CC=mpicc
|
|
|
|
#CC=/usr/local/bin/mpicc
|
|
|
|
LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -ldl -lcurl -lpnetcdf -lmpich -lm
|
2016-01-06 12:26:25 +08:00
|
|
|
else
|
2016-05-04 11:17:06 +08:00
|
|
|
CC=gcc
|
|
|
|
#LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl
|
|
|
|
LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -ldl -lm -lcurl
|
2016-01-06 12:26:25 +08:00
|
|
|
endif
|
|
|
|
|
2016-05-04 11:17:06 +08:00
|
|
|
# cd .. ; ${MAKE} all
|
|
|
|
|
|
|
|
LLP=/usr/local/lib:${LD_LIBRARY_PATH}
|
|
|
|
|
|
|
|
all:: cmp
|
|
|
|
export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
|
|
|
|
${CMD} ./t
|
|
|
|
|
|
|
|
cmp::
|
|
|
|
export LD_LIBRARY_PATH=${LLP}; export CFLAGS; export LDFLAGS; \
|
|
|
|
${CC} -o t ${CFLAGS} ${T}.c ${SRC} ${LDFLAGS}; \
|
2016-01-06 12:26:25 +08:00
|
|
|
|
|
|
|
cpp::
|
|
|
|
${CC} -E ${CFLAGS} ${T}.c > ${T}.txt
|