mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 15:26:41 +00:00
33 lines
503 B
Makefile
33 lines
503 B
Makefile
|
RM = rm -rf
|
||
|
CPP = g++
|
||
|
|
||
|
#CXXFLAGS += -DDIAGONAL_NEIGHBORS
|
||
|
|
||
|
INCLUDE_DIRS = -Iinclude
|
||
|
OBJDIR = obj
|
||
|
LIBDIR = lib
|
||
|
LIBNAME = libBattery.a
|
||
|
LIBOBJS = $(OBJDIR)/DCBattery.o
|
||
|
|
||
|
all: ${LIBDIR}/${LIBNAME}
|
||
|
|
||
|
$(LIBOBJS): $(OBJDIR)/%.o : src/%.cpp | $(OBJDIR)
|
||
|
$(CPP) $(CXXFLAGS) ${INCLUDE_DIRS} -c $< -o $@
|
||
|
|
||
|
${LIBDIR}/${LIBNAME}: ${LIBOBJS} | ${LIBDIR}
|
||
|
ar crs $@ ${LIBOBJS}
|
||
|
|
||
|
${OBJDIR}:
|
||
|
mkdir -p ${OBJDIR}
|
||
|
|
||
|
${LIBDIR}:
|
||
|
mkdir -p ${LIBDIR}
|
||
|
|
||
|
clean:
|
||
|
${RM} *~
|
||
|
${RM} ${OBJDIR}
|
||
|
|
||
|
spotless: clean
|
||
|
${RM} ${LIBDIR}/${LIBNAME}
|
||
|
|