-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (38 loc) · 958 Bytes
/
Makefile
File metadata and controls
48 lines (38 loc) · 958 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
36
37
38
39
40
41
42
43
44
45
46
47
48
#
# Students' Makefile for the Filesystem Lab
#
STUID = 2017000000-2017000001
#Leave no spaces between or after your STUID!!!
#If you finished this lab on your own, fill like this:2017000000-None
VERSION = 1
HANDINDIR = /home/handin-fs
MNTDIR = mnt
VDISK = vdisk
CC = gcc
CFLAGS = -Wall
OBJS = disk.o fs.c
debug: clean fuse
./fuse -f $(MNTDIR)
mount: clean fuse
./fuse $(MNTDIR)
umount:
-fusermount -u $(MNTDIR)
fuse: $(OBJS)
echo $(abspath $(lastword $(MAKEFILE_LIST))) > fuse~
ifeq ($(VDISK), $(wildcard $(VDISK)))
rm -rf $(VDISK)
endif
mkdir $(VDISK)
ifeq ($(MNTDIR), $(wildcard $(MNTDIR)))
rm -rf $(MNTDIR)
endif
mkdir $(MNTDIR)
$(CC) $(CFLAGS) -o fuse $(OBJS) -DFUSE_USE_VERSION=29 -D_FILE_OFFSET_BITS=64 -lfuse
disk.o: disk.c disk.h
handin:
chmod 600 fs.c
cp fs.c $(HANDINDIR)/$(STUID)-$(VERSION)-fs.c
chmod 400 $(HANDINDIR)/$(STUID)-$(VERSION)-fs.c
clean: umount
-rm -f *~ *.o fuse
-rm -rf $(VDISK) $(MNTDIR)