]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/dde/linux26/Makeconf
ca7dbf08e4c6eb59d72c94a2b09bf2170db94db3
[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 # Linux always uses C...
50 MODE_USE_C = y
51 L4_MULTITHREADED = y
52
53 # arch-specific stuff
54 ifeq ($(ARCH), x86)
55 MY_DDE_INCDIR += $(OBJ_BASE)/include/l4/dde/linux26/linux-headers/asm/mach-default
56 endif
57
58 ifeq ($(ARCH), arm)
59 MY_DDE_INCDIR += $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/asm-$(ARCH)/mach-realview \
60                                  $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/asm-$(ARCH)/mach-realview/include
61 endif
62
63 PRIVATE_INCDIR += $(MY_DDE_INCDIR) $(MY_LINUX26_INCDIR)
64
65 DEFINES += -D__KERNEL__ -DDDE_LINUX $(KBUILD_DEFINES)
66 CPPFLAGS += $(KBUILD_CPPFLAGS)
67 CFLAGS += -ffunction-sections
68 ASFLAGS += -D__ASSEMBLY__
69
70 WARNINGS  += -Wall -Wstrict-prototypes -fno-strict-aliasing
71 WARNINGS  += $(call CHECKCC, -Wno-unused,)
72 WARNINGS  += $(call CHECKCC, -Wno-pointer-sign,)
73 ifeq ($(ARCH), arm)
74 WARNINGS += -Wno-uninitialized
75 endif