2020-09-27 23:36:49 +00:00
|
|
|
|
|
|
|
RM = rm -rf
|
|
|
|
CC = cc
|
|
|
|
CPP = c++
|
|
|
|
|
2023-01-11 15:27:30 +00:00
|
|
|
CFLAGS = -g -Wall -std=c++11 ${TRICK_CXXFLAGS}
|
2020-09-27 23:36:49 +00:00
|
|
|
INCLUDE_DIRS = -Iinclude
|
|
|
|
OBJDIR = obj
|
|
|
|
LIBDIR = lib
|
|
|
|
LIBNAME = libSAInteg.a
|
2020-10-29 17:30:38 +00:00
|
|
|
LIBOBJS = ${OBJDIR}/SAIntegrator.o \
|
|
|
|
${OBJDIR}/RootFinder.o
|
2020-09-27 23:36:49 +00:00
|
|
|
|
|
|
|
all: test examples
|
|
|
|
|
|
|
|
test: ${LIBDIR}/${LIBNAME}
|
2020-09-29 18:25:25 +00:00
|
|
|
${MAKE} -C unittest
|
2020-09-27 23:36:49 +00:00
|
|
|
|
|
|
|
examples: ${LIBDIR}/${LIBNAME}
|
|
|
|
${MAKE} -C examples
|
|
|
|
|
|
|
|
$(LIBOBJS): $(OBJDIR)/%.o : src/%.cpp | $(OBJDIR)
|
|
|
|
$(CPP) $(CFLAGS) ${INCLUDE_DIRS} -c $< -o $@
|
|
|
|
|
|
|
|
${LIBDIR}/${LIBNAME}: ${LIBOBJS} | ${LIBDIR}
|
|
|
|
ar crs $@ ${LIBOBJS}
|
|
|
|
|
|
|
|
${OBJDIR}:
|
|
|
|
mkdir -p ${OBJDIR}
|
|
|
|
|
|
|
|
${LIBDIR}:
|
|
|
|
mkdir -p ${LIBDIR}
|
|
|
|
|
|
|
|
clean:
|
|
|
|
${RM} *~
|
|
|
|
${RM} ${OBJDIR}
|
2020-09-29 18:25:25 +00:00
|
|
|
${MAKE} -C unittest clean
|
2020-09-27 23:36:49 +00:00
|
|
|
${MAKE} -C examples clean
|
|
|
|
|
|
|
|
spotless:
|
|
|
|
${RM} *~
|
|
|
|
${RM} ${OBJDIR}
|
|
|
|
${RM} ${LIBDIR}
|
2020-09-29 18:25:25 +00:00
|
|
|
${MAKE} -C unittest spotless
|
2020-09-27 23:36:49 +00:00
|
|
|
${MAKE} -C examples spotless
|