Commit 907c8beb authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Add cluster / sphere switch to code entry point

parent 73f64cc5
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3,10 +3,13 @@

#include <cstdio>
#include <string>
#ifndef INCLUDE_CONFIGURATION_H_
#include "include/Configuration.h"
#endif

using namespace std;

extern void cluster();
extern void sphere();

/*! \brief Main program entry point.
@@ -18,6 +21,8 @@ extern void sphere();
 * the configuration and runs the main program.
 */
int main(int argc, char **argv) {
	sphere();
	bool is_sphere = true;
	if (is_sphere) sphere();
	else cluster();
	return 0;
}
+5 −2
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@ edfb: edfb.o
sph: sph.o
	$(FC) $(FCFLAGS) -o $(BUILDDIR)/sph $(BUILDDIR)/sph.o $(LFLAGS)

np_sphere: $(BUILDDIR)/np_sphere.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sphere.o
	$(CXX) $(CXXFLAGS) $(CXXLFLAGS) -o $(BUILDDIR)/np_sphere $(BUILDDIR)/np_sphere.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sphere.o
np_sphere: $(BUILDDIR)/np_sphere.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sphere.o $(BUILDDIR)/cluster.o
	$(CXX) $(CXXFLAGS) $(CXXLFLAGS) -o $(BUILDDIR)/np_sphere $(BUILDDIR)/np_sphere.o $(BUILDDIR)/Commons.o $(BUILDDIR)/Configuration.o $(BUILDDIR)/Parsers.o $(BUILDDIR)/sphere.o $(BUILDDIR)/cluster.o

$(BUILDDIR)/np_sphere.o:
	$(CXX) $(CXXFLAGS) -c ../np_sphere.cpp -o $(BUILDDIR)/np_sphere.o
@@ -29,6 +29,9 @@ $(BUILDDIR)/Configuration.o:
$(BUILDDIR)/Parsers.o:
	$(CXX) $(CXXFLAGS) -c ../libnptm/Parsers.cpp -o $(BUILDDIR)/Parsers.o

$(BUILDDIR)/cluster.o:
	$(CXX) $(CXXFLAGS) -c ../cluster/cluster.cpp -o $(BUILDDIR)/cluster.o

$(BUILDDIR)/sphere.o:
	$(CXX) $(CXXFLAGS) -c sphere.cpp -o $(BUILDDIR)/sphere.o