Commit 074c1e12 authored by pallamidessi's avatar pallamidessi
Browse files

Merge branch 'windows' into osx

parents a29bb010 0d2086a4
...@@ -12,16 +12,16 @@ OBJ= build/EaseaSym.o build/EaseaParse.o build/EaseaLex.o alexyacc/libalex.a bui ...@@ -12,16 +12,16 @@ OBJ= build/EaseaSym.o build/EaseaParse.o build/EaseaLex.o alexyacc/libalex.a bui
$(EXEC):build bin $(OBJ) $(EXEC):build bin $(OBJ)
$(CXX) $(CPPFLAGS) $(LDFLAGS) $(OBJ) -o $@ $(CXX) $(CPPFLAGS) $(LDFLAGS) $(OBJ) -o $@
ifneq ("$(OS)","") ifneq ("$(OS)","")
@echo # #
@echo # Congratulations ! It looks like you compiled EASEA successfully. # Congratulations ! It looks like you compiled EASEA successfully.
@echo # #
@echo # You can use easea from this directory by typing : # You can use easea from this directory by typing :
@echo # For example : # For example :
@echo # easea.exe examples\weierstrass_std\weierstrass.ez # easea.exe examples\weierstrass_std\weierstrass.ez
@echo # Go to the target directory and type make -f weierstrass.mak # Go to the target directory and type make -f weierstrass.mak
@echo # #
@echo # Thanks for using EASEA. # Thanks for using EASEA.
@echo # #
else else
# #
# Congratulations ! It looks like you compiled EASEA successfully. # Congratulations ! It looks like you compiled EASEA successfully.
...@@ -136,17 +136,10 @@ libeasea/libeasea.a:libeasea/*.cpp ...@@ -136,17 +136,10 @@ libeasea/libeasea.a:libeasea/*.cpp
cd libeasea && make libeasea.a cd libeasea && make libeasea.a
clean: clean:
ifneq ("$(OS)","")
-del *.o $(EXEC).exe $(EXEC)_bin
cd alexyacc && make clean
cd libeasea && make clean
cd boost && make clean
else
rm -f build/*.o $(EXEC) $(EXEC)_bin rm -f build/*.o $(EXEC) $(EXEC)_bin
cd alexyacc && make clean cd alexyacc && make clean
cd libeasea && make clean cd libeasea && make clean
cd boost && make clean cd boost && make clean
endif
#ifeq ($(UNAME),Darwin) #ifeq ($(UNAME),Darwin)
cd boost && make clean cd boost && make clean
#endif #endif
......
...@@ -24,8 +24,4 @@ $(TARGET): $(OBJS) ...@@ -24,8 +24,4 @@ $(TARGET): $(OBJS)
all: $(TARGET) all: $(TARGET)
clean: clean:
ifneq ("$(OS)","")
-del $(OBJS) $(TARGET)
else
rm -f $(OBJS) $(TARGET) rm -f $(OBJS) $(TARGET)
endif
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#ifdef WIN32 #ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <mmsystem.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
...@@ -126,7 +128,7 @@ CEvolutionaryAlgorithm::CEvolutionaryAlgorithm(Parameters* params){ ...@@ -126,7 +128,7 @@ CEvolutionaryAlgorithm::CEvolutionaryAlgorithm(Parameters* params){
fichier.append(".r"); fichier.append(".r");
remove(fichier.c_str()); remove(fichier.c_str());
} }
#ifndef WIN32 //#ifndef WIN32
if(params->plotStats){ if(params->plotStats){
string str = "Plotting of the evolution of ";; string str = "Plotting of the evolution of ";;
string str2 = this->params->outputFilename; string str2 = this->params->outputFilename;
...@@ -134,7 +136,7 @@ CEvolutionaryAlgorithm::CEvolutionaryAlgorithm(Parameters* params){ ...@@ -134,7 +136,7 @@ CEvolutionaryAlgorithm::CEvolutionaryAlgorithm(Parameters* params){
//this->grapher = new CGrapher((this->params->offspringPopulationSize*this->params->nbGen)+this->params->parentPopulationSize, (char*)str.c_str()); //this->grapher = new CGrapher((this->params->offspringPopulationSize*this->params->nbGen)+this->params->parentPopulationSize, (char*)str.c_str());
this->grapher = new CGrapher(this->params, (char*)str.c_str()); this->grapher = new CGrapher(this->params, (char*)str.c_str());
} }
#endif //#endif
// INITIALIZE SERVER OBJECT ISLAND MODEL // INITIALIZE SERVER OBJECT ISLAND MODEL
......
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
#include <string.h> #include <string.h>
CGrapher::CGrapher(Parameters* param, char* title){ CGrapher::CGrapher(Parameters* param, char* title){
this->valid=0;
#ifdef WIN32
//TODO: Create a child process and and pipe some line from the father to the child
//(http://msdn.microsoft.com/en-us/library/windows/desktop/ms682499%28v=vs.85%29.aspx)
#endif
#ifndef WIN32 #ifndef WIN32
int toFils[2]; int toFils[2];
int toPere[2]; int toPere[2];
......
...@@ -3,7 +3,7 @@ ifeq ($(shell uname -o 2>/dev/null),Msys) ...@@ -3,7 +3,7 @@ ifeq ($(shell uname -o 2>/dev/null),Msys)
OS := MINGW OS := MINGW
endif endif
CXXFLAGS = -g -Wall -fmessage-length=0 -I/usr/local/cuda/include #-I../boost/ CXXFLAGS = -g -O1 -Wall -fmessage-length=0 -I/usr/local/cuda/include -I../boost/
OBJS = CRandomGenerator.o CSelectionOperator.o CEvolutionaryAlgorithm.o\ OBJS = CRandomGenerator.o CSelectionOperator.o CEvolutionaryAlgorithm.o\
CStoppingCriterion.o COptionParser.o CPopulation.o CIndividual.o\ CStoppingCriterion.o COptionParser.o CPopulation.o CIndividual.o\
...@@ -23,11 +23,11 @@ LIBS = -L"C:\MinGW\lib" -lws2_32 -lwinmm ...@@ -23,11 +23,11 @@ LIBS = -L"C:\MinGW\lib" -lws2_32 -lwinmm
endif endif
TARGET = libeasea.a TARGET = libeasea.a
ifneq ("$(OS)","") #ifneq ("$(OS)","")
CPPFLAGS=-I..\boost\ #-pg # CPPFLAGS=-I..\boost\ #-pg
else #else
CPPFLAGS=-I../boost/ #-pg # CPPFLAGS=-I../boost/ #-pg
endif #endif
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
ar rcs $@ $^ ar rcs $@ $^
...@@ -37,8 +37,4 @@ $(TARGET): $(OBJS) ...@@ -37,8 +37,4 @@ $(TARGET): $(OBJS)
all: $(TARGET) all: $(TARGET)
clean: clean:
ifneq ("$(OS)","")
-del $(OBJS) $(TARGET)
else
rm -f $(OBJS) $(TARGET) rm -f $(OBJS) $(TARGET)
endif
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "CComUDPLayer.h" #include "CComUDPLayer.h"
#include "CStats.h" #include "CStats.h"
#ifdef WIN32 #ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#endif #endif
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#ifdef WIN32 #ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#endif #endif
#include <time.h> #include <time.h>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment