-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (32 loc) · 880 Bytes
/
Makefile
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
TARGET=demo
-include ./include/config/auto.conf
LDFLAGS= -I./include/generated
obj-y := main.c
obj-$(CONFIG_DINNER) += demo.c
all: $(TARGET)
$(TARGET): $(obj-y) FORCE
gcc $(LDFLAGS) -o $@ $(obj-y)
%_defconfig:
./scripts/conf --defconfig=configs/$@ Kconfig
./scripts/conf -s --oldconfig Kconfig
allyesconfig:
./scripts/conf -s --allyesconfig Kconfig
./scripts/conf -s --oldconfig Kconfig
allnoconfig:
./scripts/conf -s --allnoconfig Kconfig
./scripts/conf -s --oldconfig Kconfig
alldefconfig:
./scripts/conf -s --alldefconfig Kconfig
./scripts/conf -s --oldconfig Kconfig
menuconfig:
./scripts/mconf Kconfig
./scripts/conf -s --oldconfig Kconfig
savedefconfig:
./scripts/conf -s --savedefconfig defconfig Kconfig
clean:
-rm -rf $(TARGET)
-rm -rf ./include/config/* ./include/generated/*
-rm -rf .config .config.old
PHONY +=FORCE
FORCE:
.PHONY: $(PHONY)