trick/trick_source/trick_utils/var_binary_parser/Makefile

54 lines
1.0 KiB
Makefile
Raw Normal View History

2023-01-11 15:27:30 +00:00
RM = rm -rf
CC = cc
CPP = c++
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
#include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib
2023-01-16 21:54:23 +00:00
CPP_FLAGS = -g -Wall -Wextra -std=c++11 $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS)
2023-01-11 15:27:30 +00:00
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)
2023-01-16 21:54:23 +00:00
echo $(CPP_FLAGS)
$(CPP) $(CPP_FLAGS) ${INCLUDE_DIRS} -c $< -o $@
2023-01-11 15:27:30 +00:00
${LIBDIR}/${LIBNAME}: ${LIBOBJS} | ${LIBDIR}
ar crs $@ ${LIBOBJS}
${OBJDIR}:
mkdir -p ${OBJDIR}
${LIBDIR}:
mkdir -p ${LIBDIR}
${TRICK_LIB}: ${LIBDIR}/${LIBNAME}
cp ${LIBDIR}/${LIBNAME} $(TRICK_LIB)
clean:
${RM} -r ${OBJDIR}
${MAKE} -C test clean
spotless:
${RM} ${OBJDIR}
${RM} ${LIBDIR}
${MAKE} -C unittest spotless
${MAKE} -C examples spotless