2020-09-27 23:36:49 +00:00
|
|
|
|
2020-09-28 18:26:59 +00:00
|
|
|
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
|
|
|
|
2020-09-27 23:36:49 +00:00
|
|
|
RM = rm -rf
|
|
|
|
|
2020-09-28 23:14:23 +00:00
|
|
|
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
2020-09-28 18:26:59 +00:00
|
|
|
INCLUDE_DIRS = -I../include -I$(GTEST_HOME)/include
|
|
|
|
|
|
|
|
SAI_OBJDIR = obj
|
|
|
|
SAI_LIBDIR = ../lib
|
|
|
|
SAI_LIBNAME = libSAInteg.a
|
|
|
|
SAI_LIBOBJS = ${SAI_OBJDIR}/Integrator.o
|
|
|
|
|
|
|
|
LIBDIRS = -L${SAI_LIBDIR} -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib
|
2020-09-27 23:36:49 +00:00
|
|
|
|
2020-10-29 17:30:38 +00:00
|
|
|
all: test
|
2020-09-28 04:21:25 +00:00
|
|
|
|
2020-10-29 17:30:38 +00:00
|
|
|
test: SAIntegrator_unittest RootFinder_unittest
|
2020-09-28 05:44:30 +00:00
|
|
|
./SAIntegrator_unittest --gtest_output=xml:${TRICK_HOME}/trick_test/SAIntegrator_unittest.xml
|
2020-10-29 17:30:38 +00:00
|
|
|
./RootFinder_unittest --gtest_output=xml:${TRICK_HOME}/trick_test/RootFinder_unittest.xml
|
2020-09-28 04:21:25 +00:00
|
|
|
|
2020-09-28 04:36:03 +00:00
|
|
|
SAIntegrator_unittest.o : SAIntegrator_unittest.cc
|
2020-09-28 23:14:23 +00:00
|
|
|
$(TRICK_CXX) $(TRICK_CPPFLAGS) $(INCLUDE_DIRS) -c $<
|
2020-09-27 23:36:49 +00:00
|
|
|
|
2020-09-28 18:26:59 +00:00
|
|
|
SAIntegrator_unittest : ${SAI_LIBDIR}/${SAI_LIBNAME} SAIntegrator_unittest.o
|
2020-09-28 23:14:23 +00:00
|
|
|
$(TRICK_CXX) $(TRICK_CPPFLAGS) -o $@ $^ ${LIBDIRS} -lSAInteg -lgtest -lgtest_main -lpthread
|
2020-09-27 23:36:49 +00:00
|
|
|
|
2020-10-29 17:30:38 +00:00
|
|
|
RootFinder_unittest.o : RootFinder_unittest.cc
|
|
|
|
$(TRICK_CXX) $(TRICK_CPPFLAGS) $(INCLUDE_DIRS) -c $<
|
|
|
|
|
|
|
|
RootFinder_unittest : ${SAI_LIBDIR}/${SAI_LIBNAME} RootFinder_unittest.o
|
|
|
|
$(TRICK_CXX) $(TRICK_CPPFLAGS) -o $@ $^ ${LIBDIRS} -lSAInteg -lgtest -lgtest_main -lpthread
|
|
|
|
|
2020-09-28 18:26:59 +00:00
|
|
|
${SAI_LIBDIR}/${SAI_LIBNAME} :
|
2020-09-27 23:36:49 +00:00
|
|
|
$(MAKE) -C ..
|
|
|
|
|
|
|
|
clean:
|
|
|
|
${RM} *.o
|
|
|
|
|
|
|
|
spotless: clean
|
2020-09-28 05:44:30 +00:00
|
|
|
${RM} SAIntegrator_unittest
|