Skip to content

Commit fe1e5ff

Browse files
authored
Merge pull request #1430 from TeamCOMPAS/fix_compas_build_path
fix buildpath (CI fix)
2 parents a7eed61 + 92cf4e6 commit fe1e5ff

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/Makefile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
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-
91
CPP := g++
102

113
# Build configuration: DOCKER_BUILD=1 for Docker, otherwise local
@@ -58,10 +50,10 @@ BOOSTLIBS := -lboost_filesystem -lboost_program_options -lboost_system
5850
HDF5LIBS := -lhdf5_hl_cpp -lhdf5_cpp -lhdf5_hl -lhdf5
5951
LFLAGS := -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

6658
static: $(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
8682
clean:
8783
@echo "Removing generated files..."
88-
@rm -rf $(ODIR) $(BDIR)
84+
@rm -rf $(ODIR) $(BDIR) COMPAS

0 commit comments

Comments
 (0)