Rev 261 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
# -*- mode: mak -*-################################################################################ Module name : TOOLSET/gnupro_h8.rul# Module type : Makefile system# Environment(s): GnuPro H8## Version Who Date Description# DDP 23-Nov-04 Created####################################################################################################################################################.. Remove "undef" warnings#cc_includes +=cc_defines +=cxx_include +=cxx_defines +=as_includes +=as_defines +=################################################################################.. Parse user options# Global options already parsed# These options extend the global options#ifdef OPTIONSifneq "$(findstring wall,$(OPTIONS))" "" # Enable all warningsUSE_WALL = 1endifendif################################################################################.. C Compiler definition## -ms Generate code for the H8S chip.# -c Compile only# -0 Optimize# -ffloat-store Do not store floating point variables in registers# and inhabit other options that might change whether# floating point value is taken from register or# memory.# -g3 The compiler debugging option, followed by the level.# Level 3 included extra information.# -Wall Issue warnings.# -r Elimates the use of built-in implicit rules.# -save-temps Do not delete intermediate files# -mint32 Make int data 32 bits by default.# -malign-300 Align longs and floats on 2 byte boundaries.#cc = $(CC_PRE) gcccc_init =cc_o_switch = -o $@cc_source = $<cc_flags = \$(patsubst %,%,$(CFLAGS)) \$(patsubst %,-D%,$(cc_defines)) \$(patsubst %,%,$(gcc_flags)) \$(patsubst %,-I %,$(INCDIRS)) \$(patsubst %,-I %,$(cc_includes)) \$(patsubst %,-I %,$(gcc_includes))cc_term = ; # ';' forces use of 'sh.exe'gcc_includes += $(H8Dir)/Includegcc_flags = -c -ms -Wall -W -ffloat-store -r -mint32 -malign-300ifdef USE_WALL#gcc_flags += -Wuninitialized # only makes sense with `-O'gcc_flags += -Wwrite-stringsgcc_flags += -Wcast-qualgcc_flags += -Wbad-function-castgcc_flags += -Wpointer-arithgcc_flags += -Wstrict-prototypesgcc_flags += -Wmissing-prototypesgcc_flags += -Wmissing-declarationsgcc_flags += -Wnested-externsgcc_flags += -Wtraditionalgcc_flags += -Wconversiongcc_flags += -Wcommentgcc_flags += -Wcast-align#gcc_flags += -Winlinegcc_flags += -Wshadowgcc_flags += -Wredundant-declsgcc_flags += -Wid-clash-31endififdef FORCE_C_COMPILEgcc_flags += -x cendififdef FORCE_CC_COMPILEgcc_flags += -x c++endififdef LEAVETMPgcc_flags += -save-tempsendififdef USE_STRICT_ANSIgcc_flags += -ansiendififdef USE_OPTIMISEgcc_flags += -O3elsegcc_flags +=endififdef USE_DEBUGINFOgcc_flags += -g3 -DDEBUGelsegcc_flags += -DNDEBUGendififeq "$(DEBUG)" "1"gcc_flags +=elsegcc_flags +=endififdef ALVLgcc_flags += -DALVL=$(ALVL)endififdef DLVLgcc_flags += -DDLVL=$(DLVL)endifgcc_flags += -D__SOURCE__=\"$(notdir $<)\"ifdef LEAVETMPgcc_flags += -save-tempsendifdefine cc_pre@echo [\$<] compiling..endefdefine cc_postendef################################################################################.. C/C++ dependencies## -M Generate make dependencies# -MM As -M, but ignore system header files# -MG Treat missing header files as generated#ifeq "$(DEBUG)" "1"gcc_depend += -DDEBUGendififdef ALVLgcc_depend += -DALVL=$(ALVL)endififdef DLVLgcc_depend += -DDLVL=$(DLVL)endif################################################################################.. C/C++ dependencies# depend and depend.err#ccdep = $(XX_PRE) $(GBE_BIN)/mkdependccdep_o_switch = -f -ccdep_init =#ccdep_source = $(filter %.c %.cc %.cpp, $+) > $(subst /,/,$@).tmp 2> $@.errccdep_source = $(filter %.c %.cc %.cpp, $+) > $@ 2> $@.errccdep_flags = -MM -b -p '$$(OBJDIR)/' -o ".$(o)" \$(patsubst %,%,$(CFLAGS)) \$(patsubst %,-D%,$(cc_defines)) \$(patsubst %,%,$(gcc_depend)) \$(patsubst %,-I %,$(INCDIRS)) \$(patsubst %,-I %,$(cc_includes)) \$(patsubst %,-Y %,$(gcc_includes))ccdep_pre =ccdep_post =################################################################################.. C++ Compiler definition#cxx = $(CC_PRE) gcccxx_init =cxx_switch = -o $@cxx_source = $<cxx_flags = \$(patsubst %,%,$(CXXFLAGS)) \$(patsubst %,-d%,$(cxx_defines)) \$(patsubst %,%,$(gcc_flags)) \$(patsubst %,-I %,$(INCDIRS)) \$(patsubst %,-I %,$(cxx_includes)) \$(patsubst %,-I %,$(gcc_includes))cxx_term = ; # ';' forces use of 'sh.exe'define cxx_pre@echo [\$<] compiling..endefdefine cxx_postendef################################################################################.. Archiver#ar = $(XX_PRE) $(H8Dir)/bin/arar_o_switch =ar_flags = -scvr $@ $(patsubst %,%,$^)define ar_pre@$(echo) [\$@] Creating library archive..endefar_post =################################################################################.. Archive Merge#arnull = arnull.txtarmerge = $(XX_PRE) $(GBE_TOOLS)/armergearmerge_init =armerge_flags = -d $(OBJDIR)/merge -t unix -a ar -n $(arnull)armerge_o_switch= $@ $^define armerge_pre@$(echo) [\$@] Merging library archive..$(XX_PRE) rm -f $@ $(arnull)endefifndef LEAVETMPdefine armerge_post@-$(rm) -rf $(arnull) $(OBJDIR)/mergeendefelsedefine armerge_postendefendif################################################################################.. Assembler definition# Although the assembler is not currently supported the following# definition is required by the make system#as_init =#