-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (57 loc) · 1.37 KB
/
Makefile
File metadata and controls
78 lines (57 loc) · 1.37 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
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
# Copyright (C) 2001 Richard Russon
KERNEL = /usr/src/linux
CC = gcc
LD = ld
LN = ln -sf
RM = rm -f
# General compile flags
CFLAGS += -Wall
CFLAGS += -g
CFLAGS += -O2
CFLAGS += -D_FILE_OFFSET_BITS=64
# LDM compile flags
CFLAGS += -DCONFIG_LDM_PARTITION
CFLAGS += -DCONFIG_LDM_DEBUG
CFLAGS += -DCONFIG_LDM_EXPORT_SYMBOLS
# Kernel compile flags
CFLAGS += -D__KERNEL__
CFLAGS += -Wstrict-prototypes
CFLAGS += -fomit-frame-pointer
CFLAGS += -fno-strict-aliasing
CFLAGS += -pipe
CFLAGS += -mpreferred-stack-boundary=2
CFLAGS += -march=$(shell uname -m)
# ld flags
LFLAGS += -m elf_i386 -r
#-------------------------------------------------------------------------------
export CC CFLAGS KERNEL LD LFLAGS LN RM
LINKS = docs src
DRIVER = Makefile.driver
TEST = test
UTIL = ldmutil
all:
make -f $(DRIVER)
make -C $(TEST)
make -C $(UTIL)
clean:
make -f $(DRIVER) clean
make -C $(TEST) clean
make -C $(UTIL) clean
distclean:
make -f $(DRIVER) distclean
make -C $(TEST) distclean
make -C $(UTIL) distclean
$(RM) $(LINKS)
find . -name tags -exec $(RM) {} \;
find . -name \*.data -o -name \*.part -exec $(RM) {} \;
docs:
$(LN) linux/Documentation docs
src:
$(LN) linux/fs/partitions src
links: $(LINKS)
tags: force
ctags -R *
(cd linux/fs/partitions; ctags -R *)
(cd $(TEST); ctags -R * ../linux/fs/partitions)
(cd $(UTIL); ctags -R * ../linux/fs/partitions)
force: