-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (19 loc) · 708 Bytes
/
Makefile
File metadata and controls
27 lines (19 loc) · 708 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
# Makefile for the simulated file system program
FLAGS= -Wall -g
all : bfsim ffsim
bfsim : simfile.o file_ops.o transactions.o free_list_best_fit.o free_list_common.o
gcc ${FLAGS} -o $@ $^
ffsim : simfile.o file_ops.o transactions.o free_list_first_fit.o free_list_common.o
gcc ${FLAGS} -o $@ $^
# Ensure that the object files will be rebuilt when a header files changes
simfile.o : file_ops.h transactions.h
transactions.o : file_ops.h transactions.h free_list.h
file_ops.o : file_ops.h free_list.h
free_list_best_fit.o : free_list.h
free_list_first_fit.o : free_list.h
free_list_common.o : free_list.h
# Separately compile each C file
%.o : %.c
gcc ${FLAGS} -c $<
clean :
-rm *.o bfsim ffsim