-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 1.05 KB
/
Copy pathMakefile
File metadata and controls
36 lines (27 loc) · 1.05 KB
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
# This code is provided solely for the personal and private use of students
# taking the CSC369H course at the University of Toronto. Copying for purposes
# other than this use is expressly prohibited. All forms of distribution of
# this code, including but not limited to public repositories on GitHub,
# GitLab, Bitbucket, or any other online platform, whether as given or with
# any changes, are expressly prohibited.
#
# Authors: Alexey Khrabrov, Karen Reid
#
# All of the files in this directory and all subdirectories are:
# Copyright (c) 2019 Karen Reid
CC = gcc
CFLAGS := $(shell pkg-config fuse --cflags) -g3 -Wall -Wextra -Werror $(CFLAGS)
LDFLAGS := $(shell pkg-config fuse --libs) $(LDFLAGS)
.PHONY: all clean
all: a1fs mkfs.a1fs
a1fs: a1fs.o fs_ctx.o map.o options.o helper.o
$(CC) $^ -o $@ $(LDFLAGS)
mkfs.a1fs: map.o mkfs.o helper.o
$(CC) $^ -o $@ $(LDFLAGS)
SRC_FILES = $(wildcard *.c)
OBJ_FILES = $(SRC_FILES:.c=.o)
-include $(OBJ_FILES:.o=.d)
%.o: %.c
$(CC) $< -o $@ -c -MMD $(CFLAGS)
clean:
rm -f $(OBJ_FILES) $(OBJ_FILES:.o=.d) a1fs mkfs.a1fs