gonzui


Format: Advanced Search

t2ex/t2ex_source/config/src_t2ex/Makefile.commonbare sourcepermlink (0.00 seconds)

Search this content:

    1: #
    2: # ----------------------------------------------------------------------
    3: #    T2EX Software Package
    4: #
    5: #    Copyright 2012 by Ken Sakamura.
    6: #    This software is distributed under the latest version of T-License 2.x.
    7: # ----------------------------------------------------------------------
    8: #
    9: #    Released by T-Engine Forum(http://www.t-engine.org/) at 2012/12/12.
   10: #    Modified by T-Engine Forum at 2013/03/04.
   11: #    Modified by TRON Forum(http://www.tron.org/) at 2015/06/04.
   12: #
   13: # ----------------------------------------------------------------------
   14: #
   15: 
   16: #
   17: # This software package is available for use, modification, 
   18: # and redistribution in accordance with the terms of the attached 
   19: # T-License 2.x.
   20: # If you want to redistribute the source code, you need to attach 
   21: # the T-License 2.x document.
   22: # There's no obligation to publish the content, and no obligation 
   23: # to disclose it to the TRON Forum if you have modified the 
   24: # software package.
   25: # You can also distribute the modified source code. In this case, 
   26: # please register the modification to T-Kernel traceability service.
   27: # People can know the history of modifications by the service, 
   28: # and can be sure that the version you have inherited some 
   29: # modification of a particular version or not.
   30: #
   31: #    http://trace.tron.org/tk/?lang=en
   32: #    http://trace.tron.org/tk/?lang=ja
   33: #
   34: # As per the provisions of the T-License 2.x, TRON Forum ensures that 
   35: # the portion of the software that is copyrighted by Ken Sakamura or 
   36: # the TRON Forum does not infringe the copyrights of a third party.
   37: # However, it does not make any warranty other than this.
   38: # DISCLAIMER: TRON Forum and Ken Sakamura shall not be held
   39: # responsible for any consequences or damages caused directly or
   40: # indirectly by the use of this software package.
   41: #
   42: # The source codes in bsd_source.tar.gz in this software package are 
   43: # derived from NetBSD or OpenBSD and not covered under T-License 2.x.
   44: # They need to be changed or redistributed according to the 
   45: # representation of each source header.
   46: #
   47: 
   48: #
   49: #       Makefile (common description)
   50: #
   51: #       RomInfo / SYSCONF / DEVCONF
   52: #
   53: 
   54: # T2EX source file path
   55: S       = ../../src_t2ex/sysdepend/$(TETYPE)_$(MACHINE)
   56: 
   57: # original T-Kernel file path
   58: S_TK2   = ../../src/sysdepend/$(TETYPE)_$(MACHINE)
   59: 
   60: VPATH   += $(S) $(S_TK2)
   61: 
   62: # generate C source from configuration file
   63: define CONV_CONF
   64:         echo '$< -> $@'
   65:         $(PERL) -e '                                           \
   66:                 chop($$source = `basename $<`);                       \
   67:                 print "#include <basic.h>\n";                 \
   68:                 print "EXPORT UB $$source [] = {\n";          \
   69:                 while ( <> ) {                                        \
   70:                         chop;                                        \
   71:                         s/#.*$$//;                           \
   72:                         s/\s{2,}/ /g;                                \
   73:                         s/\s$$//g;                           \
   74:                         print "\t\"$$_\\n\"\n" unless /^$$/; \
   75:                 }                                             \
   76:                 print "};\n";                                 \
   77:         '
   78: endef
   79: 
   80: # ----------------------------------------------------------------------------
   81: 
   82: .PHONY: all clean install
   83: 
   84: ALL = rominfo_t2ex-rom.mot rominfo_t2ex-ram.mot
   85: 
   86: all: $(ALL) install
   87: 
   88: rominfo_t2ex-rom.mot: rominfo-rom 
   89:         $(OBJCOPY) $(OUTPUT_SREC) $< $@
   90: 
   91: rominfo_t2ex-ram.mot: rominfo-ram
   92:         $(OBJCOPY) $(OUTPUT_SREC) $< $@
   93: 
   94: rominfo-rom: rominfo_rom.o sysconf.o devconf.o
   95:         $(LINK.o) -nostdlib -T rominfo$(_GCCVER).lnk $^ $(OUTPUT_OPTION)
   96: 
   97: rominfo-ram: rominfo_ram.o launch.o sysconf.o devconf.o
   98:         $(LINK.o) -nostdlib -T rominfo$(_GCCVER).lnk $^ $(OUTPUT_OPTION)
   99: 
  100: sysconf.c: $(S)/SYSCONF;        @$(CONV_CONF) $< > $@
  101: devconf.c: $(S)/DEVCONF;        @$(CONV_CONF) $< > $@
  102: 
  103: clean:
  104:         $(RM) $(ALL) rominfo-rom rominfo-ram
  105:         $(RM) rominfo_rom.o rominfo_ram.o launch.o
  106:         $(RM) sysconf.[co] devconf.[co] $(DEPS)
  107: 
  108: install: $(addprefix $(EXE_INSTALLDIR)/, $(ALL))
  109: 
  110: # generate dependencies
  111: $(DEPS): ; touch $(DEPS)
  112: -include $(DEPS)