Skip to content
Snippets Groups Projects
Makefile 40.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    
    assabet_config	:	unconfig
    	@./mkconfig $(@:_config=) arm sa1100 assabet
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    dnp1110_config	:	unconfig
    	@./mkconfig $(@:_config=) arm sa1100 dnp1110
    
    
    gcplus_config	:	unconfig
    	@./mkconfig $(@:_config=) arm sa1100 gcplus
    
    lart_config	:	unconfig
    	@./mkconfig $(@:_config=) arm sa1100 lart
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    shannon_config	:	unconfig
    	@./mkconfig $(@:_config=) arm sa1100 shannon
    
    #########################################################################
    
    ## ARM92xT Systems
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #########################################################################
    
    
    xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1))))
    
    xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1))))
    
    xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1)))
    
    
    SX1_config :		unconfig
    	@./mkconfig $(@:_config=) arm arm925t sx1
    
    
    integratorcp_config :	unconfig
    	@./mkconfig $(@:_config=) arm arm926ejs integratorcp
    
    integratorap_config :	unconfig
    	@./mkconfig $(@:_config=) arm arm926ejs integratorap
    
    versatile_config :	unconfig
    	@./mkconfig $(@:_config=) arm arm926ejs versatile
    
    
    omap1510inn_config :	unconfig
    	@./mkconfig $(@:_config=) arm arm925t omap1510inn
    
    
    omap5912osk_config :	unconfig
    	@./mkconfig $(@:_config=) arm arm926ejs omap5912osk
    
    
    omap1610inn_config \
    omap1610inn_cs0boot_config \
    omap1610inn_cs3boot_config \
    
    omap1610inn_cs_autoboot_config \
    
    omap1610h2_config \
    omap1610h2_cs0boot_config \
    
    omap1610h2_cs3boot_config \
    omap1610h2_cs_autoboot_config:	unconfig
    
    	@if [ "$(findstring _cs0boot_, $@)" ] ; then \
    		echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    		echo "... configured for CS0 boot"; \
    
    	elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \
    		echo "#define CONFIG_CS_AUTOBOOT" >> ./include/config.h ; \
    		echo "... configured for CS_AUTO boot"; \
    
    	else \
    		echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    		echo "... configured for CS3 boot"; \
    
    	fi;
    	@./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn
    
    omap730p2_config \
    omap730p2_cs0boot_config \
    omap730p2_cs3boot_config :	unconfig
    	@if [ "$(findstring _cs0boot_, $@)" ] ; then \
    		echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \
    		echo "... configured for CS0 boot"; \
    	else \
    		echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \
    		echo "... configured for CS3 boot"; \
    	fi;
    	@./mkconfig -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    smdk2400_config	:	unconfig
    	@./mkconfig $(@:_config=) arm arm920t smdk2400
    
    smdk2410_config	:	unconfig
    	@./mkconfig $(@:_config=) arm arm920t smdk2410
    
    
    # TRAB default configuration:	8 MB Flash, 32 MB RAM
    
    trab_bigram_config \
    trab_bigflash_config \
    
    	@ >include/config.h
    
    	@[ -z "$(findstring _bigram,$@)" ] || \
    
    		{ echo "#define CONFIG_FLASH_8MB"  >>include/config.h ; \
    		  echo "#define CONFIG_RAM_32MB"   >>include/config.h ; \
    
    		  echo "... with 8 MB Flash, 32 MB RAM" ; \
    		}
    	@[ -z "$(findstring _bigflash,$@)" ] || \
    
    		{ echo "#define CONFIG_FLASH_16MB" >>include/config.h ; \
    		  echo "#define CONFIG_RAM_16MB"   >>include/config.h ; \
    
    		  echo "... with 16 MB Flash, 16 MB RAM" ; \
    
    		  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
    
    	@[ -z "$(findstring _old,$@)" ] || \
    
    		{ echo "#define CONFIG_FLASH_8MB"  >>include/config.h ; \
    		  echo "#define CONFIG_RAM_16MB"   >>include/config.h ; \
    		  echo "... with 8 MB Flash, 16 MB RAM" ; \
    
    		  echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
    
    		}
    	@./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    
    VCMA9_config	:	unconfig
    	@./mkconfig $(@:_config=) arm arm920t vcma9 mpl
    
    
    lpd7a400_config:	unconfig
    	@./mkconfig $(@:_config=) arm lh7a40x lpd7a40x
    
    
    #########################################################################
    ## S3C44B0 Systems
    #########################################################################
    
    B2_config	:	unconfig
    	@./mkconfig $(@:_config=) arm s3c44b0 B2 dave
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #########################################################################
    ## ARM720T Systems
    #########################################################################
    
    impa7_config	:	unconfig
    	@./mkconfig $(@:_config=) arm arm720t impa7
    
    ep7312_config	:	unconfig
    	@./mkconfig $(@:_config=) arm arm720t ep7312
    
    
    modnet50_config :	unconfig
    	@./mkconfig $(@:_config=) arm arm720t modnet50
    
    
    #########################################################################
    ## AT91RM9200 Systems
    #########################################################################
    
    at91rm9200dk_config	:	unconfig
    	@./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
    
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #########################################################################
    
    ## XScale Systems
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #########################################################################
    
    cradle_config	:	unconfig
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	@./mkconfig $(@:_config=) arm pxa cradle
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    csb226_config	:	unconfig
    
    	@./mkconfig $(@:_config=) arm pxa csb226
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    
    innokom_config	:	unconfig
    
    	@./mkconfig $(@:_config=) arm pxa innokom
    
    ixdp425_config	:	unconfig
    	@./mkconfig $(@:_config=) arm ixp ixdp425
    
    
    lubbock_config	:	unconfig
    
    	@./mkconfig $(@:_config=) arm pxa lubbock
    
    logodl_config	:	unconfig
    	@./mkconfig $(@:_config=) arm pxa logodl
    
    
    wepep250_config	:	unconfig
    
    	@./mkconfig $(@:_config=) arm pxa wepep250
    
    xm250_config	:	unconfig
    	@./mkconfig $(@:_config=) arm pxa xm250
    
    
    xsengine_config :	unconfig
    	@./mkconfig $(@:_config=) arm pxa xsengine
    
    
    #========================================================================
    # i386
    #========================================================================
    #########################################################################
    
    ## AMD SC520 CDP
    
    #########################################################################
    sc520_cdp_config	:	unconfig
    	@./mkconfig $(@:_config=) i386 i386 sc520_cdp
    
    
    sc520_spunk_config	:	unconfig
    	@./mkconfig $(@:_config=) i386 i386 sc520_spunk
    
    sc520_spunk_rel_config	:	unconfig
    	@./mkconfig $(@:_config=) i386 i386 sc520_spunk
    
    
    #========================================================================
    # MIPS
    #========================================================================
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    #########################################################################
    
    ## MIPS32 4Kc
    #########################################################################
    
    
    xtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
    
    incaip_100MHz_config	\
    incaip_133MHz_config	\
    incaip_150MHz_config	\
    incaip_config: unconfig
    	@ >include/config.h
    	@[ -z "$(findstring _100MHz,$@)" ] || \
    		{ echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \
    		  echo "... with 100MHz system clock" ; \
    		}
    	@[ -z "$(findstring _133MHz,$@)" ] || \
    		{ echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \
    		  echo "... with 133MHz system clock" ; \
    		}
    	@[ -z "$(findstring _150MHz,$@)" ] || \
    		{ echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \
    		  echo "... with 150MHz system clock" ; \
    		}
    	@./mkconfig -a $(call xtract_incaip,$@) mips mips incaip
    
    
    tb0229_config: unconfig
    	@./mkconfig $(@:_config=) mips mips tb0229
    
    
    #########################################################################
    ## MIPS32 AU1X00
    #########################################################################
    dbau1000_config		: 	unconfig
    	@ >include/config.h
    	@echo "#define CONFIG_DBAU1000 1" >>include/config.h
    	@./mkconfig -a dbau1x00 mips mips dbau1x00
    
    dbau1100_config		: 	unconfig
    	@ >include/config.h
    	@echo "#define CONFIG_DBAU1100 1" >>include/config.h
    	@./mkconfig -a dbau1x00 mips mips dbau1x00
    
    dbau1500_config		: 	unconfig
    	@ >include/config.h
    	@echo "#define CONFIG_DBAU1500 1" >>include/config.h
    	@./mkconfig -a dbau1x00 mips mips dbau1x00
    
    
    #########################################################################
    ## MIPS64 5Kc
    #########################################################################
    
    purple_config :		unconfig
    	@./mkconfig $(@:_config=) mips mips purple
    
    #========================================================================
    # Nios
    #========================================================================
    #########################################################################
    ## Nios32
    #########################################################################
    
    
    DK1C20_safe_32_config		\
    DK1C20_standard_32_config	\
    
    DK1C20_config:	unconfig
    
    	@ >include/config.h
    	@[ -z "$(findstring _safe_32,$@)" ] || \
    		{ echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
    		  echo "... NIOS 'safe_32' configuration" ; \
    		}
    	@[ -z "$(findstring _standard_32,$@)" ] || \
    		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
    		  echo "... NIOS 'standard_32' configuration" ; \
    		}
    	@[ -z "$(findstring DK1C20_config,$@)" ] || \
    		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
    		  echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
    		}
    	@./mkconfig -a DK1C20 nios nios dk1c20 altera
    
    DK1S10_safe_32_config		\
    DK1S10_standard_32_config	\
    
    DK1S10_mtx_ldk_20_config	\
    
    DK1S10_config:	unconfig
    	@ >include/config.h
    	@[ -z "$(findstring _safe_32,$@)" ] || \
    		{ echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \
    		  echo "... NIOS 'safe_32' configuration" ; \
    		}
    	@[ -z "$(findstring _standard_32,$@)" ] || \
    		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
    		  echo "... NIOS 'standard_32' configuration" ; \
    		}
    
    	@[ -z "$(findstring _mtx_ldk_20,$@)" ] || \
    		{ echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>include/config.h ; \
    		  echo "... NIOS 'mtx_ldk_20' configuration" ; \
    		}
    
    	@[ -z "$(findstring DK1S10_config,$@)" ] || \
    		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
    		  echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \
    		}
    	@./mkconfig -a DK1S10 nios nios dk1s10 altera
    
    ADNPESC1_DNPEVA2_base_32_config	\
    ADNPESC1_base_32_config		\
    ADNPESC1_config: unconfig
    	@ >include/config.h
    	@[ -z "$(findstring _DNPEVA2,$@)" ] || \
    
    		{ echo "#define CONFIG_DNPEVA2 1" >>include/config.h ; \
    		  echo "... DNP/EVA2 configuration" ; \
    		}
    
    	@[ -z "$(findstring _base_32,$@)" ] || \
    
    		{ echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
    		  echo "... NIOS 'base_32' configuration" ; \
    		}
    
    	@[ -z "$(findstring ADNPESC1_config,$@)" ] || \
    
    		{ echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \
    		  echo "... NIOS 'base_32' configuration (DEFAULT)" ; \
    		}
    
    	@./mkconfig -a ADNPESC1 nios nios adnpesc1 ssv
    
    
    #========================================================================
    # MicroBlaze
    #========================================================================
    #########################################################################
    ## Microblaze
    #########################################################################
    suzaku_config:	unconfig
    	@ >include/config.h
    	@echo "#define CONFIG_SUZAKU 1" >> include/config.h
    	@./mkconfig -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
    
    
    #########################################################################
    #########################################################################
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    clean:
    	find . -type f \
    		\( -name 'core' -o -name '*.bak' -o -name '*~' \
    		-o -name '*.o'  -o -name '*.a'  \) -print \
    		| xargs rm -f
    
    	rm -f examples/hello_world examples/timer \
    
    	      examples/eepro100_eeprom examples/sched \
    
    	      examples/mem_to_mem_idma2intr examples/82559_eeprom
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
    
    	rm -f tools/mpc86x_clk
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    	rm -f tools/easylogo/easylogo tools/bmp_logo
    	rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
    
    	rm -f tools/env/fw_printenv tools/env/fw_setenv
    
    	rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image
    
    	rm -f board/trab/trab_fkt
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    clobber:	clean
    	find . -type f \
    		\( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
    		-print \
    		| xargs rm -f
    	rm -f $(OBJS) *.bak tags TAGS
    	rm -fr *.*~
    
    	rm -f u-boot u-boot.map $(ALL)
    
    	rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
    
    	rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
    
    	rm -f include/asm/proc include/asm/arch include/asm
    
    Wolfgang Denk's avatar
    Wolfgang Denk committed
    
    mrproper \
    distclean:	clobber unconfig
    
    backup:
    	F=`basename $(TOPDIR)` ; cd .. ; \
    	gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
    
    #########################################################################