-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGNUMakefile
62 lines (46 loc) · 1.96 KB
/
GNUMakefile
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
# RiOS/GNUmakefile
# Copyright (C) 2018 Frank Curie (邱日)
# Here are some OBJ files from all moudules
# code here is stupid, maybe we can use macro :)
##### console moudule ###################################
console_objs :=$(patsubst src/console/%.cc,\
build/arch/$(arch)/console/%.o, $(wildcard src/console/*.cc))
build/arch/$(arch)/console/%.o: src/console/%.cc
mkdir -p $(shell dirname $@)
$(CC) $(CFLAGS) $< -o $@
#### mm moudule #########################################
mm_objs :=$(patsubst src/mm/%.cc,\
build/arch/$(arch)/mm/%.o, $(wildcard src/mm/*.cc))
build/arch/$(arch)/mm/%.o: src/mm/%.cc
mkdir -p $(shell dirname $@)
$(CC) $(CFLAGS) $< -o $@
#### kernel moudule ######################################
kernel_objs :=$(patsubst src/kernel/%.cc,\
build/arch/$(arch)/kernel/%.o, $(wildcard src/kernel/*.cc))
build/arch/$(arch)/kernel/%.o: src/kernel/%.cc
mkdir -p $(shell dirname $@)
$(CC) $(CFLAGS) $< -o $@
#### blk_dev moudule ######################################
blk_dev_objs :=$(patsubst src/blk_dev/%.cc,\
build/arch/$(arch)/blk_dev/%.o, $(wildcard src/blk_dev/*.cc))
build/arch/$(arch)/blk_dev/%.o: src/blk_dev/%.cc
mkdir -p $(shell dirname $@)
$(CC) $(CFLAGS) $< -o $@
#### fs moudule ######################################
fs_objs :=$(patsubst src/fs/%.cc,\
build/arch/$(arch)/fs/%.o, $(wildcard src/fs/*.cc))
build/arch/$(arch)/fs/%.o: src/fs/%.cc
mkdir -p $(shell dirname $@)
$(CC) $(CFLAGS) $< -o $@
#### task moudule ######################################
task_objs :=$(patsubst src/task/%.cc,\
build/arch/$(arch)/task/%.o, $(wildcard src/task/*.cc))
build/arch/$(arch)/task/%.o: src/task/%.cc
mkdir -p $(shell dirname $@)
$(CC) $(CFLAGS) $< -o $@
#### app moudule ######################################
app_objs :=$(patsubst src/app/%.cc,\
build/arch/$(arch)/app/%.o, $(wildcard src/app/*.cc))
build/arch/$(arch)/app/%.o: src/app/%.cc
mkdir -p $(shell dirname $@)
$(CC) $(CFLAGS) $< -o $@