-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 664 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (27 loc) · 664 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
# this is the Makefile to compile test cases
CC = gcc
OPTS = -O -Wall
INCS =
LIBS = -L. -lFS -lDisk
SHLIBS = libDisk.so libFS.so
SRCS = main.c \
simple-test.c \
slow-ls.c slow-mkdir.c slow-rmdir.c \
slow-touch.c slow-rm.c \
slow-cat.c slow-import.c slow-export.c
OBJS = $(SRCS:.c=.o)
TARGETS = $(SRCS:.c=.exe)
all: $(TARGETS)
clean:
rm -f $(TARGETS) $(OBJS) *~
reset: clean
make -f Makefile.LibDisk clean
make -f Makefile.LibFS clean
%.o: %.c
$(CC) $(INCS) $(OPTS) -c $< -o $@
%.exe: %.o $(SHLIBS)
$(CC) -o $@ $< $(LIBS)
libDisk.so: LibDisk.h LibDisk.c
make -f Makefile.LibDisk
libFS.so: LibFS.h LibFS.c
make -f Makefile.LibFS