5 $(error Please define $$(ARCH).)
12 CROSS := i686-polintos-
13 DEFS += -DBITFIELD_LE -D__LITTLE_ENDIAN
19 CROSS := x86_64-polintos-
20 DEFS += -DBITFIELD_LE -D__LITTLE_ENDIAN
25 ifeq ($(VALIDARCH),no)
26 $(error $(ARCH) is not a supported target.)
37 # C++ prohibits defeferencing a NULL non-POD pointer (and thus
38 # prohibits using offsetof on non-POD types, even though there's no
39 # good reason to disallow it). Some headers use offsetof on non-POD
40 # types (typically, the types are non-POD only because they have a
41 # constructor to initialize fields to a known state (or with
42 # passed-in values); hardly a reason to make it completely non-POD
43 # and throw out a bazillion otherwise legal actions).
45 # Thus, since I know of no way (such as a #pragma) for code to
46 # disable a warning itself for a specific region of code, everything
47 # needs to disable this warning. On one hand, I consider it a bogus
48 # warning, and thus it's not that big of a deal. On the other hand,
49 # having the warning suppressed means you won't know if your code
50 # will produce the warning in other environments without actually
51 # trying it there. Oh well; blame the C++ and/or GCC people, not me.
53 # This warning option requires at least GCC 3.4. If you want to use
54 # an older compiler, remove this and live with the warnings (as well
55 # as whatever other unknown issues you encounter).
57 CXXWARN += $(WARN) -Wno-invalid-offsetof
64 BASEBUILDDIR := $(TOP)/$(BUILDNAME)
65 ARCHBUILDDIR := $(TOP)/$(BUILDNAME)/$(ARCH)
68 BUILDDIR := $(BASEBUILDDIR)/$(BUILDTYPE)/$(COMP)
70 BUILDDIR := $(ARCHBUILDDIR)/$(BUILDTYPE)/$(COMP)
73 UTILBUILDDIR := $(BASEBUILDDIR)/build/utils
74 SERVERDIR := $(BUILDDIR)/include/servers
76 IFACES := $(BASEBUILDDIR)/build/idl/ifaces
77 GENINCLUDES := $(ARCHBUILDDIR)/build/include/generated
86 STRIP := $(CROSS)strip
87 DEFS += -D_LL_ARCH_$(ARCH) -D_LL_ARCH=$(ARCH)
90 OBJCOPY := $(CROSS)objcopy
91 RANLIB := $(CROSS)ranlib
95 IDLC_target := $(BASEBUILDDIR)/build/idlcomp/idlc
96 IDLC := valgrind -q $(BASEBUILDDIR)/build/idlcomp/idlc
101 # If you want to cross-compile idlc, set BUILD_ENDIAN to LE or BE
102 # and build only the idlc component. Also, set BUILDCXX to the
106 $(shell $(MKDIR) $(UTILBUILDDIR))
107 $(shell $(BUILDCC) $(TOP)/utils/buildendian.c -o $(UTILBUILDDIR)/buildendian)
108 BUILD_ENDIAN := $(shell $(UTILBUILDDIR)/buildendian)
111 ifndef BUILD_BFENDIAN
112 $(shell $(MKDIR) $(UTILBUILDDIR))
113 $(shell $(BUILDCC) $(TOP)/utils/buildbfendian.c -o $(UTILBUILDDIR)/buildbfendian)
114 BUILD_BFENDIAN := $(shell $(UTILBUILDDIR)/buildendian)
117 BUILDDEFS += -DBITFIELD_$(BUILD_BFENDIAN)