1# 2# Copyright (C) 2013, Northwestern University and Argonne National Laboratory 3# See COPYRIGHT notice in top-level directory. 4# 5# $Id: Makefile.in 2590 2016-10-31 21:37:02Z wkliao $ 6# 7# @configure_input@ 8 9srcdir = @srcdir@ 10VPATH = @srcdir@ 11 12include ../../macros.make 13 14INCLUDES = -I../../src/lib -I$(srcdir)/../common 15FPPFLAGS += -I../../src/libf @FC_MODINC@../../src/libf90 16F90FLAGS += @FC_MODOUT@. 17LDFLAGS := $(LDFLAGS) -L../common 18LIBS := $(LIBRARY) -ltestutils $(LIBS) @LCOV_LIB@ 19 20C_SRCS = test_subfile.c 21 22CXX_SRCS = 23 24F77_SRCS = 25 26PROGS = $(C_SRCS:.c=) 27OBJS = $(C_SRCS:.c=.o) 28ifeq (@has_mpicxx@, yes) 29PROGS += $(CXX_SRCS:.cpp=) 30OBJS += $(CXX_SRCS:.cpp=.o) 31endif 32 33ifeq (@has_fortran@, yes) 34PROGS += $(F77_SRCS:.f=) 35OBJS += $(F77_SRCS:.f=.o) 36endif 37 38GARBAGE = $(PROGS) *.nc 39PACKING_LIST = $(C_SRCS) $(F77_SRCS) $(CXX_SRCS) Makefile.in depend README 40 41all: $(PROGS) 42 43$(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o): $(srcdir)/../common/testutils.h 44 45$(PROGS): ../common/libtestutils.a 46 47../common/libtestutils.a: 48 set -e; cd ../common && $(MAKE) $(MFLAGS) all 49 50test_subfile: test_subfile.o $(LIBRARY) 51 $(LINK.c) $< $(LDFLAGS) $(LIBS) 52 53testing check verbose_testing: 54 55TEST_MPIRUN_2 = $(subst NP,2,$(TEST_MPIRUN)) 56TEST_MPIRUN_4 = $(subst NP,4,$(TEST_MPIRUN)) 57 58ptest2: $(PROGS) 59 @for i in $(PROGS); do ( \ 60 $(TEST_MPIRUN_2) ./$$i -f $(TEST_OUTDIR)/testfile.nc -s 2 \ 61 ; ) ; done 62 63ptest4: $(PROGS) 64 @for i in $(PROGS); do ( \ 65 $(TEST_MPIRUN_4) ./$$i -f $(TEST_OUTDIR)/testfile.nc -s 2 \ 66 ; ) ; done 67 68ptest: ptest4 69ptests: ptest2 ptest4 70ptest6 ptest8 ptest10: 71 72include $(srcdir)/../../rules.make 73include $(srcdir)/depend 74 75$(LIBRARY): ; 76 77