Add defines to build Lepton with MSVC and traditional make

This commit is contained in:
Giacomo Fiorin 2020-04-14 16:57:04 -04:00
parent 7d71d5bfb3
commit be1f307384
1 changed files with 17 additions and 1 deletions

View File

@ -61,7 +61,7 @@ ifeq ($(COLVARS_LEPTON),no)
LEPTON_INCFLAGS = LEPTON_INCFLAGS =
COLVARS_OBJS = $(COLVARS_SRCS:.cpp=.o) COLVARS_OBJS = $(COLVARS_SRCS:.cpp=.o)
else else
LEPTON_INCFLAGS = -Ilepton/include -DLEPTON LEPTON_INCFLAGS = -Ilepton/include -DLEPTON -DLEPTON_USE_STATIC_LIBRARIES
COLVARS_OBJS = $(COLVARS_SRCS:.cpp=.o) $(LEPTON_SRCS:.cpp=.o) COLVARS_OBJS = $(COLVARS_SRCS:.cpp=.o) $(LEPTON_SRCS:.cpp=.o)
endif endif
@ -82,4 +82,20 @@ Makefile.deps: $(COLVARS_SRCS)
done done
include Makefile.deps include Makefile.deps
# Exceptions to pattern rule above for Lepton objects
lepton/src/CompiledExpression.o: lepton/src/CompiledExpression.cpp
$(CXX) $(CXXFLAGS) -Ilepton/include -DLEPTON_BUILDING_STATIC_LIBRARY -c -o $@ $<
lepton/src/ExpressionProgram.o: lepton/src/ExpressionProgram.cpp
$(CXX) $(CXXFLAGS) -Ilepton/include -DLEPTON_BUILDING_STATIC_LIBRARY -c -o $@ $<
lepton/src/ExpressionTreeNode.o: lepton/src/ExpressionTreeNode.cpp
$(CXX) $(CXXFLAGS) -Ilepton/include -DLEPTON_BUILDING_STATIC_LIBRARY -c -o $@ $<
lepton/src/Operation.o: lepton/src/Operation.cpp
$(CXX) $(CXXFLAGS) -Ilepton/include -DLEPTON_BUILDING_STATIC_LIBRARY -c -o $@ $<
lepton/src/ParsedExpression.o: lepton/src/ParsedExpression.cpp
$(CXX) $(CXXFLAGS) -Ilepton/include -DLEPTON_BUILDING_STATIC_LIBRARY -c -o $@ $<
lepton/src/Parser.o: lepton/src/Parser.cpp
$(CXX) $(CXXFLAGS) -Ilepton/include -DLEPTON_BUILDING_STATIC_LIBRARY -c -o $@ $<
include Makefile.lepton.deps # Hand-generated include Makefile.lepton.deps # Hand-generated