Skip to content

Commit 3944cb0

Browse files
committed
Allow kernel modules to be compiled independently and via top-level kernel-modules target
1 parent e3e94f4 commit 3944cb0

File tree

11 files changed

+86
-70
lines changed

11 files changed

+86
-70
lines changed

Makefile

+75-70
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,75 @@
1-
2-
SUPPORTED_SPKS = $(patsubst spk/%/Makefile,%,$(wildcard spk/*/Makefile))
3-
4-
all: $(SUPPORTED_SPKS)
5-
6-
clean: $(addsuffix -clean,$(SUPPORTED_SPKS))
7-
clean: native-clean
8-
9-
dist-clean: clean
10-
dist-clena: toolchain-clean
11-
12-
native-clean:
13-
@for native in $(dir $(wildcard native/*/Makefile)) ; \
14-
do \
15-
(cd $${native} && $(MAKE) clean) ; \
16-
done
17-
18-
toolchain-clean:
19-
@for tc in $(dir $(wildcard toolchains/*/Makefile)) ; \
20-
do \
21-
(cd $${tc} && $(MAKE) clean) ; \
22-
done
23-
24-
cross-clean:
25-
@for cross in $(dir $(wildcard cross/*/Makefile)) ; \
26-
do \
27-
(cd $${cross} && $(MAKE) clean) ; \
28-
done
29-
30-
spk-clean:
31-
@for spk in $(dir $(wildcard spk/*/Makefile)) ; \
32-
do \
33-
(cd $${spk} && $(MAKE) clean) ; \
34-
done
35-
36-
%: spk/%/Makefile
37-
cd $(dir $^) && env $(MAKE)
38-
39-
%-clean: spk/%/Makefile
40-
cd $(dir $^) && env $(MAKE) clean
41-
42-
prepare: downloads
43-
@for tc in $(dir $(wildcard toolchains/*/Makefile)) ; \
44-
do \
45-
(cd $${tc} && $(MAKE)) ; \
46-
done
47-
48-
downloads:
49-
@for dl in $(dir $(wildcard cross/*/Makefile)) ; \
50-
do \
51-
(cd $${dl} && $(MAKE) download) ; \
52-
done
53-
54-
.PHONY: toolchains
55-
toolchains:
56-
@for tc in $(dir $(wildcard toolchains/*/Makefile)) ; \
57-
do \
58-
(cd $${tc} && $(MAKE)) ; \
59-
done
60-
61-
setup: local.mk
62-
63-
local.mk:
64-
@echo "Creating local configuration \"local.mk\"..."
65-
@echo "PUBLISH_METHOD=REPO" > $@
66-
@echo "PUBLISH_REPO_URL=https://packages.synocommunity.com/" >> $@
67-
@echo "PUBLISH_REPO_KEY=" >> $@
68-
@echo "PUBLISH_FTP_URL=ftp://synocommunity.com/upload_spk" >> $@
69-
@echo "PUBLISH_FTP_USER=" >> $@
70-
@echo "PUBLISH_FTP_PASSWORD=" >> $@
1+
2+
SUPPORTED_SPKS = $(patsubst spk/%/Makefile,%,$(wildcard spk/*/Makefile))
3+
4+
all: $(SUPPORTED_SPKS)
5+
6+
clean: $(addsuffix -clean,$(SUPPORTED_SPKS))
7+
clean: native-clean
8+
9+
dist-clean: clean
10+
dist-clena: toolchain-clean
11+
12+
native-clean:
13+
@for native in $(dir $(wildcard native/*/Makefile)) ; \
14+
do \
15+
(cd $${native} && $(MAKE) clean) ; \
16+
done
17+
18+
toolchain-clean:
19+
@for tc in $(dir $(wildcard toolchains/*/Makefile)) ; \
20+
do \
21+
(cd $${tc} && $(MAKE) clean) ; \
22+
done
23+
24+
cross-clean:
25+
@for cross in $(dir $(wildcard cross/*/Makefile)) ; \
26+
do \
27+
(cd $${cross} && $(MAKE) clean) ; \
28+
done
29+
30+
spk-clean:
31+
@for spk in $(dir $(wildcard spk/*/Makefile)) ; \
32+
do \
33+
(cd $${spk} && $(MAKE) clean) ; \
34+
done
35+
36+
%: spk/%/Makefile
37+
cd $(dir $^) && env $(MAKE)
38+
39+
%-clean: spk/%/Makefile
40+
cd $(dir $^) && env $(MAKE) clean
41+
42+
prepare: downloads
43+
@for tc in $(dir $(wildcard toolchains/*/Makefile)) ; \
44+
do \
45+
(cd $${tc} && $(MAKE)) ; \
46+
done
47+
48+
downloads:
49+
@for dl in $(dir $(wildcard cross/*/Makefile)) ; \
50+
do \
51+
(cd $${dl} && $(MAKE) download) ; \
52+
done
53+
54+
.PHONY: toolchains kernel-modules
55+
toolchains:
56+
@for tc in $(dir $(wildcard toolchains/*/Makefile)) ; \
57+
do \
58+
(cd $${tc} && $(MAKE)) ; \
59+
done
60+
kernel-modules:
61+
@for kern in $(dir $(wildcard kernel/*/Makefile)) ; \
62+
do \
63+
(cd $${kern} && $(MAKE)) ; \
64+
done
65+
66+
setup: local.mk
67+
68+
local.mk:
69+
@echo "Creating local configuration \"local.mk\"..."
70+
@echo "PUBLISH_METHOD=REPO" > $@
71+
@echo "PUBLISH_REPO_URL=https://packages.synocommunity.com/" >> $@
72+
@echo "PUBLISH_REPO_KEY=" >> $@
73+
@echo "PUBLISH_FTP_URL=ftp://synocommunity.com/upload_spk" >> $@
74+
@echo "PUBLISH_FTP_USER=" >> $@
75+
@echo "PUBLISH_FTP_PASSWORD=" >> $@

kernel/syno-88f5281/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= 88f5281
12
PKG_NAME = synogpl
23
PKG_BRANCH = 1628
34
PKG_ARCH = 5281

kernel/syno-88f6281/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= 88f6281
12
PKG_NAME = synogpl
23
PKG_BRANCH = 2636
34
PKG_ARCH = 6281

kernel/syno-bromolow/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= bromolow
12
PKG_NAME = synogpl
23
PKG_BRANCH = 2636
34
PKG_ARCH = $(ARCH)

kernel/syno-cedarview/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= cedarview
12
PKG_NAME = synogpl
23
PKG_BRANCH = 2636
34
PKG_ARCH = $(ARCH)

kernel/syno-powerpc/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= powerpc
12
PKG_NAME = synogpl
23
PKG_BRANCH = 2636
34
PKG_ARCH = ppc

kernel/syno-ppc824x/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= ppc824x
12
PKG_NAME = synogpl
23
PKG_BRANCH = 2636
34
PKG_ARCH = 824x

kernel/syno-ppc853x/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= ppc853x
12
PKG_NAME = synogpl
23
PKG_BRANCH = 2636
34
PKG_ARCH = 853x

kernel/syno-ppc854x/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= ppc854x
12
PKG_NAME = synogpl
23
PKG_BRANCH = 2198
34
PKG_ARCH = 854x

kernel/syno-qoriq/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARCH ?= qoriq
12
PKG_NAME = synogpl
23
PKG_BRANCH = 2636
34
PKG_ARCH = $(ARCH)

kernel/syno-x86/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ARCH ?= x86
2+
ARCH ?= x86
13
PKG_NAME = synogpl
24
PKG_BRANCH = 2636
35
PKG_ARCH = x64

0 commit comments

Comments
 (0)