File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 1-
2- # use GNU C++ compiler by default
3- #
4- # can be overridden with CPP parameter
5- #
6- # e.g. make CPP=clang will use clang instead of g++
7- # (note uppercase 'CPP' and no whitespace around '=')
8-
91CPP := g++
102
113# Build configuration: DOCKER_BUILD=1 for Docker, otherwise local
@@ -58,10 +50,10 @@ BOOSTLIBS := -lboost_filesystem -lboost_program_options -lboost_system
5850HDF5LIBS := -lhdf5_hl_cpp -lhdf5_cpp -lhdf5_hl -lhdf5
5951LFLAGS := -L$(GSLLIBDIR ) -L$(BOOSTLIBDIR ) -L$(HDF5LIBDIR ) -Xlinker -rpath -Xlinker $(BOOSTLIBDIR ) $(HDF5LIBS ) $(LIBS ) $(GSLLIBS ) $(BOOSTLIBS ) $(LFLAGS_SPECIFIC )
6052
61- .PHONY : all static fast staticfast clean
53+ .PHONY : all static fast staticfast clean link
6254
6355# Main targets
64- all : $(EXE )
56+ all : $(EXE ) link
6557
6658static : $(EXE ) _STATIC
6759
@@ -77,6 +69,10 @@ $(EXE)_STATIC: $(OBJS)
7769 @mkdir -p $(BDIR )
7870 $(CPP ) $(OBJS ) $(LFLAGS ) -static -o $@
7971
72+ # Create a symbolic link for backward compatibility
73+ link : $(EXE )
74+ @ln -sf $(EXE ) COMPAS
75+
8076# Pattern rule to compile source files into object files
8177$(ODIR ) /% .o : % .cpp
8278 @mkdir -p $(ODIR )
@@ -85,4 +81,4 @@ $(ODIR)/%.o: %.cpp
8581# Clean-up rule
8682clean :
8783 @echo " Removing generated files..."
88- @rm -rf $(ODIR ) $(BDIR )
84+ @rm -rf $(ODIR ) $(BDIR ) COMPAS
You can’t perform that action at this time.
0 commit comments