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

6
CXXFLAGS = -g -Wall -fmessage-length=0 #-I../boost/
kruger's avatar
kruger committed
7
8
9

OBJS = CRandomGenerator.o CSelectionOperator.o CEvolutionaryAlgorithm.o\
	   CStoppingCriterion.o COptionParser.o CPopulation.o CIndividual.o\
kruger's avatar
kruger committed
10
	CGnuplot.o CCmaes.o CCmaesCuda.o Parameters.o CGPNode.o\
11
12
13
14
15
	CComUDPLayer.o CCuda.o CStats.o

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

kruger's avatar
kruger committed
17
18
19
20
ifeq ($(EZ_CUDA),1)
OBJS += CCuda.o
endif

21
22
23
ifneq ("$(OS)","")
LIBS = -L"C:\MinGW\lib" -lws2_32 -lwinmm
endif
kruger's avatar
kruger committed
24

25
26
27
28
29
30
TARGET = libeasea.a
ifneq ("$(OS)","")
	CPPFLAGS=-I..\boost\ #-pg
else
	CPPFLAGS=-I/usr/local/cuda/include/ -I../boost/ #-pg
endif
kruger's avatar
kruger committed
31
32

$(TARGET): $(OBJS)
33
	ar rcs $@ $^ 
kruger's avatar
kruger committed
34
35

%.o:%.cpp
36
	$(CXX) $(LIBS) -c $(CXXFLAGS) $(CPPFLAGS) $^ 
kruger's avatar
kruger committed
37
38
39

all:	$(TARGET)
clean:
40
41
42
ifneq ("$(OS)","")
	-del $(OBJS) $(TARGET) CCuda.o
else
kruger's avatar
kruger committed
43
	rm -f $(OBJS) $(TARGET)  CCuda.o
44
endif