-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.lkl
executable file
·55 lines (38 loc) · 1011 Bytes
/
Makefile.lkl
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
CC=gcc
FLEX=flex
CFLAGS=-g -Wall -Ilklinclude -Iinclude
LDLIBS=-pthread -lreadline -lm
# Environment {
HERE=$(PWD)
LINUX=$(HERE)/../linux-2.6
MKDIR=mkdir -p
all: $(CROSS)lkl/lkl.a lklinclude/asm lklinclude/asm-generic lklinclude/x86 lklinclude/linux
# Include LKL {
lklinclude/asm:
-$(MKDIR) `dirname $@`
ln -s $(LINUX)/arch/lkl/include/asm lklinclude/asm
lklinclude/x86:
-$(MKDIR) `dirname $@`
ln -s $(LINUX)/arch/x86 lklinclude/x86
lklinclude/asm-generic:
-$(MKDIR) `dirname $@`
ln -s $(LINUX)/include/asm-generic lklinclude/asm-generic
lklinclude/linux:
-$(MKDIR) `dirname $@`
ln -s $(LINUX)/include/linux lklinclude/linux
INC=lklinclude/asm lklinclude/asm-generic lklinclude/x86 lklinclude/linux
# }
# LKL {
$(CROSS)lkl/.config: .config
mkdir -p lkl && \
cp $< $@
$(CROSS)lkl/lkl.a: lkl/.config
cd $(LINUX) && \
$(MAKE) O=$(HERE)/$(CROSS)lkl ARCH=lkl \
CROSS_COMPILE=$(CROSS) LKLENV_CFLAGS="$(APR_CONF)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
lkl.a
# }
clean:
-rm -rf lkl
# }