6
MINIGUI_RELEASE=$(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)$(EXTRAVERSION)
8
# SUBARCH tells the usermode build what the underlying arch is. That is set
9
# first, and if a usermode build is happening, the "ARCH=um" on the command
10
# line overrides the setting of ARCH below. If a native build is happening,
11
# then ARCH is assigned, getting whatever value it gets normally, and
12
# SUBARCH is subsequently ignored.
14
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
17
MINIGUI_PATH=kernel-$(shell echo $(MINIGUI_RELEASE) | sed -e "s/-//g")
19
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
20
else if [ -x /bin/bash ]; then echo /bin/bash; \
21
else echo sh; fi ; fi)
22
TOPDIR := $(shell /bin/pwd)
24
HPATH = $(TOPDIR)/include
27
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
32
# Include the make variables (CC, etc...)
35
AS = $(CROSS_COMPILE)as
36
LD = $(CROSS_COMPILE)ld
37
CC = $(CROSS_COMPILE)gcc
39
AR = $(CROSS_COMPILE)ar
40
NM = $(CROSS_COMPILE)nm
41
STRIP = $(CROSS_COMPILE)strip
42
OBJCOPY = $(CROSS_COMPILE)objcopy
43
OBJDUMP = $(CROSS_COMPILE)objdump
44
MAKEFILES = $(TOPDIR)/.config
45
GENKSYMS = /sbin/genksyms
47
KALLSYMS = /sbin/kallsyms
54
export MAJOR_VERSION MINOR_VERSION MICRO_VERSION EXTRAVERSION MINIGUI_RELEASE ARCH \
55
CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
56
CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
61
@echo "You may need to run configure script to build Makefile."
65
$(MAKE) -C scripts/lxdialog -f makefile.lx all
66
$(CONFIG_SHELL) scripts/Menuconfig configs/config.in
70
@cp configs/defconfig .defconfig
71
$(MAKE) -C scripts/lxdialog -f makefile.lx all
72
$(CONFIG_SHELL) scripts/Menuconfig configs/config.in