-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
71 lines (50 loc) · 1.48 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File: Makefile
# By: Andy Sayler <www.andysayler.com>
# Adopted from work by: Chris Wailes <[email protected]>
# Project: CSCI 3753 Programming Assignment 5
# Creation Date: 2010/04/06
# Modififed Date: 2012/04/12
# Description:
# This is the Makefile for PA5.
CC = gcc
CFLAGSFUSE = `pkg-config fuse --cflags`
LLIBSFUSE = `pkg-config fuse --libs`
LLIBSOPENSSL = -lcrypto
CFLAGS = -c -g -Wall -Wextra
LFLAGS = -g -Wall -Wextra
FUSE_EXAMPLES = fusehello fusexmp
XATTR_EXAMPLES = xattr-util
OPENSSL_EXAMPLES = aes-crypt-util
.PHONY: all fuse-examples xattr-examples openssl-examples clean
all: fuse-examples xattr-examples openssl-examples
fuse-examples: $(FUSE_EXAMPLES)
xattr-examples: $(XATTR_EXAMPLES)
openssl-examples: $(OPENSSL_EXAMPLES)
fusehello: fusehello.o
$(CC) $(LFLAGS) $^ -o $@ $(LLIBSFUSE)
fusexmp: fusexmp.o
$(CC) $(LFLAGS) $^ -o $@ $(LLIBSFUSE)
xattr-util: xattr-util.o
$(CC) $(LFLAGS) $^ -o $@
aes-crypt-util: aes-crypt-util.o aes-crypt.o
$(CC) $(LFLAGS) $^ -o $@ $(LLIBSOPENSSL)
fusehello.o: fusehello.c
$(CC) $(CFLAGS) $(CFLAGSFUSE) $<
fusexmp.o: fusexmp.c
$(CC) $(CFLAGS) $(CFLAGSFUSE) $<
xattr-util.o: xattr-util.c
$(CC) $(CFLAGS) $<
aes-crypt-util.o: aes-crypt-util.c aes-crypt.h
$(CC) $(CFLAGS) $<
aes-crypt.o: aes-crypt.c aes-crypt.h
$(CC) $(CFLAGS) $<
clean:
rm -f $(FUSE_EXAMPLES)
rm -f $(XATTR_EXAMPLES)
rm -f $(OPENSSL_EXAMPLES)
rm -f *.o
rm -f *~
rm -f handout/*~
rm -f handout/*.log
rm -f handout/*.aux
rm -f handout/*.out