]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/dde/linux26/Makeconf
update
[l4.git] / l4 / pkg / dde / linux26 / Makeconf
1 # vim:set ts=4:
2
3 SYSTEMS =
4
5 ifneq ($(filter x86,$(DDE_SYSTEMS)),)
6 SYSTEMS += x86-l4f
7 endif
8
9 ifneq ($(filter arm,$(DDE_SYSTEMS)),)
10 ifneq ($(CONFIG_CPU_ARMV6KPLUS),)
11 SYSTEMS += arm-l4f
12 endif
13 endif
14
15 # Linux 2.6 defines some macros on command line
16 KBUILD_DEFINES = -D"KBUILD_STR(s)=\#s" \
17                  -D"KBUILD_BASENAME=KBUILD_STR($(patsubst %.o,%,$(notdir $@)))" \
18                  -D"KBUILD_MODNAME=KBUILD_STR($(patsubst %.o,%,$@))"
19
20 # for some reasons, Linux 2.6 does not include autoconf.h in the implementation
21 # files but does so on the command line
22 ifeq ($(ARCH), x86)
23 KBUILD_CPPFLAGS = -include linux/autoconf.h
24 endif
25
26 ifeq ($(ARCH), arm)
27 KBUILD_CPPFLAGS = -include linux/autoconf-arm.h
28 endif
29
30 # includes
31 MY_DDE_INCDIR = $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26 \
32                 $(OBJ_BASE)/include/l4/dde/linux26
33
34 SUFFIX_amd64 = x86_64
35 SUFFIX_x86   = x86
36 SUFFIX_arm   = arm
37
38 MY_LINUX26_INCDIR = $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/linux-headers \
39                     $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/asm \
40                     $(OBJ_BASE)/include/l4/dde/linux26/linux-headers-mach \
41                     $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/asm \
42                     $(OBJ_BASE)/include/l4/dde/linux26/linux-headers
43
44 # stolen from fiasco/src/Makeconf, checks whether a compiler supports a certain
45 # parameter
46 CHECKCC     = $(shell if $(CC)  $(1) -S -o /dev/null -xc   /dev/null \
47               > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
48
49 L4_MULTITHREADED = y
50
51 # arch-specific stuff
52 ifeq ($(ARCH), x86)
53 MY_DDE_INCDIR += $(OBJ_BASE)/include/l4/dde/linux26/linux-headers/asm/mach-default
54 endif
55
56 ifeq ($(ARCH), arm)
57 MY_DDE_INCDIR += $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/asm-$(ARCH)/mach-realview \
58                                  $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/asm-$(ARCH)/mach-realview/include
59 endif
60
61 PRIVATE_INCDIR += $(MY_DDE_INCDIR) $(MY_LINUX26_INCDIR)
62
63 DEFINES += -D__KERNEL__ -DDDE_LINUX $(KBUILD_DEFINES)
64 CPPFLAGS += $(KBUILD_CPPFLAGS)
65 CFLAGS += -ffunction-sections
66 ASFLAGS += -D__ASSEMBLY__
67
68 WARNINGS  += -Wall -Wstrict-prototypes -fno-strict-aliasing
69 WARNINGS  += $(call CHECKCC, -Wno-unused,)
70 WARNINGS  += $(call CHECKCC, -Wno-pointer-sign,)
71 ifeq ($(ARCH), arm)
72 WARNINGS += -Wno-uninitialized
73 endif