-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
41 lines (30 loc) · 811 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
#
# Makefile
#
# Paul Reiners
# Computer Science 50
# Final Project
#
# compiler to use
CC = clang
# flags to pass compiler
CFLAGS = -ggdb -O0 -Qunused-arguments -std=c99 -Wall -Werror
# name for executable
EXE = project
# space-separated list of header files
HDRS = ./include/aux.h ./include/bbp.h ./include/pi.h ./include/log2.h
# space-separated list of libraries, if any,
# each of which should be prefixed with -l
LIBS = -lm -lgmp
# space-separated list of source files
SRCS = ./src/project.c ./src/aux.c ./src/bbp.c ./src/pi.c ./src/log2.c
# automatically generated list of object files
OBJS = $(SRCS:.c=.o)
# default target
$(EXE): $(OBJS) $(HDRS) Makefile
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
# dependencies
$(OBJS): $(HDRS) Makefile
# housekeeping
clean:
rm -f core $(EXE) *.o ./src/*.o