-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
93 lines (78 loc) · 1.72 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
FILESYSTEMS := btrfs \
ext2 \
hfsplus \
iso9660 \
minix \
nilfs2 \
pcpartfs \
reiserfs \
testfs \
vfat \
vmdk \
xfs
FSNAMES= $(FILESYSTEMS)
space :=
space +=
NUM_JOBS=6
#LINUX_SRCDIR=/usr/src/linux/
ifndef LINUX_SRCDIR
LINUX_SRCDIR:=/home/chz/src/research/FSL_VM_LINUX/
endif
MAKECMD=make -j$(NUM_JOBS)
#CFLAGS= -g -O3 -DFSL_RELEASE -DNDEBUG -DFSL_LITTLE_ENDIAN -fno-common
#CFLAGS=-g -DFSL_LITTLE_ENDIAN -fno-common
CFLAGS= -g -O3 -DFSL_RELEASE -DFSL_LITTLE_ENDIAN -fno-common
OPT_FLAGS=-O3
LLC_FLAGS=-O3
LLVMCC=clang
LLVMCXX=clang++
CC=gcc
CXX=g++
export CFLAGS
OBJDIR=$(shell pwd)/obj
BINDIR=$(shell pwd)/bin
IMGDIR=$(shell pwd)/img
FSSRCDIR=$(shell pwd)/fs
KLEEBINDIR=/home/chz/klee/Release/bin/
export OBJDIR
export BINDIR
export FSSRCDIR
export OPT_FLAGS
export LLC_FLAGS
export FSNAMES
export LINUX_SRCDIR
.PHONY: all
all: code tools
include src/Makefile
include Makefile.tests
include Makefile.img
.PHONY: clean
clean: code-clean tests-clean clean-root
rm -f bin/*-* bin/lang bin/*/*
clean-root:
rm -f cur_test*
rm -f fsck*
rm -f fuse*
rm -f err pin.log pintool.log run_test.out tests.log
draw: draw-hits draw-scans draw-relocs
OBJDIRS= compiler fs tool \
runtime/rt-mmap runtime/rt-pread \
kernel/tool \
klee/tool klee/runtime/rt-mmap klee/runtime/rt-pread
OBJDIRS:=$(OBJDIRS:%=$(OBJDIR)/%)
$(OBJDIR):
mkdir -p $(OBJDIRS)
.PHONY: libs
libs:
make -C lib all
.PHONY: libs-clean
libs-clean:
make -C lib clean
.PHONY: imgs
imgs: imgs-all
.PHONY: scan-build
scan-build:
mkdir -p scan-out
scan-build --use-cc="$(CC)" --use-c++="$(CXX)" \
`clang -cc1 -analyzer-checker-help | awk ' { print "-enable-checker="$1 } ' | grep '\.' | grep -v debug ` \
-o `pwd`/scan-out $(MAKECMD) all