Fix SAIntegrator Makefile to use Makefile.common

This commit is contained in:
Penn, John M 047828115 2020-09-28 13:26:59 -05:00
parent 3bb01166e6
commit 40bc3e2425

View File

@ -1,14 +1,19 @@
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
RM = rm -rf
CC = cc
CPP = c++
CFLAGS = -g -Wall
INCLUDE_DIRS = -I../include
OBJDIR = obj
LIBDIR = ../lib
LIBNAME = libSAInteg.a
LIBOBJS = ${OBJDIR}/Integrator.o
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
all: test
@ -18,10 +23,10 @@ test: SAIntegrator_unittest
SAIntegrator_unittest.o : SAIntegrator_unittest.cc
$(CPP) $(CFLAGS) $(INCLUDE_DIRS) -c $<
SAIntegrator_unittest : ${LIBDIR}/${LIBNAME} SAIntegrator_unittest.o
$(CPP) $(CFLAGS) -o $@ $^ -L${LIBDIR} -lSAInteg -lgtest -lgtest_main -lpthread
SAIntegrator_unittest : ${SAI_LIBDIR}/${SAI_LIBNAME} SAIntegrator_unittest.o
$(CPP) $(CFLAGS) -o $@ $^ ${LIBDIRS} -lSAInteg -lgtest -lgtest_main -lpthread
${LIBDIR}/${LIBNAME} :
${SAI_LIBDIR}/${SAI_LIBNAME} :
$(MAKE) -C ..
clean: