-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 838 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (27 loc) · 838 Bytes
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
#
# Makefile for the malloc lab
#
CC = gcc
# Change this to -O0 (big-Oh, numeral zero) if you need to use a debugger on your code
COPT = -O3
CFLAGS = -Wall -Wextra -Werror $(COPT) -g -DDRIVER -Wno-unused-function -Wno-unused-parameter
LIBS = -lm
COBJS = memlib.o fcyc.o clock.o stree.o
NOBJS = mdriver.o mm.o $(COBJS)
all: mdriver
# Regular driver
mdriver: $(NOBJS)
$(CC) $(CFLAGS) -o mdriver $(NOBJS) $(LIBS)
mm.o: mm.c mm.h memlib.h $(MC)
$(CC) $(CFLAGS) -c mm.c -o mm.o
mdriver.o: mdriver.c fcyc.h clock.h memlib.h config.h mm.h stree.h
memlib.o: memlib.c memlib.h
mm.o: mm.c mm.h memlib.h
fcyc.o: fcyc.c fcyc.h
ftimer.o: ftimer.c ftimer.h config.h
clock.o: clock.c clock.h
stree.o: stree.c stree.h
clean:
rm -f *~ *.o mdriver
handin:
@echo 'Commit your mm.c file into your GitHub repo.'