From 7ccfc1fdb1c0030e6e2105d50d76122b8f10c687 Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Mon, 21 Dec 2009 03:00:41 +0100 Subject: check in mk. --- libdde_linux26/mk/Makeconf | 512 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 512 insertions(+) create mode 100644 libdde_linux26/mk/Makeconf (limited to 'libdde_linux26/mk/Makeconf') diff --git a/libdde_linux26/mk/Makeconf b/libdde_linux26/mk/Makeconf new file mode 100644 index 00000000..1c927e45 --- /dev/null +++ b/libdde_linux26/mk/Makeconf @@ -0,0 +1,512 @@ +# -*- Makefile -*- +# vim:set ft=make: +# +# DROPS (Dresden Realtime OPerating System) Component +# +# Make configuration file +# +# $Id: Makeconf 418 2008-11-12 03:50:31Z l4check $ +# +# $Author: l4check $ +# +# This file is included by all Makefile-templates. This file defines macros +# for div commands, sets general DROPS-Makefile variables, ensures the +# dependencies from the various Makeconf.locals, defines the messages for +# div actions, and permits the dependency-creation on clean-rules. +# +# The macros BUILD_MULTIPLE_ARCHITECTURES and BUILD_ONE_ARCHITECTURE are +# defined here. +# +# BUILD_MULTIPLE_ARCHITECTURES is set if ARCHS is set to multiple +# architectures in the Makefile. If ARCHS is not set, the default value +# l4_i386 will be assumed, not defining BUILD_MULTIPLE_ARCHITECTURES. +# In the muli-arch case, binary.inc triggers build the files into subdirs, +# dir-name is the architecture. Then, make is called recursively with ARCH +# set to one architecture. +# +# BUILD_ONE_ARCHITECTURE is set if ARCH contains one architecture, and we +# actually build files (in subdirs for multi-arch case, in the same dir in +# the single-arch case). + +ifeq ($(origin _L4DIR_MK_MAKECONF),undefined) +_L4DIR_MK_MAKECONF=y + +# the default target is all +all:: + +# make .general.d dependent on the role-file +$(if $(ROLE),$(OBJ_DIR)/.general.d: $(L4DIR)/mk/$(ROLE)) + +SYSTEM_TARGET = $(SYSTEM_TARGET_$(ARCH)) +SYSTEM_TARGET_arm = arm-linux- + +CARCHFLAGS_amd64 = -mno-red-zone +ASFLAGS_amd64 = -m64 + +LD_EMULATION_amd64= elf_x86_64 +LD_EMULATION_arm = armelf +LD_EMULATION_x86 = elf_i386 +LD_EMULATION = $(LD_EMULATION_$(ARCH)) + +OFORMAT_amd64 = elf64-x86-64 +OFORMAT_arm = default +OFORMAT_x86 = elf32-i386 +OFORMAT = $(OFORMAT_$(ARCH)) + +# This is quite bad: There is no other chance to disable the page-alignedment +# of the linker. The linker aligns the first section at 0x100000 for AMD64! +# We don't want this. Be careful for interactions with objcopy -S! +LDNMAGIC ?= -n +LDFLAGS_amd64 += $(LDNMAGIC) + +CARCHFLAGS_x86_586 = -march=i586 +CARCHFLAGS_x86_pentium = -march=i586 +CARCHFLAGS_x86_pentiummmx = -march=pentium-mmx +CARCHFLAGS_x86_pentiumpro = -march=pentiumpro +CARCHFLAGS_x86_686 = -march=i686 +CARCHFLAGS_x86_pentium2 = -march=pentium2 +CARCHFLAGS_x86_pentium3 = -march=pentium3 +CARCHFLAGS_x86_pentiumm = -march=pentium-m +CARCHFLAGS_x86_pentium4 = -march=pentium4 +CARCHFLAGS_x86_prescott = -march=prescott +CARCHFLAGS_x86_nocona = -march=nocona +CARCHFLAGS_x86_K6 = -march=k6 +CARCHFLAGS_x86_K7 = -march=athlon +CARCHFLAGS_x86_athlon4 = -march=athlon-4 +CARCHFLAGS_x86_K8 = -march=k8 +CARCHFLAGS_x86_opteron = -march=opteron + +IDL_SYSTEMS = x86-l4v2 + +AR = $(SYSTEM_TARGET)ar +AS = $(SYSTEM_TARGET)as +AWKP = gawk --posix +CVS = cvs -q +SVN = svn +CP = cp +DICE_SRCDIR ?= $(L4DIR)/../dice +DICE_OBJDIR ?= $(DICE_SRCDIR) +DICE = $(firstword $(wildcard $(DICE_OBJDIR)/src/dice \ + $(DROPS_STDDIR)/tool/bin/dice \ + $(shell which dice 2>/dev/null) ) \ + did_not_find_dice___please_install_dice ) +DICE_CPP_NAME = cpp0 + +DICE_INCDIR ?= $(DICE_SRCDIR)/include + +ECHO = echo + +GENOFFSETS = $(L4DIR)/tool/bin/genoffsets.pl +GOSH = $(firstword $(wildcard $(L4DIR)/../tools/gosh/gosh \ + $(DROPS_STDDIR)/tool/bin/gosh \ + $(shell which gosh 2>/dev/null) ) \ + did_not_find_gosh___please_install_gosh ) +HOST_CC = gcc +HOST_CXX = g++ +INDENT = indent -sob +INSTALL = install +# the following two variables should be overwritten in Makeconf.bid.local +LD = $(SYSTEM_TARGET)ld +LATEX = latex +PDFLATEX = pdflatex +GREP = grep +LN = ln +MKDIR = mkdir -p +MKFLAGS +=$(MKFLAGS_$@) +NM = $(SYSTEM_TARGET)nm +OBJCOPY = $(SYSTEM_TARGET)objcopy +PWDCMD = sh -c pwd +RANLIB = $(SYSTEM_TARGET)ranlib +RM = rm -f +SCRUB = $(RM) $(wildcard *.old) $(wildcard *~) $(wildcard *.bak) \ + $(wildcard \#*\#) +SED = sed +SHELL = /bin/bash +SIZE = $(SYSTEM_TARGET)size +STRIP = $(SYSTEM_TARGET)strip +TR = tr +GEN_DOPECODE = $(L4DIR)/tool/gen_dopecode/gen_dopecode +ABS2REL = $(L4DIR)/tool/bin/abs2rel.sh +# it's optional to be able to set it as environment variable +FIASCOUX ?= $(L4DIR)/../kernel/fiasco/build-ux/fiasco +DISASM_CMD ?= $(SYSTEM_TARGET)objdump -ld $(1) | less + +# functions that are handy +absfilename_target_dir_needs_to_exist = $(foreach w,$(1),$(addsuffix /$(notdir $(w)),$(shell cd $(dir $(w)) 2>/dev/null&&$(PWDCMD)))) +absfilename = $(shell $(L4DIR)/mk/rel2abs.sh $(1)) +findfile = $(firstword $(wildcard $(addsuffix /$(1),$(2))) $(1)_NOT_FOUND) + +# include this one early to be able to set OBJ_BASE +-include $(L4DIR)/Makeconf.local + +ifeq ($(filter $(IGNORE_OBJDIR_TARGETS),$(MAKECMDGOALS)),) +# output directory +ifeq ($(O)$(OBJ_BASE),) +$(error need to give builddir with O=.../builddir) +else +ifneq ($(O),) +ifeq ($(origin OBJ_BASE),undefined) +OBJ_BASE := $(call absfilename, $(O)) +export OBJ_BASE +endif +endif +endif +endif + +ifeq ($(origin L4DIR_ABS),undefined) +L4DIR_ABS := $(call absfilename,$(L4DIR)) +endif +ifeq ($(origin PKGDIR_ABS),undefined) +PKGDIR_ABS := $(call absfilename,$(PKGDIR)) +endif +ifeq ($(origin SRC_DIR),undefined) +SRC_DIR := $(shell pwd) +endif +ifeq ($(origin SRC_BASE_ABS),undefined) +SRC_BASE ?= $(L4DIR) +SRC_BASE_ABS := $(call absfilename,$(SRC_BASE)) +export SRC_BASE_ABS +endif +ifeq ($(origin OBJ_DIR),undefined) +OBJ_DIR := $(subst $(SRC_BASE_ABS),$(OBJ_BASE),$(SRC_DIR)) +endif +ifeq ($(origin PKGDIR_OBJ),undefined) +PKGDIR_OBJ := $(call absfilename,$(OBJ_DIR)/$(PKGDIR)) +endif + +# if PKGDIR is not in L4DIR, we have an external package, so make up some +# build-dir for it +ifneq ($(patsubst $(L4DIR_ABS)/%,,$(PKGDIR_ABS)),) +ifneq ($(filter-out $(OBJ_BASE)/ext-pkg%,$(PKGDIR_OBJ)),) +PKGDIR_OBJ := $(OBJ_BASE)/ext-pkg$(PKGDIR_OBJ) +OBJ_DIR := $(OBJ_BASE)/ext-pkg$(OBJ_DIR) +endif +endif + +# sanity check the object dir +ifneq ($(SRC_BASE_ABS),$(OBJ_BASE)) +ifeq ($(SRC_DIR),$(OBJ_DIR)) +$(warning Sorry, your object or source path became garbled.) +$(warning OBJ_BASE: $(OBJ_BASE)) +$(warning SRC_BASE_ABS: $(SRC_BASE_ABS)) +$(warning SRC_DIR: $(SRC_DIR)) +$(warning OBJ_DIR: $(OBJ_DIR)) +$(warning PKGDIR: $(PKGDIR)) +$(warning L4DIR_ABS: $(L4DIR_ABS)) +$(warning PKGDIR_ABS: $(PKGDIR_ABS)) +$(warning PKGDIR_OBJ: $(PKGDIR_OBJ)) +$(error Please investigate.) +endif +endif + + +OBJ_DIR_EXPORT = $(OBJ_DIR) +export OBJ_DIR_EXPORT + +VPATH_SRC_BASE ?= $(SRC_DIR) + +# Makeconf.local handling +# dont use -include here, as we have special build conditions in $(L4DIR)/ +ifeq ($(origin BID_ROOT_CONF),undefined) +BID_ROOT_CONF := $(call absfilename, $(OBJ_BASE))/Makeconf.bid.local +endif +ifeq ($(filter $(IGNORE_OBJDIR_TARGETS),$(MAKECMDGOALS)),) +ifeq ($(wildcard $(BID_ROOT_CONF)),) +ifeq ($(BID_IGN_ROOT_CONF),) +$(error No configuration file found in build directory "$(OBJ_BASE)". Please run "make O=/path/to/objdir config" in "$(L4DIR_ABS)" or specify a valid build directory) +endif +else +include $(BID_ROOT_CONF) +endif +endif + +-include $(L4DIR)/Makeconf.$(CONFIG_LABEL) + +-include $(OBJ_BASE)/Makeconf.local +ifneq ($(PKGDIR),) +-include $(PKGDIR)/Makeconf.local +endif +# if it is not already set, we use this in the local dir +MAKECONFLOCAL ?= Makeconf.local +-include $(MAKECONFLOCAL) + +DROPS_STDDIR ?= /home/drops +ifeq ($(STATICFILE),) +STATICFILE = $(OBJ_BASE)/pkg/STATIC $(L4DIR)/pkg/STATIC +endif + +# a nasty workaround for make-3.79/make-3.80. The former needs an additional +# $$ for $-quotation when calling a function. +BID_IDENT = $(1) +ifeq ($(call BID_IDENT,$$),) +BID_DOLLARQUOTE = $$ +endif +BID_COMMA = , + +ifneq ($(PL),) +PL_j := -j $(PL) +export PL +endif + +include $(L4DIR)/mk/config.inc + +ifeq ($(HAVE_LDSO),y) +# MAKEDEP-call: +# arg1 - compiler binary name +# arg2 - [opt] compiler target. Will be written as target within the +# dependency file +# arg3 - [opt] name of the dependency file. If unset, ..d will be used. +# arg4 - [opt] alternative binary name +ifeq ($(origin BID_LIBGENDEP), undefined) +BID_LIBGENDEP := $(firstword $(wildcard $(call absfilename, \ + $(OBJ_BASE)/tool/gendep/libgendep.so \ + $(DROPS_STDDIR)/tool/lib/libgendep.so ))) +endif + +ifeq ($(HOST_SYSTEM),linux) + LD_PRELOAD = LD_PRELOAD +endif +ifeq ($(HOST_SYSTEM),darwin) + LD_PRELOAD = DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES +endif +MAKEDEP=$(LD_PRELOAD)=$(BID_LIBGENDEP) GENDEP_TARGET=$(if $(2),$(2),$@) \ + GENDEP_BINARY=$(1) $(if $(3),GENDEP_DEPFILE=$(3)) \ + $(if $(4),GENDEP_BINARY_ALT1=$(4)) +endif + +# macros used here and in packages +checkcc = $(shell if $(CC) $(1) -o /dev/null -c -x c \ + /dev/null > /dev/null 2>&1; then echo "$(1)"; fi) +checkcxx = $(shell if $(CXX) $(1) -o /dev/null -c -x c++ \ + /dev/null > /dev/null 2>&1; then echo "$(1)"; fi) + +# the gcc specific variables: version, base dir, include dir, gcc lib +# note: determining these variables is slow, and the values should +# be set in Makeconf.bid.local. However, this is the place were +# they are determined on a 'make config' in $(L4DIR) +GCCVERSION_f = $(shell $(CC) -dumpversion | sed -e 's/\(.*\)\..*/\1/') +GCCMAJORVERSION_f=$(shell $(CC) -dumpversion | sed -e 's/\([^.]*\).*/\1/') +GCCMINORVERSION_f=$(shell $(CC) -dumpversion | sed -e 's/[^.]*\.\([^.]*\).*/\1/') +GCCSUBVERSION_f = $(shell $(CC) -dumpversion | sed -e 's/.*\.\(.*\)/\1/') +GCCDIR_f = $(shell LC_ALL=C $(CC) -print-search-dirs|sed -ne 's+^install: \(.*[^/][^/]*\)/+\1+p' ) +GCCLIB_f = $(shell $(CC) -print-libgcc-file-name) +GCCLIB_EH_f = $(filter /%,$(shell $(CC) -print-file-name=libgcc_eh.a)) +GCCINCDIR_f = $(addprefix $(call GCCDIR_f),/include /include-fixed) +GCCNOSTACKPROTOPT_f= $(call checkcc,-fno-stack-protector) + +GCCINCDIR = $(GCCDIR)/include $(GCCDIR)/include-fixed +I_GCCINCDIR = $(addprefix -I,$(GCCINCDIR)) + +ifneq ($(PKGDIR),) + ifeq ($(origin PKGNAME),undefined) + PKGNAME := $(notdir $(shell cd $(PKGDIR);pwd)) + endif +endif + +ifeq ($(V),1) + VERBOSE = +endif +ifeq ($(V),0) + VERBOSE = @ +endif + +# indicate if we are using dietlibc or uClibc +ifeq ($(USE_DIETLIBC),y) +# dietlibc explicitly set for all architectures + DEFINES += -DUSE_DIETLIBC=y + USE_DIETLIBC = y + LIBC_TYPE = diet + $(warning The use of dietlibc is deprecated, please switch to uclibc.) + $(warning Dietlibc will soon be removed from the tree.) +else + # uClibc explicitly set for all architectures + DEFINES += -DUSE_UCLIBC=y + USE_UCLIBC = y + LIBC_TYPE = uc +endif + +ifeq ($(RELEASE_MODE),y) +DEFINES += -DL4BID_RELEASE_MODE +endif + +ifeq ($(USE_TASKLIB),y) +DEFINES += -DUSE_TASKLIB=y +endif + +ifeq ($(ARCH),arm) +ifeq ($(RAM_BASE),) +$(error RAM_BASE not given, needed for ARM architecture builds.) +endif +else #arch != arm + RAM_BASE = 0x0 +endif + +DEFINES += -DRAM_BASE=$(RAM_BASE) + + +ifneq ($(filter linux l4linux host,$(MODE)),) +HOST_LINK := 1 +endif + +# +# SUBDIR handling, not within the OBJ-*/ dirs +# +ifeq ($(SYSTEM),) +ifneq ($(SUBDIRS),) +.PHONY: $(SUBDIRS) +$(SUBDIRS): + $(VERBOSE)PWD=$(PWD)/$@ $(MAKE) -C $@ all + +# we know that SUBDIRS isn't empty, hence we can avoid the dir-test +scrub clean cleanall:: + $(VERBOSE)set -e; $(foreach i,$(SUBDIRS), \ + PWD=$(PWD)/$(i) $(MAKE) -C $(i) $@ $(MKFLAGS) $(MKFLAGS_$(i));) + +install:: $(SUBDIRS) + $(VERBOSE)set -e; $(foreach i,$(SUBDIRS), \ + PWD=$(PWD)/$(i) $(MAKE) -C $(i) $@ $(MKFLAGS) $(MKFLAGS_$(i));) + +endif + +all:: $(OBJ_DIR)/Makefile + +$(OBJ_DIR)/Makefile: $(L4DIR)/mk/Makeconf + $(VERBOSE)install -d $(dir $@) + $(VERBOSE)echo '# automatically created -- modifications will be lost' > $@ + $(VERBOSE)echo 'SRC := $(SRC_DIR)' >> $@ + $(VERBOSE)echo 'OBJ := $(OBJ_BASE)' >> $@ + $(VERBOSE)echo '.PHONY: x $$(MAKECMDGOALS)' >> $@ + $(VERBOSE)echo 'x:' >> $@ + $(VERBOSE)echo ' PWD=$$(SRC) $$(MAKE) -C $$(SRC) O=$$(OBJ)' >> $@ + $(VERBOSE)echo '$$(MAKECMDGOALS):' >> $@ + $(VERBOSE)echo ' PWD=$$(SRC) $$(MAKE) -C $$(SRC) O=$$(OBJ) $$@'>> $@ + +else +# we are within an OBJ-*/ dir, create dummy target +$(SUBDIRS): +endif + +# +# Dependency section +# +# + +# the general dependencies: All generated files depend on ".general.d". +# ".general.d" itself depends on the mk-Makeconf, the optional +# Makeconf.local, the Makeconf.bid.local, the packet-Makeconf.local and the +# Makeconf.local. This ensures a rebuilt if any of the configuration- +# or make-files changes. +# +# We have this nasty if-readable-magic to allow the files to disappear +# or to appear. Depending on if the according makeconf exists now, the +# if-readable magic .general.d is used on existance or non-existence. + +BID_DEPEND_GENERAL_D_COND = \ + if [ -r $(1) ] ; then echo -e '$@: $(1)\n$(1):\n' >>$@ ; \ + else echo '$$(if $$(wildcard $(1)), $@: FORCE)' >>$@; fi + +ifeq ($(SYSTEM),) +GENERAL_D_LOC := $(OBJ_DIR)/.general.d +else +GENERAL_D_LOC := .general.d +endif + +$(GENERAL_D_LOC): $(L4DIR)/mk/Makeconf + @$(BUILD_MESSAGE) + @install -d $(dir $@) + $(DEPEND_VERBOSE)echo '$@: $(SRC_DIR)/Makefile ' > $@ + $(DEPEND_VERBOSE)$(call BID_DEPEND_GENERAL_D_COND,\ + $(OBJ_BASE)/Makeconf.bid.local) + $(DEPEND_VERBOSE)$(call BID_DEPEND_GENERAL_D_COND,\ + $(OBJ_BASE)/Makeconf.local) + $(DEPEND_VERBOSE)$(call BID_DEPEND_GENERAL_D_COND,\ + $(L4DIR)/Makeconf.local) + $(DEPEND_VERBOSE)$(call BID_DEPEND_GENERAL_D_COND,\ + $(L4DIR)/Makeconf.$(CONFIG_LABEL)) + $(if $(PKGDIR),$(DEPEND_VERBOSE)$(call BID_DEPEND_GENERAL_D_COND,\ + $(PKGDIR)/Makeconf.local)) + $(DEPEND_VERBOSE)$(call BID_DEPEND_GENERAL_D_COND,\ + $(MAKECONFLOCAL)) + +DEPS += $(GENERAL_D_LOC) + +ifneq ($(DEPENDS_PKGS),) +DEPENDS_PKGS_MISSING := $(strip $(foreach i,$(DEPENDS_PKGS), \ + $(if $(wildcard $(L4DIR)/pkg/$(i)),,$(i)))) + +ifneq ($(DEPENDS_PKGS_MISSING),) +# clear TARGET to prevent building anything +TARGET = +all:: + @echo -e "\033[32mPackage dependencies missing: \033[1m$(DEPENDS_PKGS_MISSING)\033[22m, skipping.\033[0m" +endif +endif + +# +# Messages +# + +# set SHOWMESSAGES=true or 'y' to print textual action descriptions +SHOWMESSAGES ?= true + +# coloring on color-capable terminals +# enabled by setting BID_COLORED_PHASES to y +ifeq ($(BID_COLORED_PHASES),y) +ifeq ($(COLOR_TERMINAL),y) + EMPHSTART = '\033[34m' + EMPHSTOP = '\033[0m' +else + EMPHSTART = + EMPHSTOP = +endif +endif + + +ifneq (,$(filter y true, $(SHOWMESSAGES))) +AR_MESSAGE?= echo -e " ==> Archiving into $@" +BUILD_MESSAGE?= echo -e " ... Building $@" +BUILT_MESSAGE?= echo -e $(EMPHSTART)' ==> "$@" built'$(EMPHSTOP) +COMP_MESSAGE?= echo -e " ... Compiling $@" +COMP_P_MESSAGE?=echo -e " ... Compiling PIC $@" +COMP_PR_MESSAGE?=echo -e " ... Compiling PROFILE $@" +GEN_MESSAGE?= echo -e " ... Generating $@" +LINK_MESSAGE?= echo -e " ==> Linking $@" +LINK_SHARED_MESSAGE?= echo -e " ==> Linking to shared $@" +LINK_PARTIAL_MESSAGE?= echo -e " ==> Partial linking to $@" +DEP_MESSAGE?= echo -e " ... Building dependencies for $<" +CLEAN_MESSAGE?= echo -e " ... Removing created files" +CLEANALL_MESSAGE?=echo -e " ... Removing all created files" +INSTALL_LINK_MESSAGE?=echo -e " ==> Updating symlinks" +INSTALL_DOC_MESSAGE?=echo -e " ==> Installing $(<) documentation" +INSTALL_DOC_LOCAL_MESSAGE?= echo -e " ==> Installing $(<) documentation locally" +INSTALL_MESSAGE?=echo -e " ==> Installing $^" +INSTALL_LOCAL_MESSAGE?=echo -e " ==> Installing $(<) to local build-tree" +UPDATE_HTML_MESSAGE?=echo -e " ! You should remake your doc directory in $(1)" +endif + + +# allows an include $(DEPSVAR) at the end of the makefile +# but prevents rebuilding them on a scrub, clean, cleanall and help +ifneq ($(filter scrub clean cleanall help,$(MAKECMDGOALS)),) +DEPSVAR = +else +DEPSVAR = $(DEPS) +endif + +# +# Some rules +# + +# addfileheader-rule: allows "make addfileheader main.c server.c"-like +# commands and automatically inserts the path within the package +# options may be passed with $(ADDFILEHEADER_OPTIONS) +ADDFILEHEADER_PREFIX = $(patsubst $(call absfilename,$(PKGDIR)/)%,\ + $(PKGNAME)/%,$(call absfilename,./)) +ADDFILEHEADER_FILES = $(filter-out addfileheader,$(MAKECMDGOALS)) +addfileheader: + addfileheader $(ADDFILEHEADER_OPTIONS) -p $(ADDFILEHEADER_PREFIX) $(ADDFILEHEADER_FILES) + + +.PHONY: FORCE + +endif # _L4DIR_MK_MAKECONF undefined -- cgit v1.2.3 From de60719e36c86cd19e7ace9a1f1c485ce2af4060 Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Mon, 21 Dec 2009 22:53:52 +0100 Subject: a temporary version of Makefiles for libdde_linux26 --- libdde_linux26/Makeconf | 51 +++++++++++++++++++ libdde_linux26/Makefile | 6 +-- libdde_linux26/contrib/Makefile | 6 ++- libdde_linux26/contrib/arch/x86/include/Makefile | 4 +- libdde_linux26/contrib/include/Makefile | 6 +-- libdde_linux26/include/Makefile | 6 +-- libdde_linux26/lib/Makefile | 10 ++-- libdde_linux26/lib/src/Makefile | 15 ++++-- libdde_linux26/lib/src/Makefile.inc | 50 ++++++++++++++++++ libdde_linux26/mk/Makeconf | 64 ++++++++++++------------ libdde_linux26/mk/include.mk | 2 +- libdde_linux26/mk/lib.mk | 3 +- libdde_linux26/mk/subdir.mk | 10 +--- 13 files changed, 168 insertions(+), 65 deletions(-) create mode 100644 libdde_linux26/Makeconf create mode 100644 libdde_linux26/lib/src/Makefile.inc (limited to 'libdde_linux26/mk/Makeconf') diff --git a/libdde_linux26/Makeconf b/libdde_linux26/Makeconf new file mode 100644 index 00000000..de84e39a --- /dev/null +++ b/libdde_linux26/Makeconf @@ -0,0 +1,51 @@ +# Linux 2.6 defines some macros on command line +KBUILD_DEFINES = -D"KBUILD_STR(s)=\#s" \ + -D"KBUILD_BASENAME=KBUILD_STR($(patsubst %.o, %, $(notdir $@)))" \ + -D"KBUILD_MODNAME=KBUILD_STR($(patsubst %.o, %, $@))" + +# for some reasons, Linux 2.6 does not include autoconf.h in the implementation +# files but does so on the command line +ifeq ($(ARCH), x86) +KBUILD_CPPFLAGS = -include linux/autoconf.h +endif + +ifeq ($(ARCH), arm) +KBUILD_CPPFLAGS = -include linux/autoconf-arm.h +endif + +# includes +MY_DDE_INCDIR = $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26 \ + $(OBJ_BASE)/include/l4/dde/linux26 + +SUFFIX_amd64 = x86_64 +SUFFIX_x86 = x86 +SUFFIX_arm = arm + +MY_LINUX26_INCDIR = $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/linux-headers \ + $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/asm \ + $(OBJ_BASE)/include/l4/dde/linux26/linux-headers + +# stolen from fiasco/src/Makeconf, checks whether a compiler supports a certain +# parameter +CHECKCC = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \ + > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) + +# Linux always uses C... +MODE_USE_C = y +L4_MULTITHREADED = y + +# arch-specific stuff +ifeq ($(ARCH), x86) +MY_DDE_INCDIR += $(OBJ_BASE)/include/l4/dde/linux26/linux-headers/asm/mach-default +endif + +PRIVATE_INCDIR += $(MY_DDE_INCDIR) $(MY_LINUX26_INCDIR) + +DEFINES += -D__KERNEL__ -DDDE_LINUX $(KBUILD_DEFINES) +CPPFLAGS += $(KBUILD_CPPFLAGS) +CFLAGS += -ffunction-sections +ASFLAGS += -D__ASSEMBLY__ + +WARNINGS += -Wall -Wstrict-prototypes -fno-strict-aliasing +WARNINGS += $(call CHECKCC, -Wno-unused,) +WARNINGS += $(call CHECKCC, -Wno-pointer-sign,) diff --git a/libdde_linux26/Makefile b/libdde_linux26/Makefile index 5d180d78..092ea77e 100644 --- a/libdde_linux26/Makefile +++ b/libdde_linux26/Makefile @@ -1,6 +1,6 @@ -PKGDIR ?= .. -L4DIR ?= $(PKGDIR)/../.. +PKGDIR ?= . +L4DIR ?= $(PKGDIR) -TARGET = contrib include lib examples +TARGET = contrib include lib include $(L4DIR)/mk/subdir.mk diff --git a/libdde_linux26/contrib/Makefile b/libdde_linux26/contrib/Makefile index ec3eca26..232423de 100644 --- a/libdde_linux26/contrib/Makefile +++ b/libdde_linux26/contrib/Makefile @@ -1,5 +1,7 @@ -PKGDIR ?= ../.. -L4DIR ?= $(PKGDIR)/../.. +PKGDIR ?= .. +L4DIR ?= $(PKGDIR) + +BUILD_ARCH := x86 TARGET = include arch/$(BUILD_ARCH)/include diff --git a/libdde_linux26/contrib/arch/x86/include/Makefile b/libdde_linux26/contrib/arch/x86/include/Makefile index c374502c..665e84a2 100644 --- a/libdde_linux26/contrib/arch/x86/include/Makefile +++ b/libdde_linux26/contrib/arch/x86/include/Makefile @@ -1,5 +1,5 @@ -PKGDIR ?= ../../../../.. -L4DIR ?= $(PKGDIR)/../.. +PKGDIR ?= ../../../.. +L4DIR ?= $(PKGDIR) # Force these include files to appear in a special subfolder of dde/ INSTALL_INC_PREFIX = l4/dde/linux26/linux-headers/ diff --git a/libdde_linux26/contrib/include/Makefile b/libdde_linux26/contrib/include/Makefile index 009352f5..fa9f5f1b 100644 --- a/libdde_linux26/contrib/include/Makefile +++ b/libdde_linux26/contrib/include/Makefile @@ -1,8 +1,8 @@ -PKGDIR ?= ../../.. -L4DIR ?= $(PKGDIR)/../.. +PKGDIR ?= ../.. +L4DIR ?= $(PKGDIR) # Force these include files to appear in a special subfolder of dde/ -INSTALL_INC_PREFIX = l4/dde/linux26/linux-headers +INSTALL_INC_PREFIX = linux-headers include $(L4DIR)/mk/include.mk diff --git a/libdde_linux26/include/Makefile b/libdde_linux26/include/Makefile index a300aaaf..7584d036 100644 --- a/libdde_linux26/include/Makefile +++ b/libdde_linux26/include/Makefile @@ -1,10 +1,10 @@ -PKGDIR ?= ../.. -L4DIR ?= $(PKGDIR)/../.. +PKGDIR ?= .. +L4DIR ?= $(PKGDIR) # Force these include files to appear in a special subfolder of dde/ INSTALL_INC_PREFIX = l4/dde/linux26 -include $(L4DIR)/mk/Makeconf +#include $(L4DIR)/mk/Makeconf -include $(PKGDIR_OBJ)/Makeconf include $(L4DIR)/mk/include.mk diff --git a/libdde_linux26/lib/Makefile b/libdde_linux26/lib/Makefile index 0ea410d0..7e6ceb0c 100644 --- a/libdde_linux26/lib/Makefile +++ b/libdde_linux26/lib/Makefile @@ -1,11 +1,11 @@ -PKGDIR ?= ../.. -L4DIR ?= $(PKGDIR)/../.. +PKGDIR ?= .. +L4DIR ?= $(PKGDIR) -include $(L4DIR)/mk/Makeconf +#include $(L4DIR)/mk/Makeconf -include $(PKGDIR_OBJ)/Makeconf -ifeq ($(CONFIG_DDE26),y) +#ifeq ($(CONFIG_DDE26),y) TARGET = src src_ip -endif +#endif include $(L4DIR)/mk/subdir.mk diff --git a/libdde_linux26/lib/src/Makefile b/libdde_linux26/lib/src/Makefile index 3707b2cb..7802479b 100644 --- a/libdde_linux26/lib/src/Makefile +++ b/libdde_linux26/lib/src/Makefile @@ -1,9 +1,15 @@ -PKGDIR ?= ../../.. -L4DIR ?= $(PKGDIR)/../.. -CONTRIB ?= $(PKGDIR)/linux26/contrib +PKGDIR ?= ../.. +L4DIR ?= $(PKGDIR) +CONTRIB ?= $(PKGDIR)/contrib -include $(PKGDIR_OBJ)/Makeconf +CONFIG_DDE26_COMMON := y +CONFIG_DDE26_NET := y +CONFIG_DDE26_BLOCK := y +CONFIG_DDE26_SOUND := y +CONFIG_DDE26_CHAR :=y + ifeq ($(CONFIG_DDE26_COMMON),y) TARGET += libdde_linux26.o.a endif @@ -25,6 +31,7 @@ TARGET += libdde_linux26_char.a endif SYSTEMS = x86-l4v2 +ARCH = x86 ifeq ($(ARCH), x86) ARCH_DIR = arch/x86 @@ -225,6 +232,6 @@ gen_crc32table : lib/gen_crc32table.c @$(GEN_MESSAGE) $(VERBOSE)$(HOST_CC) -O2 -o $@ $< -include $(PKGDIR)/linux26/Makeconf +include $(PKGDIR)/Makeconf include $(L4DIR)/mk/lib.mk diff --git a/libdde_linux26/lib/src/Makefile.inc b/libdde_linux26/lib/src/Makefile.inc new file mode 100644 index 00000000..12df220d --- /dev/null +++ b/libdde_linux26/lib/src/Makefile.inc @@ -0,0 +1,50 @@ +# automatically generated, do not edit! + +IDL_SRC_C_libdde_linux26.o.a= +IDL_SRC_C_libdde_linux26_net.a= +IDL_SRC_C_libdde_linux26_block.a= +IDL_SRC_C_libdde_linux26_sound.a= +IDL_SRC_C_libdde_linux26_char.a= +SRC_C_libdde_linux26.o.a += $(IDL_SRC_C_libdde_linux26.o.a) +SRC_C_libdde_linux26_net.a += $(IDL_SRC_C_libdde_linux26_net.a) +SRC_C_libdde_linux26_block.a += $(IDL_SRC_C_libdde_linux26_block.a) +SRC_C_libdde_linux26_sound.a += $(IDL_SRC_C_libdde_linux26_sound.a) +SRC_C_libdde_linux26_char.a += $(IDL_SRC_C_libdde_linux26_char.a) +Makefile.inc: IDL_SRC_C_libdde_linux26.o.a= +Makefile.inc: IDL_SRC_C_libdde_linux26_net.a= +Makefile.inc: IDL_SRC_C_libdde_linux26_block.a= +Makefile.inc: IDL_SRC_C_libdde_linux26_sound.a= +Makefile.inc: IDL_SRC_C_libdde_linux26_char.a= +IDL_SRC_CC_libdde_linux26.o.a= +IDL_SRC_CC_libdde_linux26_net.a= +IDL_SRC_CC_libdde_linux26_block.a= +IDL_SRC_CC_libdde_linux26_sound.a= +IDL_SRC_CC_libdde_linux26_char.a= +SRC_CC_libdde_linux26.o.a += $(IDL_SRC_CC_libdde_linux26.o.a) +SRC_CC_libdde_linux26_net.a += $(IDL_SRC_CC_libdde_linux26_net.a) +SRC_CC_libdde_linux26_block.a += $(IDL_SRC_CC_libdde_linux26_block.a) +SRC_CC_libdde_linux26_sound.a += $(IDL_SRC_CC_libdde_linux26_sound.a) +SRC_CC_libdde_linux26_char.a += $(IDL_SRC_CC_libdde_linux26_char.a) +Makefile.inc: IDL_SRC_CC_libdde_linux26.o.a= +Makefile.inc: IDL_SRC_CC_libdde_linux26_net.a= +Makefile.inc: IDL_SRC_CC_libdde_linux26_block.a= +Makefile.inc: IDL_SRC_CC_libdde_linux26_sound.a= +Makefile.inc: IDL_SRC_CC_libdde_linux26_char.a= +OBJS_libdde_linux26.o.a += arch/l4/cli_sti.o arch/l4/fs.o arch/l4/hw-helpers.o arch/l4/init_task.o arch/l4/init.o arch/l4/pci.o arch/l4/power.o arch/l4/process.o arch/l4/res.o arch/l4/sched.o arch/l4/signal.o arch/l4/smp.o arch/l4/softirq.o arch/l4/timer.o arch/l4/page_alloc.o arch/l4/kmem_cache.o arch/l4/kmalloc.o arch/l4/irq.o arch/l4/param.o arch/l4/vmalloc.o arch/l4/vmstat.o arch/l4/mm-helper.o lib/rwsem.o arch/x86/kernel/pci-dma.o arch/x86/kernel/pci-nommu.o kernel/exit.o kernel/kthread.o kernel/mutex.o kernel/notifier.o kernel/resource.o kernel/rwsem.o kernel/sched.o kernel/semaphore.o kernel/sys.o kernel/time.o kernel/timer.o kernel/wait.o kernel/workqueue.o lib/bitmap.o lib/bitrev.o lib/crc32.o lib/ctype.o lib/cpumask.o lib/find_next_bit.o lib/hexdump.o lib/idr.o lib/iomap.o lib/hweight.o lib/kasprintf.o lib/kernel_lock.o lib/klist.o lib/kobject.o lib/kref.o lib/parser.o lib/proportions.o lib/radix-tree.o lib/scatterlist.o lib/sha1.o lib/string.o lib/vsprintf.o mm/dmapool.o mm/mempool.o mm/swap.o mm/util.o drivers/base/attribute_container.o drivers/base/bus.o drivers/base/class.o drivers/base/core.o drivers/base/cpu.o drivers/base/dd.o drivers/base/devres.o drivers/base/driver.o drivers/base/init.o drivers/base/map.o drivers/base/platform.o drivers/base/sys.o drivers/pci/access.o drivers/pci/bus.o drivers/pci/hotplug-pci.o drivers/pci/pci.o drivers/pci/pci-driver.o drivers/pci/probe.o drivers/pci/search.o drivers/pci/setup-bus.o drivers/pci/setup-res.o arch/x86/lib/semaphore_32.o +OBJS_libdde_linux26_net.a += arch/l4/net.o drivers/net/mii.o net/core/dev.o net/core/dev_mcast.o net/core/ethtool.o net/core/link_watch.o net/core/neighbour.o net/core/netevent.o net/core/net-sysfs.o net/core/net_namespace.o net/core/rtnetlink.o net/core/skbuff.o net/core/skb_dma_map.o net/core/utils.o net/ethernet/eth.o net/sched/sch_generic.o arch/x86/lib/checksum_32.o +OBJS_libdde_linux26_block.a += arch/l4/inodes.o block/blk-barrier.o block/blk-core.o block/blk-exec.o block/blk-ioc.o block/blk-merge.o block/blk-settings.o block/blk-softirq.o block/blk-sysfs.o block/blk-tag.o block/blk-timeout.o block/elevator.o block/genhd.o block/noop-iosched.o block/ioctl.o block/scsi_ioctl.o mm/backing-dev.o mm/bounce.o mm/page-writeback.o fs/bio.o fs/block_dev.o fs/buffer.o fs/filesystems.o +OBJS_libdde_linux26_sound.a += sound/sound_core.o arch/l4/sound.o +OBJS_libdde_linux26_char.a += arch/l4/inodes.o fs/char_dev.o + + +libdde_linux26.o.a: $(OBJS_libdde_linux26.o.a) +libdde_linux26_net.a: $(OBJS_libdde_linux26_net.a) +libdde_linux26_block.a: $(OBJS_libdde_linux26_block.a) +libdde_linux26_sound.a: $(OBJS_libdde_linux26_sound.a) +libdde_linux26_char.a: $(OBJS_libdde_linux26_char.a) + +$(OBJS_libdde_linux26.o.a): .general.d +$(OBJS_libdde_linux26_net.a): .general.d +$(OBJS_libdde_linux26_block.a): .general.d +$(OBJS_libdde_linux26_sound.a): .general.d +$(OBJS_libdde_linux26_char.a): .general.d diff --git a/libdde_linux26/mk/Makeconf b/libdde_linux26/mk/Makeconf index 1c927e45..5a1e495c 100644 --- a/libdde_linux26/mk/Makeconf +++ b/libdde_linux26/mk/Makeconf @@ -139,19 +139,19 @@ findfile = $(firstword $(wildcard $(addsuffix /$(1),$(2))) $(1)_NOT_FOUND) # include this one early to be able to set OBJ_BASE -include $(L4DIR)/Makeconf.local -ifeq ($(filter $(IGNORE_OBJDIR_TARGETS),$(MAKECMDGOALS)),) +#ifeq ($(filter $(IGNORE_OBJDIR_TARGETS),$(MAKECMDGOALS)),) # output directory -ifeq ($(O)$(OBJ_BASE),) -$(error need to give builddir with O=.../builddir) -else -ifneq ($(O),) -ifeq ($(origin OBJ_BASE),undefined) -OBJ_BASE := $(call absfilename, $(O)) -export OBJ_BASE -endif -endif -endif -endif +#ifeq ($(O)$(OBJ_BASE),) +#$(error need to give builddir with O=.../builddir) +#else +#ifneq ($(O),) +#ifeq ($(origin OBJ_BASE),undefined) +#OBJ_BASE := $(call absfilename, $(O)) +#export OBJ_BASE +#endif +#endif +#endif +#endif ifeq ($(origin L4DIR_ABS),undefined) L4DIR_ABS := $(call absfilename,$(L4DIR)) @@ -207,25 +207,25 @@ VPATH_SRC_BASE ?= $(SRC_DIR) # Makeconf.local handling # dont use -include here, as we have special build conditions in $(L4DIR)/ -ifeq ($(origin BID_ROOT_CONF),undefined) -BID_ROOT_CONF := $(call absfilename, $(OBJ_BASE))/Makeconf.bid.local -endif -ifeq ($(filter $(IGNORE_OBJDIR_TARGETS),$(MAKECMDGOALS)),) -ifeq ($(wildcard $(BID_ROOT_CONF)),) -ifeq ($(BID_IGN_ROOT_CONF),) -$(error No configuration file found in build directory "$(OBJ_BASE)". Please run "make O=/path/to/objdir config" in "$(L4DIR_ABS)" or specify a valid build directory) -endif -else -include $(BID_ROOT_CONF) -endif -endif - --include $(L4DIR)/Makeconf.$(CONFIG_LABEL) - --include $(OBJ_BASE)/Makeconf.local -ifneq ($(PKGDIR),) --include $(PKGDIR)/Makeconf.local -endif +#ifeq ($(origin BID_ROOT_CONF),undefined) +#BID_ROOT_CONF := $(call absfilename, $(OBJ_BASE))/Makeconf.bid.local +#endif +#ifeq ($(filter $(IGNORE_OBJDIR_TARGETS),$(MAKECMDGOALS)),) +#ifeq ($(wildcard $(BID_ROOT_CONF)),) +#ifeq ($(BID_IGN_ROOT_CONF),) +#$(error No configuration file found in build directory "$(OBJ_BASE)". Please run "make O=/path/to/objdir config" in "$(L4DIR_ABS)" or specify a valid build directory) +#endif +#else +#include $(BID_ROOT_CONF) +#endif +#endif + +#-include $(L4DIR)/Makeconf.$(CONFIG_LABEL) + +#-include $(OBJ_BASE)/Makeconf.local +#ifneq ($(PKGDIR),) +#-include $(PKGDIR)/Makeconf.local +#endif # if it is not already set, we use this in the local dir MAKECONFLOCAL ?= Makeconf.local -include $(MAKECONFLOCAL) @@ -248,7 +248,7 @@ PL_j := -j $(PL) export PL endif -include $(L4DIR)/mk/config.inc +#include $(L4DIR)/mk/config.inc ifeq ($(HAVE_LDSO),y) # MAKEDEP-call: diff --git a/libdde_linux26/mk/include.mk b/libdde_linux26/mk/include.mk index 4725374b..3e325cd4 100644 --- a/libdde_linux26/mk/include.mk +++ b/libdde_linux26/mk/include.mk @@ -34,7 +34,7 @@ endif INSTALL_INC_PREFIX ?= l4/$(PKGNAME) INCSRC_DIR ?= $(SRC_DIR) -include $(L4DIR)/mk/Makeconf +#include $(L4DIR)/mk/Makeconf $(GENERAL_D_LOC): $(L4DIR)/mk/include.mk -include $(DEPSVAR) diff --git a/libdde_linux26/mk/lib.mk b/libdde_linux26/mk/lib.mk index 3ae24dbe..c96fcaaf 100644 --- a/libdde_linux26/mk/lib.mk +++ b/libdde_linux26/mk/lib.mk @@ -16,6 +16,7 @@ ifeq ($(origin _L4DIR_MK_LIB_MK),undefined) _L4DIR_MK_LIB_MK=y ROLE = lib.mk +SYSTEM = x86-l4v2 # define INSTALLDIRs prior to including install.inc, where the install- # rules are defined. Same for INSTALLDIR. @@ -60,7 +61,7 @@ LDFLAGS += $(LIBS) $(LDFLAGS_$@) $(LDNOSTDLIB) LDSCRIPT = $(call findfile,main_rel.ld,$(L4LIBDIR)) # install.inc eventually defines rules for every target -include $(L4DIR)/mk/install.inc +#include $(L4DIR)/mk/install.inc DEPS += $(foreach file,$(TARGET), $(dir $(file)).$(notdir $(file)).d) diff --git a/libdde_linux26/mk/subdir.mk b/libdde_linux26/mk/subdir.mk index 0f31b2d1..176200fe 100644 --- a/libdde_linux26/mk/subdir.mk +++ b/libdde_linux26/mk/subdir.mk @@ -6,18 +6,10 @@ # # 05/2002 Jork Loeser -include $(L4DIR)/mk/Makeconf +#include $(L4DIR)/mk/Makeconf -ifeq ($(PKGDIR),.) -TARGET ?= $(patsubst %/Makefile,%,$(wildcard $(addsuffix /Makefile, \ - idl include src lib server examples doc))) -$(if $(wildcard include/Makefile), idl lib server examples: include) -$(if $(wildcard idl/Makefile), lib server examples: idl) -$(if $(wildcard lib/Makefile), server examples: lib) -else TARGET ?= $(patsubst %/Makefile,%,$(wildcard $(addsuffix /Makefile, \ idl src lib server examples doc))) -endif SUBDIR_TARGET := $(if $(filter doc,$(MAKECMDGOALS)),$(TARGET), \ $(filter-out doc,$(TARGET))) -- cgit v1.2.3 From 4acf279a6048d18fe3b9ca65d6e30f4544f6accf Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Fri, 1 Jan 2010 15:00:11 +0100 Subject: The modified Makefile can build libdde_linux26 now --- libdde_linux26/Makeconf | 17 ++++++++++------- libdde_linux26/contrib/arch/x86/include/Makefile | 2 +- libdde_linux26/include/Makefile | 5 +++-- libdde_linux26/mk/Makeconf | 9 ++++++--- libdde_linux26/mk/binary.inc | 16 +++++++++++----- libdde_linux26/mk/include.mk | 2 +- libdde_linux26/mk/modes.inc | 16 ++++++++-------- 7 files changed, 40 insertions(+), 27 deletions(-) (limited to 'libdde_linux26/mk/Makeconf') diff --git a/libdde_linux26/Makeconf b/libdde_linux26/Makeconf index de84e39a..f81b29da 100644 --- a/libdde_linux26/Makeconf +++ b/libdde_linux26/Makeconf @@ -13,17 +13,20 @@ ifeq ($(ARCH), arm) KBUILD_CPPFLAGS = -include linux/autoconf-arm.h endif +OBJ_BASE = /root/hurd/libdde_linux26/build + # includes -MY_DDE_INCDIR = $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26 \ - $(OBJ_BASE)/include/l4/dde/linux26 +MY_DDE_INCDIR = $(OBJ_BASE)/include/$(ARCH) \ + $(OBJ_BASE)/include/ SUFFIX_amd64 = x86_64 SUFFIX_x86 = x86 SUFFIX_arm = arm -MY_LINUX26_INCDIR = $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/linux-headers \ - $(OBJ_BASE)/include/$(ARCH)/l4/dde/linux26/asm \ - $(OBJ_BASE)/include/l4/dde/linux26/linux-headers +MY_LINUX26_INCDIR = $(OBJ_BASE)/include/$(ARCH)/linux-headers \ + $(OBJ_BASE)/include/$(ARCH)/asm \ + $(OBJ_BASE)/include/linux-headers/asm \ + $(OBJ_BASE)/include/linux-headers # stolen from fiasco/src/Makeconf, checks whether a compiler supports a certain # parameter @@ -36,10 +39,10 @@ L4_MULTITHREADED = y # arch-specific stuff ifeq ($(ARCH), x86) -MY_DDE_INCDIR += $(OBJ_BASE)/include/l4/dde/linux26/linux-headers/asm/mach-default +MY_DDE_INCDIR += $(OBJ_BASE)/include/linux-headers/asm/mach-default endif -PRIVATE_INCDIR += $(MY_DDE_INCDIR) $(MY_LINUX26_INCDIR) +PRIVATE_INCDIR += $(MY_DDE_INCDIR) $(MY_LINUX26_INCDIR) /root/hurd/libddekit/include DEFINES += -D__KERNEL__ -DDDE_LINUX $(KBUILD_DEFINES) CPPFLAGS += $(KBUILD_CPPFLAGS) diff --git a/libdde_linux26/contrib/arch/x86/include/Makefile b/libdde_linux26/contrib/arch/x86/include/Makefile index 665e84a2..92d41a6d 100644 --- a/libdde_linux26/contrib/arch/x86/include/Makefile +++ b/libdde_linux26/contrib/arch/x86/include/Makefile @@ -2,7 +2,7 @@ PKGDIR ?= ../../../.. L4DIR ?= $(PKGDIR) # Force these include files to appear in a special subfolder of dde/ -INSTALL_INC_PREFIX = l4/dde/linux26/linux-headers/ +INSTALL_INC_PREFIX = linux-headers/ include $(L4DIR)/mk/include.mk diff --git a/libdde_linux26/include/Makefile b/libdde_linux26/include/Makefile index 7584d036..2ac8b949 100644 --- a/libdde_linux26/include/Makefile +++ b/libdde_linux26/include/Makefile @@ -2,9 +2,9 @@ PKGDIR ?= .. L4DIR ?= $(PKGDIR) # Force these include files to appear in a special subfolder of dde/ -INSTALL_INC_PREFIX = l4/dde/linux26 +INSTALL_INC_PREFIX = -#include $(L4DIR)/mk/Makeconf +include $(L4DIR)/mk/Makeconf -include $(PKGDIR_OBJ)/Makeconf include $(L4DIR)/mk/include.mk @@ -18,6 +18,7 @@ SUFFIX_arm = arm # macro to establish a symlink to a dir if not already existing MAKELINK = if [ ! $1 -ef $2 ] ; then ln -sf $3 $2 ; fi +BUILD_ARCH = x86 ARCH = $(BUILD_ARCH) all:: diff --git a/libdde_linux26/mk/Makeconf b/libdde_linux26/mk/Makeconf index 5a1e495c..4f377875 100644 --- a/libdde_linux26/mk/Makeconf +++ b/libdde_linux26/mk/Makeconf @@ -31,6 +31,9 @@ ifeq ($(origin _L4DIR_MK_MAKECONF),undefined) _L4DIR_MK_MAKECONF=y +SYSTEMS = x86-l4v2 +ARCH = x86 + # the default target is all all:: @@ -230,7 +233,7 @@ VPATH_SRC_BASE ?= $(SRC_DIR) MAKECONFLOCAL ?= Makeconf.local -include $(MAKECONFLOCAL) -DROPS_STDDIR ?= /home/drops +DROPS_STDDIR ?= /root/hurd/libdde_linux26/build ifeq ($(STATICFILE),) STATICFILE = $(OBJ_BASE)/pkg/STATIC $(L4DIR)/pkg/STATIC endif @@ -320,8 +323,8 @@ ifeq ($(USE_DIETLIBC),y) $(warning Dietlibc will soon be removed from the tree.) else # uClibc explicitly set for all architectures - DEFINES += -DUSE_UCLIBC=y - USE_UCLIBC = y + DEFINES += #-DUSE_UCLIBC=y + USE_UCLIBC = #y LIBC_TYPE = uc endif diff --git a/libdde_linux26/mk/binary.inc b/libdde_linux26/mk/binary.inc index 14da70a9..6525d1e6 100644 --- a/libdde_linux26/mk/binary.inc +++ b/libdde_linux26/mk/binary.inc @@ -155,11 +155,11 @@ all:: $(TARGET) disasm: $(TARGET) $(call DISASM_CMD,$<) -L4INCDIR ?= $(addprefix $(OBJ_BASE)/include/$(ARCH)/,$(L4API)) \ - $(addprefix $(OBJ_BASE)/include/,$(L4API)) \ - $(OBJ_BASE)/include/$(ARCH) \ +L4INCDIR ?= $(OBJ_BASE)/include/$(ARCH) \ $(OBJ_BASE)/include \ - $(DICE_INCDIR) \ +# $(addprefix $(OBJ_BASE)/include/$(ARCH)/,$(L4API)) \ +# $(addprefix $(OBJ_BASE)/include/,$(L4API)) \ +# $(DICE_INCDIR) \ $(addprefix $(DROPS_STDDIR)/include/$(ARCH)/,$(L4API)) \ $(addprefix $(DROPS_STDDIR)/include/,$(L4API)) \ $(DROPS_STDDIR)/include/$(ARCH) \ @@ -291,14 +291,20 @@ endif endif CPPFLAGS+= $(CPPFLAGS_$(OSYSTEM)) $(CPPFLAGS_$( Date: Fri, 14 May 2010 19:33:15 +0200 Subject: Fix up DDE paths --- dde_e100/Makeconf.local | 8 ++++---- dde_e1000/Makeconf.local | 8 ++++---- dde_ne2k_pci/Makeconf.local | 8 ++++---- dde_pcnet32/Makeconf.local | 8 ++++---- dde_pcnet32_test/Makeconf.local | 8 ++++---- dde_rtl8139/Makeconf.local | 8 ++++---- libdde_linux26/Makeconf | 2 +- libdde_linux26/Makeconf.local | 2 +- libdde_linux26/mk/Makeconf | 2 +- 9 files changed, 27 insertions(+), 27 deletions(-) (limited to 'libdde_linux26/mk/Makeconf') diff --git a/dde_e100/Makeconf.local b/dde_e100/Makeconf.local index d6594dc7..3d03134b 100644 --- a/dde_e100/Makeconf.local +++ b/dde_e100/Makeconf.local @@ -2,9 +2,9 @@ SYSTEMS = x86-l4v2 ARCH = x86 SYSTEM = x86-l4v2 -DDEKITLIBDIR = /root/hurd/libddekit/ -DDEKITINCDIR = /root/hurd/libddekit/include -DDE26LIBDIR = /root/hurd/libdde_linux26/lib/src -OBJ_BASE = /root/hurd/libdde_linux26/build +DDEKITLIBDIR = $(PKGDIR)/../libddekit/ +DDEKITINCDIR = $(PKGDIR)/../libddekit/include +DDE26LIBDIR = $(PKGDIR)/lib/src +OBJ_BASE = $(PKGDIR)/build L4LIBDIR = . diff --git a/dde_e1000/Makeconf.local b/dde_e1000/Makeconf.local index d6594dc7..3d03134b 100644 --- a/dde_e1000/Makeconf.local +++ b/dde_e1000/Makeconf.local @@ -2,9 +2,9 @@ SYSTEMS = x86-l4v2 ARCH = x86 SYSTEM = x86-l4v2 -DDEKITLIBDIR = /root/hurd/libddekit/ -DDEKITINCDIR = /root/hurd/libddekit/include -DDE26LIBDIR = /root/hurd/libdde_linux26/lib/src -OBJ_BASE = /root/hurd/libdde_linux26/build +DDEKITLIBDIR = $(PKGDIR)/../libddekit/ +DDEKITINCDIR = $(PKGDIR)/../libddekit/include +DDE26LIBDIR = $(PKGDIR)/lib/src +OBJ_BASE = $(PKGDIR)/build L4LIBDIR = . diff --git a/dde_ne2k_pci/Makeconf.local b/dde_ne2k_pci/Makeconf.local index d6594dc7..3d03134b 100644 --- a/dde_ne2k_pci/Makeconf.local +++ b/dde_ne2k_pci/Makeconf.local @@ -2,9 +2,9 @@ SYSTEMS = x86-l4v2 ARCH = x86 SYSTEM = x86-l4v2 -DDEKITLIBDIR = /root/hurd/libddekit/ -DDEKITINCDIR = /root/hurd/libddekit/include -DDE26LIBDIR = /root/hurd/libdde_linux26/lib/src -OBJ_BASE = /root/hurd/libdde_linux26/build +DDEKITLIBDIR = $(PKGDIR)/../libddekit/ +DDEKITINCDIR = $(PKGDIR)/../libddekit/include +DDE26LIBDIR = $(PKGDIR)/lib/src +OBJ_BASE = $(PKGDIR)/build L4LIBDIR = . diff --git a/dde_pcnet32/Makeconf.local b/dde_pcnet32/Makeconf.local index d6594dc7..3d03134b 100644 --- a/dde_pcnet32/Makeconf.local +++ b/dde_pcnet32/Makeconf.local @@ -2,9 +2,9 @@ SYSTEMS = x86-l4v2 ARCH = x86 SYSTEM = x86-l4v2 -DDEKITLIBDIR = /root/hurd/libddekit/ -DDEKITINCDIR = /root/hurd/libddekit/include -DDE26LIBDIR = /root/hurd/libdde_linux26/lib/src -OBJ_BASE = /root/hurd/libdde_linux26/build +DDEKITLIBDIR = $(PKGDIR)/../libddekit/ +DDEKITINCDIR = $(PKGDIR)/../libddekit/include +DDE26LIBDIR = $(PKGDIR)/lib/src +OBJ_BASE = $(PKGDIR)/build L4LIBDIR = . diff --git a/dde_pcnet32_test/Makeconf.local b/dde_pcnet32_test/Makeconf.local index d6594dc7..3d03134b 100644 --- a/dde_pcnet32_test/Makeconf.local +++ b/dde_pcnet32_test/Makeconf.local @@ -2,9 +2,9 @@ SYSTEMS = x86-l4v2 ARCH = x86 SYSTEM = x86-l4v2 -DDEKITLIBDIR = /root/hurd/libddekit/ -DDEKITINCDIR = /root/hurd/libddekit/include -DDE26LIBDIR = /root/hurd/libdde_linux26/lib/src -OBJ_BASE = /root/hurd/libdde_linux26/build +DDEKITLIBDIR = $(PKGDIR)/../libddekit/ +DDEKITINCDIR = $(PKGDIR)/../libddekit/include +DDE26LIBDIR = $(PKGDIR)/lib/src +OBJ_BASE = $(PKGDIR)/build L4LIBDIR = . diff --git a/dde_rtl8139/Makeconf.local b/dde_rtl8139/Makeconf.local index d6594dc7..3d03134b 100644 --- a/dde_rtl8139/Makeconf.local +++ b/dde_rtl8139/Makeconf.local @@ -2,9 +2,9 @@ SYSTEMS = x86-l4v2 ARCH = x86 SYSTEM = x86-l4v2 -DDEKITLIBDIR = /root/hurd/libddekit/ -DDEKITINCDIR = /root/hurd/libddekit/include -DDE26LIBDIR = /root/hurd/libdde_linux26/lib/src -OBJ_BASE = /root/hurd/libdde_linux26/build +DDEKITLIBDIR = $(PKGDIR)/../libddekit/ +DDEKITINCDIR = $(PKGDIR)/../libddekit/include +DDE26LIBDIR = $(PKGDIR)/lib/src +OBJ_BASE = $(PKGDIR)/build L4LIBDIR = . diff --git a/libdde_linux26/Makeconf b/libdde_linux26/Makeconf index d5dc9c2a..4ee54c66 100644 --- a/libdde_linux26/Makeconf +++ b/libdde_linux26/Makeconf @@ -39,7 +39,7 @@ ifeq ($(ARCH), x86) MY_DDE_INCDIR += $(OBJ_BASE)/include/linux-headers/asm/mach-default endif -PRIVATE_INCDIR += $(MY_DDE_INCDIR) $(MY_LINUX26_INCDIR) /root/hurd/libddekit/include +PRIVATE_INCDIR += $(MY_DDE_INCDIR) $(MY_LINUX26_INCDIR) $(PKGDIR)/../libddekit/include DEFINES += -D__KERNEL__ -DDDE_LINUX $(KBUILD_DEFINES) CPPFLAGS += $(KBUILD_CPPFLAGS) diff --git a/libdde_linux26/Makeconf.local b/libdde_linux26/Makeconf.local index aa6207c3..589c1824 100644 --- a/libdde_linux26/Makeconf.local +++ b/libdde_linux26/Makeconf.local @@ -8,4 +8,4 @@ SYSTEMS = x86-l4v2 ARCH = x86 SYSTEM = x86-l4v2 -OBJ_BASE = /root/hurd/libdde_linux26/build +OBJ_BASE = $(PKGDIR)/build diff --git a/libdde_linux26/mk/Makeconf b/libdde_linux26/mk/Makeconf index 4f377875..fa6474ae 100644 --- a/libdde_linux26/mk/Makeconf +++ b/libdde_linux26/mk/Makeconf @@ -233,7 +233,7 @@ VPATH_SRC_BASE ?= $(SRC_DIR) MAKECONFLOCAL ?= Makeconf.local -include $(MAKECONFLOCAL) -DROPS_STDDIR ?= /root/hurd/libdde_linux26/build +DROPS_STDDIR ?= $(PKGDIR)/build ifeq ($(STATICFILE),) STATICFILE = $(OBJ_BASE)/pkg/STATIC $(L4DIR)/pkg/STATIC endif -- cgit v1.2.3