mirror of
https://github.com/nasa/trick.git
synced 2024-12-20 05:37:55 +00:00
53 lines
1002 B
Makefile
53 lines
1002 B
Makefile
RM = rm -rf
|
|
CC = cc
|
|
CPP = c++
|
|
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
|
|
|
|
|
#include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib
|
|
|
|
CFLAGS = -g -Wall -Wextra -std=c++11 $(TRICK_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)
|
|
$(CPP) $(CFLAGS) ${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)
|
|
|
|
clean:
|
|
${RM} -r ${OBJDIR}
|
|
${MAKE} -C test clean
|
|
|
|
spotless:
|
|
${RM} ${OBJDIR}
|
|
${RM} ${LIBDIR}
|
|
${MAKE} -C unittest spotless
|
|
${MAKE} -C examples spotless
|