diff options
Diffstat (limited to 'win32/resources/Kbuild.src')
-rw-r--r-- | win32/resources/Kbuild.src | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/win32/resources/Kbuild.src b/win32/resources/Kbuild.src new file mode 100644 index 000000000..73fbfb7c7 --- /dev/null +++ b/win32/resources/Kbuild.src | |||
@@ -0,0 +1,30 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 2018 by R M Yorston <rmy@pobox.com> | ||
4 | # | ||
5 | # Licensed under GPLv2, see file LICENSE in this source tree. | ||
6 | |||
7 | obj-y := | ||
8 | |||
9 | obj-$(CONFIG_FEATURE_RESOURCES) += resources.o | ||
10 | |||
11 | # return commit level if available or 0 | ||
12 | bb_level = $(or $(word 2,$(subst -, ,$1)),0) | ||
13 | |||
14 | WRFLAGS := -D"KBUILD_STR(s)=\#s" -D"BB_VER=KBUILD_STR($(BB_VER))" \ | ||
15 | -D"BB_VERSION=$(VERSION)" -D"BB_PATCHLEVEL=$(PATCHLEVEL)" \ | ||
16 | -D"BB_SUBLEVEL=$(SUBLEVEL)" \ | ||
17 | -D"BB_EXTRAVERSION=$(call bb_level,$(EXTRAVERSION))" | ||
18 | |||
19 | quiet_cmd_windres = WINDRES $@ | ||
20 | cmd_windres = $(WINDRES) $(WRFLAGS) $< $@ | ||
21 | |||
22 | %.o: %.rc FORCE | ||
23 | $(call if_changed,windres) | ||
24 | |||
25 | win32/resources/resources.o: win32/resources/resources.rc .config | ||
26 | win32/resources/resources.o: win32/resources/aterm.ico win32/resources/sterm.ico | ||
27 | win32/resources/resources.o: win32/resources/busybox-w32.manifest | ||
28 | |||
29 | win32/resources/busybox-w32.manifest: win32/resources/busybox-w32.manifest.src .config | ||
30 | @sed -b "s/VERSION/$(BB_VER)/" win32/resources/busybox-w32.manifest.src >win32/resources/busybox-w32.manifest | ||