trick/trick_source/trick_utils/var_binary_parser/Makefile
Jacqueline Deans 9c7becb4ff
Handle thread shutdown gracefully and test (#1448)
---------

Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
2023-02-08 17:58:59 -06:00

57 lines
1.1 KiB
Makefile

RM = rm -rf
CC = cc
CPP = c++
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
#include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib
CPP_FLAGS = -g -Wall -Wextra -std=c++11 $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS)
INCLUDE_DIRS = -I${TRICK_HOME}/include
OBJDIR = obj
LIBDIR = lib
LIBNAME = libtrick_var_binary_parser.a
LIBOBJS = ${OBJDIR}/var_binary_parser.o
TRICK_LIB := $(TRICK_LIB_DIR)/$(LIBNAME)
# TRICK_LIB := $(TRICK_HOME)/lib/$(LIBNAME)
trick: ${TRICK_LIB}
install: ${TRICK_LIB}
all: test
test: ${LIBDIR}/${LIBNAME}
${MAKE} -C test
$(LIBOBJS): $(OBJDIR)/%.o : src/%.cc | $(OBJDIR)
echo $(CPP_FLAGS)
$(CPP) $(CPP_FLAGS) ${INCLUDE_DIRS} -c $< -o $@
${LIBDIR}/${LIBNAME}: ${LIBOBJS} | ${LIBDIR}
ar crs $@ ${LIBOBJS}
${OBJDIR}:
mkdir -p ${OBJDIR}
${LIBDIR}:
mkdir -p ${LIBDIR}
${TRICK_LIB}: ${LIBDIR}/${LIBNAME}
cp ${LIBDIR}/${LIBNAME} $(TRICK_LIB)
real_clean: clean
clean:
${RM} -rf ${OBJDIR}
${RM} -rf ${LIBDIR}
${MAKE} -C test clean
spotless:
${RM} ${OBJDIR}
${RM} ${LIBDIR}
${MAKE} -C unittest spotless
${MAKE} -C examples spotless