forked from kakaroto/PSFreedom
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
120 lines (98 loc) · 3 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
EXTRA_CFLAGS = -I/usr/include
# EXTRA_CFLAGS += -DENABLE_DEFAULT_BDEMU
obj-m := psfreedom.o
ifndef KDIR
KDIR := /lib/modules/$(shell uname -r)/build
ifneq ($(shell if test -d $(KDIR); then echo yes; fi),yes)
KDIR := /usr/src/linux
endif
endif
PWD := $(shell pwd)
ifndef PLATFORM
all:
@echo "Please choose your platform by running 'make <platform>'." >&2
@echo "You can also export the PLATFORM environment variable before running 'make'" >&2
@false
else
all: ${PLATFORM}
endif
#Build rules
build:
$(MAKE) -C $(KDIR) M=$(PWD) EXTRA_CFLAGS="${EXTRA_CFLAGS}" EXTRAVERSION=${EXTRAVERSION} modules
clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -rf .tmp_versions
# Aliases for platforms
n900: N900
n900-power: N900-POWER
n800: N8x0
N800: N8x0
n810: N8x0
N810: N8x0
n8x0: N8x0
palmpre: PalmPre
PALMPRE: PalmPre
palmpixi: PalmPixi
PALMPIXI: PalmPixi
archos5: ARCHOS_GEN6
ARCHOS5: ARCHOS_GEN6
Archos5: ARCHOS_GEN6
archos_gen6: ARCHOS_GEN6
archos5it: ARCHOS_GEN7
ARCHOS5IT: ARCHOS_GEN7
Archos5IT: ARCHOS_GEN7
archos_gen7: ARCHOS_GEN7
desire: Desire
DESIRE: Desire
dingoo: Dingoo
DINGOO: Dingoo
nexus1-cm6: nexus1-cm6
NEXUS1-CM6: nexus1-cm6
# Build configuration for each target
# Don't forget to add a dependency on 'build'
N900: KDIR := /usr/src/kernel-2.6.28/
N900: EXTRAVERSION:=-omap1
N900: EXTRA_CFLAGS += -DENABLE_MUSB_CONTROLLER
N900: build
N900-POWER: KDIR := /usr/src/kernel-power-2.6.28/
N900-POWER: EXTRAVERSION:=$(shell if [ -f $(KDIR)/debian/changelog ]; then \
dpkg-parsechangelog -l$(KDIR)/debian/changelog | sed -ne 's/^Version: .*-maemo\(.*\)/.10power\1/p'; \
fi)
N900-POWER: EXTRA_CFLAGS += -DENABLE_MUSB_CONTROLLER
N900-POWER: build
N8x0: EXTRA_CFLAGS += -DENABLE_MUSB_CONTROLLER
N8x0: KDIR := /usr/src/kernel-source-diablo
N8x0: EXTRAVERSION:=-omap1
N8x0: build
PalmPre: EXTRA_CFLAGS := -DENABLE_MUSB_CONTROLLER
PalmPre: KDIR := /usr/src/linux-2.6.24
PalmPre: EXTRAVERSION:=-joplin-3430
PalmPre: build
PalmPixi: EXTRA_CFLAGS := -DENABLE_MUSB_CONTROLLER -DCONFIG_USB_GADGET_MUSB_HDRC
PalmPixi: KDIR := /usr/src/linux-2.6.24-pixi
PalmPixi: EXTRAVERSION:=-chuck
PalmPixi: build
ARCHOS_GEN6: EXTRA_CFLAGS += -DENABLE_MUSB_CONTROLLER -DENABLE_MUSB_ARCHOS_GEN6_CONTROLLER
ARCHOS_GEN6: KDIR := /usr/src/linux-2.6.22.1-omap1
ARCHOS_GEN6: EXTRAVERSION:=-omap1
ARCHOS_GEN6: build
ARCHOS_GEN7: EXTRA_CFLAGS += -DENABLE_MUSB_CONTROLLER
ARCHOS_GEN7: KDIR := /usr/src/linux-2.6.27.10-omap1
ARCHOS_GEN7: EXTRAVERSION:=-omap1
ARCHOS_GEN7: build
Desire: EXTRA_CFLAGS += -DENABLE_MSM72K_CONTROLLER -DDISABLE_FIRMWARE_HOTPLUG
Desire: KDIR := /usr/src/linux-2.6.32.9
Desire: EXTRAVERSION:=
Desire: build
nexus1-cm6: EXTRA_CFLAGS += -DENABLE_MSM72K_CONTROLLER -DDISABLE_FIRMWARE_HOTPLUG
nexus1-cm6: KDIR := /usr/src/kernel-msm
nexus1-cm6: EXTRAVERSION:=
nexus1-cm6: build
Dingoo: EXTRA_CFLAGS += -DENABLE_JZ4740_CONTROLLER
Dingoo: KDIR := /usr/src/opendingux-kernel
Dingoo: EXTRAVERSION:=
Dingoo: build
Evo: EXTRA_CFLAGS += -DENABLE_MSM72K_CONTROLLER
Evo: KDIR := /usr/src/Supersonic-2.6.32
Evo: EXTRAVERSION:=
Evo: build