Makefile 920 Bytes
Newer Older
1 2 3 4
UNAME = $(shell uname)
ifeq ($(shell uname -o 2>/dev/null),Msys)
	OS := MINGW
endif
5

6 7 8 9
ifeq ($(shell uname -o 2>/dev/null),Cygwin)
	OS := CYGWIN
endif

Joseph Pallamidessi's avatar
Joseph Pallamidessi committed
10
CXXFLAGS = -g -O1 -fopenmp -Wall -fmessage-length=0 -I/usr/local/cuda/include -I../boost/
kruger's avatar
kruger committed
11 12 13

OBJS = CRandomGenerator.o CSelectionOperator.o CEvolutionaryAlgorithm.o\
	   CStoppingCriterion.o COptionParser.o CPopulation.o CIndividual.o\
Frédéric Krüger's avatar
Frédéric Krüger committed
14
	CGrapher.o CCmaes.o CCmaesCuda.o Parameters.o CGPNode.o\
Ogier Maitre's avatar
Ogier Maitre committed
15
	CComUDPLayer.o CStats.o CGPNode.o
16 17

ifneq ("$(OS)","")
18
OBJS += inet_pton.o
19
endif
kruger's avatar
kruger committed
20

Ogier Maitre's avatar
Ogier Maitre committed
21 22 23
#ifeq ($(EZ_CUDA),1)
#OBJS += CCuda.o
#endif
kruger's avatar
kruger committed
24

25 26
ifneq ("$(OS)","")
LIBS = -L"C:\MinGW\lib" -lws2_32 -lwinmm
27
CXXFLAGS += -I"C:\MinGW\include"
28
endif
kruger's avatar
kruger committed
29

30
TARGET = libeasea.a
31 32 33 34 35
#ifneq ("$(OS)","")
#	CPPFLAGS=-I..\boost\ #-pg
#else
#	CPPFLAGS=-I../boost/ #-pg
#endif
kruger's avatar
kruger committed
36 37

$(TARGET): $(OBJS)
38
	ar rcs $@ $^ 
kruger's avatar
kruger committed
39 40

%.o:%.cpp
41
	$(CXX) $(LIBS) -c $(CXXFLAGS) $(CPPFLAGS) $^ 
kruger's avatar
kruger committed
42 43 44

all:	$(TARGET)
clean:
Ogier Maitre's avatar
Ogier Maitre committed
45
	rm -f $(OBJS) $(TARGET)