-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
65 lines (57 loc) · 2.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
CPPSOURCES=ols.cpp random.cpp mlp.cpp stats.cpp owo.cpp \
timer.cpp setup.cpp main.cpp derivs.cpp olf.cpp\
newton.cpp cgrad.cpp train.cpp cgutils.cpp validate.cpp matrix.cpp matops.cpp
vpath %.cpp src
vpath %.c src
INCLUDE := include
CPPSOURCES2=ols.cpp random.cpp mlp.cpp stats.cpp owo.cpp \
timer.cpp setup.cpp main2.cpp derivs.cpp olf.cpp\
newton.cpp cgrad.cpp train.cpp cgutils.cpp validate.cpp
PROC_SOURCES=ols.cpp random.cpp mlp.cpp stats.cpp owo.cpp \
timer.cpp setup.cpp matops.cpp matrix.cpp derivs.cpp olf.cpp\
newton.cpp cgrad.cpp train.cpp process.cpp
LM_SOURCES=mlp_lm.cpp allocmem.cpp conjugat.cpp get.cpp random.cpp \
lm_conj.cpp setup.cpp lmfuncs.cpp matrix.cpp mlp.cpp matops.cpp \
stats.cpp
LM_CSOURCES= mt19937ar.c
<<<<<<< HEAD
CSOURCES=allocmem.c mt19937ar.c readutils.c #utils.c
=======
CSOURCES=allocmem.c mt19937ar.c readutils.c
>>>>>>> 9b5cd6d9cb5ffb6a33b6b1c33a339abfa5e5f87c
FSOURCES=
F77 = gfortran
CC=gcc
CXX=g++
CFLAGS=-g -c -Wall
LD=ld
LDFLAGS= -L/usr/local/atlas/lib -lf77blas -lcblas -ltatlas -lm -lgfortran -lrt
MKLFLAGS= -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread -lrt
CPPOBJECTS=$(CPPSOURCES:.cpp=.o)
CPPOBJECTS2=$(CPPSOURCES2:.cpp=.o)
PROC_OBJS=$(PROC_SOURCES:.cpp=.o)
LM_OBJS=$(LM_SOURCES:.cpp=.o)
LM_COBJS=$(LM_CSOURCES:.c=.o)
UTESTOBJS = unit_tester.cpp matops.cpp matrix.cpp
COBJS=$(CSOURCES:.c=.o)
FOBJS=$(FSOURCES:.f=.o)
EXECUTABLE=mlp
mlp: $(CPPOBJECTS) $(COBJS) $(FOBJS)
$(CXX) -o $@ $(CPPOBJECTS) $(COBJS) $(FOBJS) $(LDFLAGS)
mlp2: $(CPPOBJECTS2) $(COBJS) $(FOBJS)
$(CXX) -o $@ $(CPPOBJECTS2) $(COBJS) $(FOBJS) $(LDFLAGS)
all: mlp process
.cpp.o:
$(CXX) -I$(INCLUDE) $(CFLAGS) $< -o $@
.c.o:
$(CC) -I$(INCLUDE) $(CFLAGS) $< -o $@
.f.o:
$(F77) -c $< -o $@
process: $(PROC_OBJS) $(COBJS)
$(CXX) -o $@ $(PROC_OBJS) $(COBJS) $(LDFLAGS)
lm: $(LM_OBJS) $(LM_COBJS)
$(CXX) -g -o $@ $(LM_OBJS) $(LM_COBJS) $(LDFLAGS)
unit_test: unit_tester.cpp
$(CXX) -g -o $@ $(UTESTOBJS) -lptlapack -lf77blas -lcblas -ltatlas -lgfortran
clean:
rm *.o