forked from attractivechaos/kann
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (51 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
66
67
68
CC= gcc
CFLAGS= -g -Wall -Wc++-compat -O2
CPPFLAGS=
INCLUDES= -I.
EXE= examples/mlp examples/mnist-cnn examples/inspect examples/textgen examples/rnn-bit \
examples/ae examples/vae examples/rnn-lyap
LIBS= -lm -lz
ifdef CBLAS
CPPFLAGS+=-DHAVE_CBLAS
INCLUDES+=-I$(CBLAS)/include
LIBS+=-L$(CBLAS)/lib -lopenblas
endif
.SUFFIXES:.c .o
.PHONY:all clean depend
.c.o:
$(CC) -c $(CFLAGS) $(INCLUDES) $(CPPFLAGS) $< -o $@
all:kautodiff.o kann.o kann_extra/kann_data.o $(EXE)
kann_extra/kann_data.o:kann_extra/kann_data.c
$(CC) -c $(CFLAGS) -DHAVE_ZLIB $< -o $@
examples/mlp:examples/mlp.o kautodiff.o kann.o kann_extra/kann_data.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
examples/ae:examples/ae.o kautodiff.o kann.o kann_extra/kann_data.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
examples/vae:examples/vae.o kautodiff.o kann.o kann_extra/kann_data.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
examples/textgen:examples/textgen.o kautodiff.o kann.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
examples/rnn-bit:examples/rnn-bit.o kautodiff.o kann.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
examples/rnn-lyap:examples/rnn-lyap.o kautodiff.o kann.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
examples/inspect:examples/inspect.o kautodiff.o kann.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
examples/mnist-cnn:examples/mnist-cnn.o kautodiff.o kann.o kann_extra/kann_data.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
clean:
rm -fr *.o */*.o a.out */a.out *.a *.dSYM */*.dSYM $(EXE)
depend:
(LC_ALL=C; export LC_ALL; makedepend -Y -- $(CFLAGS) $(DFLAGS) -- *.c kann_extra/*.c examples/*.c)
# DO NOT DELETE
kann.o: kann.h kautodiff.h
kautodiff.o: kautodiff.h
kann_extra/kann_data.o: kann_extra/kseq.h kann_extra/kann_data.h
examples/ae.o: kann.h kautodiff.h kann_extra/kann_data.h
examples/inspect.o: kann.h kautodiff.h
examples/mlp.o: kann.h kautodiff.h kann_extra/kann_data.h
examples/mnist-cnn.o: kann_extra/kann_data.h kann.h kautodiff.h
examples/rnn-bit.o: kann.h kautodiff.h
examples/rnn-lyap.o: kann.h kautodiff.h
examples/textgen.o: kann.h kautodiff.h
examples/vae.o: kann.h kautodiff.h kann_extra/kann_data.h