-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (27 loc) · 1016 Bytes
/
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
CC=gcc
#CFLAGS=-O3 -D_GNU_SOURCE -Wall -std=c99 -pedantic
#CFLAGS=-O3 -DNDEBUG -D_POSIX_C_SOURCE=200809L -D_NO_MUSABLE -Wall -std=c99 -pedantic
#CFLAGS=-g -D_POSIX_C_SOURCE=200809L -Wall -std=c99 -pedantic
CFLAGS=-O3 -D_POSIX_C_SOURCE=200809L -Wall -std=c99 -pedantic
LIBS=-lm -lgsl -lgslcblas
all: scode scode-online scode-logl
scode-logl: scode-logl.o scode-model.o dlib.o
$(CC) $(CFLAGS) $^ -lm -o $@
scode-logl.o: scode-logl.c dlib.h scode-model.h
$(CC) -c $(CFLAGS) $< -o $@
scode-model.o: scode-model.c dlib.h scode-model.h
$(CC) -c $(CFLAGS) $< -o $@
scode-online: scode-online.o scode-model.o dlib.o
$(CC) $(CFLAGS) $^ -lm -o $@
scode-online.o: scode-online.c dlib.h scode-model.h
$(CC) -c $(CFLAGS) $< -o $@
scode: scode.o svec.o dlib.o
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
scode.o: scode.c svec.h rng.h dlib.h
$(CC) -c $(CFLAGS) $< -o $@
svec.o: svec.c svec.h rng.h
$(CC) -c $(CFLAGS) $< -o $@
dlib.o: dlib.c dlib.h
$(CC) -c $(CFLAGS) $< -o $@
clean:
-rm *.o scode scode-online scode-logl