-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (37 loc) · 998 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
39
40
41
42
43
44
45
46
# Where the executable files will be copied
destination := $(HOME)/bin
#opt := -DNDEBUG -O3 -finline-functions # For full optimization
opt := -O0 -fno-inline-functions # For debugging
# Flags to determine the warning messages issued by the compiler
warn := \
-Wall \
-Wcast-align \
-Wcast-qual \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wnested-externs \
-Wpointer-arith \
-Wstrict-prototypes \
-Wno-unused-parameter \
-Wno-unused-function \
-Wshadow \
-Wundef \
-Wwrite-strings
CFLAGS := -g -std=gnu99 $(warn) $(opt)
lib := -L/usr/local/lib -lgsl -lgslcblas -lpthread -lm
.c.o:
$(CC) $(CFLAGS) $(incl) -c -o ${@F} $<
# test jobqueue.c
XJOBQUEUE := xjobqueue.o jobqueue.o
xjobqueue : $(XJOBQUEUE)
$(CC) $(CFLAGS) -o $@ $(XJOBQUEUE) $(lib)
# Make dependencies file
depend : *.c *.h
echo '#Automatically generated dependency info' > depend
$(CC) -MM $(incl) *.c >> depend
clean :
rm -f *.a *.o *~
include depend
.SUFFIXES:
.SUFFIXES: .c .o
.PHONY: clean