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