Rev 241 | Blame | Compare with Previous | Last modification | View Log | RSS feed
# -*- mode: mak -*-################################################################################ File: TOOLSET/cygnus_thyron.rul[e]# Contents: Cygnus Thyron rules## Revision History:# 17/10/02 APY Created from gcc toolset###################################################################################################################################################.. Remove "undef" warnings#cc_includes +=cc_defines +=cxx_include +=cxx_defines +=as_includes +=as_defines +=################################################################################.. C Compiler definition## -mh Generate code for the H8/300H 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#cc = gcccc_init =cc_o_switch = -o $@cc_source = $<cc_cmdfile = $(basename $@).cmdcc_flags = @$(cc_cmdfile)cc_term =gcc_includes += $(MPTLIB)/Lib/ # Include/xxx.h, must be prior to cygnusgcc_includes += $(MPTLIB)/StdCLib/Includegcc_flags = -mh -c -Wall -ffloat-store -rifeq "$(DEBUG)" "1"gcc_flags += -g3 -O -DDEBUGelsegcc_flags += -Oendififdef ALVLgcc_flags += -DALVL=$(ALVL)endififdef DLVLgcc_flags += -DDLVL=$(DLVL)endifgcc_flags += -D__SOURCE__=\"$(notdir $<)\"ifdef LEAVETMPgcc_flags += -save-tempsendifdefine cc_pre@echo '[$<] compiling..' ; \$(cmdfile) -ko$(cc_cmdfile) "\$(patsubst %,%,$(CFLAGS)) \$(patsubst %,-D%,$(cc_defines)) \$(patsubst %,%,$(gcc_flags)) \$(patsubst %,-I %,$(INCDIRS)) \$(patsubst %,-I %,$(cc_includes)) \$(patsubst %,-I %,$(gcc_includes))";endefdefine cc_post@$(rm) -f $(cc_cmdfile)endef################################################################################.. C/C++ dependencies# depend and depend.err## -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#ccdep = gcc -MGccdep = $(GBE_BIN)/mkdependccdep_o_switch = -f -ccdep_init =ccdep_source = $(filter %.c %.cc %.cpp, $+) > $(subst /,/,$@).tmp 2> $@.errccdep_flags = -MM \$(patsubst %,%,$(CFLAGS)) \$(patsubst %,-D%,$(cc_defines)) \$(patsubst %,%,$(gcc_depend)) \$(patsubst %,-I %,$(INCDIRS)) \$(patsubst %,-I %,$(cc_includes)) \$(patsubst %,-Y %,$(gcc_includes))ccdep_pre =ifndef LEAVETMPdefine ccdep_post-sed s/\^/\$$\(OBJDIR\)\\// $(subst /,/,$@).tmp | \grep \\.${o} > $(subst /,/,$@)@rm $(subst /,/,$@).tmpendefelsedefine ccdep_post-sed s/\^/\$$\(OBJDIR\)\\// $(subst /,/,$@).tmp | \grep \\.${o} > $(subst /,/,$@)endefendif################################################################################.. C++ Compiler definition#cxx = 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################################################################################.. Assembler definition#as = @asas_init =as_i_switch = -I$(space)as_o_switch =as_object = # BROKENas_source = $<as_cmdfile = $(basename $@).cmdas_flags = $(as_object) @$(as_cmdfile)as_term = ; # ';' forces use of 'sh.exe'as_flags = -Wallifeq "$(DEBUG)" "1"as_flags += -gas_defines += DEBUG=1endififdef DLVLas_defines += DLVL=$(DLVL)endififdef ALVLas_defines += ALVL=$(ALVL)endifas_defines += $(as_flags)define as_pre@$(cmdfile) -ko$(as_cmdfile) "\$(patsubst %,%\\n,$(ASFLAGS))\$(patsubst %,--defsym %\\n,$(as_defines))\$(patsubst %,$(as_i_switch)%\\n,$(INCDIRS))\$(patsubst %,$(as_i_switch)%\\n,$(as_includes))"endefifndef LEAVETMPdefine as_post@rm -f $@; mv a.out $@@$(rm) -f $(as_cmdfile)endefelsedefine as_post@rm -f $@; mv a.out $@endefendif################################################################################.. Archiver#ar = @arar_cmdfile = $(basename $@).arar_flags = -cvrar_o_switch = $@ @$(ar_cmdfile)ar_term = ; # ';' forces use of 'sh.exe'define ar_pre@rm -f $@@$(cmdfile) -ko$(ar_cmdfile) \$(patsubst %,%\\n,$^)endefifndef LEAVETMPdefine ar_post@$(rm) -f $(ar_cmdfile)endefelsedefine ar_postendefendif################################################################################.. Linker#ld = @ldld_init =ld_cmdfile = $(basename $@).ldld_o_switch = @$(ld_cmdfile)ld_term = ; # ';' forces use of 'sh.exe'ld_flags =define LDDEPEND@export GCC_LIB; \GCC_LIB="$(subst $(space),;,$(LIBDIRS))"; \$(cmdfile) -o$(BINDIR)/$(notdir $(basename $@)).dep "$($(notdir $(basename $@))_dp)"endef#define ld_pre@export GCC_LIB; \GCC_LIB="$(subst $(space),;,$(LIBDIRS))"; \$(cmdfile) -o$(ld_cmdfile) "$($(notdir $(basename $@))_ld)"; \echo '[$@] Linking image ..'endefifndef LEAVETMPdefine ld_post@$(rm) -f $(ld_cmdfile)endefelsedefine ld_postendefendifdefine LDBIN@$(show_environment)$(ld_pre)$(ld) $(ld_flags) $(ld_o_switch) $(ld_term)$(ld_post)endef#