فهرست منبع

Amelioration makefile

Arthur Brandao 6 سال پیش
والد
کامیت
7fa6d5ad6c
2فایلهای تغییر یافته به همراه29 افزوده شده و 6 حذف شده
  1. 7 6
      Partie_1/Hybride/Makefile
  2. 22 0
      Partie_1/Hybride/Makefile.old

+ 7 - 6
Partie_1/Hybride/Makefile

@@ -1,17 +1,18 @@
 FLAGS = -std=c++0x -O2 -g -Wall -fmessage-length=0 -Wreorder -Wwrite-strings -Wsign-compare
 
-EXEC = Main
+LIBS = -lpthread
 
 OBJS = GSATThreadMPI.o GSAT/GSAT.o GSAT/ArrayFiller.o GSAT/CFormula.o
 
-LIBS = -lpthread
-
 TARGET = GSATSolver
 
-$(TARGET):	$(OBJS)
-	mpic++ -o $(TARGET) $(EXEC).cpp $(FLAGS) $(OBJS) $(LIBS)
 
-all: $(TARGET)
+all:
+	g++ $(FLAGS) -c -o GSAT/GSAT.o GSAT/GSAT.cpp
+	g++ $(FLAGS) -c -o GSAT/ArrayFiller.o GSAT/ArrayFiller.cpp
+	g++ $(FLAGS) -c -o GSAT/CFormula.o GSAT/CFormula.cpp
+	mpic++ $(FLAGS) -c -o GSATThreadMPI.o GSATThreadMPI.cpp
+	mpic++ -o $(TARGET) Main.cpp $(FLAGS) GSATThreadMPI.o GSAT/GSAT.o GSAT/ArrayFiller.o GSAT/CFormula.o $(LIBS)
 
 clean:
 	rm -f $(OBJS) $(TARGET)

+ 22 - 0
Partie_1/Hybride/Makefile.old

@@ -0,0 +1,22 @@
+FLAGS = -std=c++0x -O2 -g -Wall -fmessage-length=0 -Wreorder -Wwrite-strings -Wsign-compare
+
+EXEC = Main
+
+OBJS = GSATThreadMPI.o GSAT/GSAT.o GSAT/ArrayFiller.o GSAT/CFormula.o
+
+LIBS = -lpthread
+
+TARGET = GSATSolver
+
+$(TARGET):	$(OBJS)
+	mpic++ -o $(TARGET) $(EXEC).cpp $(FLAGS) $(OBJS) $(LIBS)
+
+all: $(TARGET)
+
+clean:
+	rm -f $(OBJS) $(TARGET)
+	rm -rf *.*~
+	rm -rf *~
+
+run: 
+	@mpirun -n 3 ./GSATSolver -i ../../benchmarks/uf150/uf150-099.cnf -t 2