-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.tsi
63 lines (50 loc) · 2.03 KB
/
Makefile.tsi
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
PATH:=$(PATH):$(GNU_TOOLS_BIN)
.PHONY: force
force:
# ThinkLCDML
thinklcdml-git-repo="[email protected]:fakedrake/ThinkLCDML"
thinklcdml-git-checkout = refactor
GIT_PROJECTS += thinklcdml
TLCDML_MODULE=$(MODULES_DIR)/thinklcdml.ko
thinklcdml-build: $(TLCDML_MODULE) $(FILESYSTEM_ROOT)/bin/test_thinklcdml.sh nfsroot
TLCDML_BUILD_OPTS = CROSS_COMPILE=$(GNU_TOOLS_PREFIX) \
LINUX_HEADERS=$(SOURCES_DIR)/linux-git \
CONFIG_DEBUG_SECTION_MISMATCH=y \
INSTALL_MODS_PATH=$(FILESYSTEM_ROOT) \
THINKLCDML_DIR=$(SOURCES_DIR)/thinklcdml-git \
-C $(SOURCES_DIR)/thinklcdml-git
# This is aware of the kernel headers
$(TLCDML_MODULE): force | linux-build thinklcdml $(MODULES_DIR)
$(call remote-maybe, \
$(MAKE) $(TLCDML_BUILD_OPTS))
cp $(SOURCES_DIR)/thinklcdml-git/thinklcdml.ko $@
cp $(SOURCES_DIR)/thinklcdml-git/thinklcdml_old.ko $(MODULES_DIR)/thinklcdml_old.ko
# cat $(MODULES_DIR)/modules.dep | grep thinklcdml.ko || echo "thinklcdml.ko" >> $(MODULES_DIR)/modules.dep
thinklcdml-clean:
$(MAKE) $(TLCDML_BUILD_OPTS) clean
rm -rf $(TLCDML_MODULE)
rm -rf $(FILESYSTEM_ROOT)/bin/test_thinklcdml.sh
# Think2D
think2d-git-repo="[email protected]:fakedrake/Think2D"
GIT_PROJECTS += think2d
T2D_MODULE=$(MODULES_DIR)/think2d.ko
think2d-build: $(T2D_MODULE)
$(T2D_MODULE): linux-lazy thinklcdml-build think2d | $(MODULES_DIR)
cd $(SOURCES_DIR)/think2d-git && \
./builder.sh --root $(ROOT_DIR)
cp $(SOURCES_DIR)/think2d-git/think2d.ko $(T2D_MODULE)
cat $(MODULES_DIR)/modules.dep | grep think2d.ko || (echo "think2d.ko: thinklcdml.ko" >> $(MODULES_DIR)/modules.dep)
think2d-clean:
cd $(SOURCES_DIR)/think2d-git && make clean
ioctler-git-repo="[email protected]:fakedrake/ioctler"
GIT_PROJECTS += ioctler
ioctler-build: ioctler
cd $(SOURCES_DIR)/ioctler-git; \
make CC=$(CROSS_COMPILE)gcc && \
make install FS_ROOT=$(FILESYSTEM_ROOT)
ioctler-clean:
cd $(SOURCES_DIR)/ioctler-git; \
make clean; \
make uninstall FS_ROOT=$(FILESYSTEM_ROOT)
tsi-drivers: think2d-build thinklcdml-build ioctler-build
tsi-drivers-clear: think2d-clean thinklcdml-clean ioctler-clean