From: John Hodge (sonata) Date: Tue, 13 Nov 2012 06:01:22 +0000 (+0800) Subject: Build - Misc changes for clang building X-Git-Tag: rel0.15~658 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=3e13ccc104148c2bb0f7e9abcfbd5fc2017d8991;p=tpg%2Facess2.git Build - Misc changes for clang building --- diff --git a/BuildConf/host/Makefile.cfg b/BuildConf/host/Makefile.cfg index 057e96e3..d3241b1d 100644 --- a/BuildConf/host/Makefile.cfg +++ b/BuildConf/host/Makefile.cfg @@ -6,6 +6,10 @@ SAVED_CC_ := $(CC) SAVED_LD_ := $(LD) +ifeq ($(HOST_ARCH),) +$(error Please set HOST_ARCH to the architecture to compile, e.g. x86) +endif + include $(ACESSDIR)/BuildConf/$(HOST_ARCH)/Makefile.cfg OBJDUMP := objdump -S diff --git a/BuildConf/x86/Makefile.cfg b/BuildConf/x86/Makefile.cfg index 7d5dcc1a..65777d13 100644 --- a/BuildConf/x86/Makefile.cfg +++ b/BuildConf/x86/Makefile.cfg @@ -3,6 +3,7 @@ # CC = i586-elf-gcc +#CC = clang -m32 LD = i586-elf-ld #CC = gcc #LD = ld diff --git a/Makefile b/Makefile index abf19e59..0d265c47 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,8 @@ AI_USRLIBS := $(addprefix allinstall-,$(USRLIBS)) AI_USRAPPS := $(addprefix allinstall-,$(USRAPPS)) .PHONY: all clean install \ + kmode all-kmode clean-kmode \ + all-user clean-user \ $(ALL_MODULES) all-Kernel $(ALL_USRLIBS) $(ALL_USRAPPS) \ $(AI_MODULES) allinstall-Kernel $(AI_USRLIBS) $(AI_USRAPPS) \ $(CLEAN_MODULES) clean-Kernel $(CLEAN_USRLIBS) $(CLEAN_USRAPPS) \ @@ -44,6 +46,7 @@ AI_USRAPPS := $(addprefix allinstall-,$(USRAPPS)) kmode: $(AI_MODULES) $(AI_DYNMODS) allinstall-Kernel all-kmode: $(ALL_MODULES) $(ALL_DYNMODS) all-Kernel +clean-kmode: $(CLEAN_MODULES) $(CLEAN_DYNMODS) clean-Kernel all-user: $(ALL_USRLIBS) $(ALL_USRAPPS) clean-user: $(CLEAN_USRLIBS) $(CLEAN_USRAPPS)