Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Application Makefile.app

By: a guest on Dec 14th, 2010  |  syntax: Make  |  size: 2.92 KB  |  views: 122  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #
  2. #
  3. #
  4. #               Modifying TI's IUNIVERSAL examples Makefile.app to create
  5. #
  6. #                            custom applications
  7. #
  8. #
  9. #
  10. #                               dispTEC 2010
  11. #
  12. #                       http://disptec.sourceforge.net
  13. #
  14. #
  15.  
  16.  
  17. # Where to output configuration files
  18. XDC_CFG                 = cfg/$(TARGET)
  19.  
  20. # Executable names
  21. XDC_EXEC                = $(TARGET)_$(APP_NAME).x$(APP_EXT)
  22.  
  23. # Map files
  24. MAP                     = $(XDC_EXEC).map
  25.  
  26. # Output compiler options
  27. XDC_CFLAGS              = $(XDC_CFG)/compiler.opt
  28.  
  29. # Output linker file
  30. XDC_LFILE               = $(XDC_CFG)/linker.cmd
  31.  
  32. # Input configuration files
  33. XDC_CFGFILE             = $(TARGET).cfg
  34.  
  35. # The XDC configuration tool command line
  36. CONFIGURO               = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro
  37.  
  38. GNU_C_FLAGS             = $(C_FLAGS) -Wall -g
  39. C64P_C_FLAGS            = $(C_FLAGS) -g
  40.  
  41. #Append here your include paths. i.e.: -I/home/mgruner/OMAPL138SDK835802/fs/fsdev/usr/include
  42. GNU_CPP_FLAGS           = $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/include $(shell cat $(PACKAGE_DIR)/include)
  43.  
  44. C64P_CPP_FLAGS          = $(CPP_FLAGS) -pdse225 -I$(TI6X_CGTOOL_DIR)/include -mv6400+
  45.  
  46. #Append here your link paths and your library names. i.e.: -lasound -L/home/mgruner/OMAPL138SDK835802/fs/fsdev/usr/lib
  47. GNU_LD_FLAGS            = $(LD_FLAGS) -lpthread -lm $(shell cat $(PACKAGE_DIR)/linker)
  48.  
  49. C64P_LD_FLAGS           = $(LD_FLAGS) -z -w -x -c -i$(RTDX_INSTALL_DIR)/packages/ti/rtdx/iom/lib/debug -i$(RTDX_INSTALL_DIR)/packages/ti/rtdx/cio/lib/release -i$(RTDX_INSTALL_DIR)/packages/ti/rtdx/lib/c6000
  50.  
  51. SOURCES                 = $(wildcard *.c)
  52. LINUX_SOURCES           = $(SOURCES) $(wildcard linux/*.c)
  53. BIOS_SOURCES            = $(SOURCES) $(wildcard bios/*.c)
  54. HEADERS                 = $(wildcard *.h)
  55.  
  56. LINUX_OBJFILES = $(LINUX_SOURCES:%.c=%.$(PLATFORM_SHORT).o$(APP_EXT))
  57.  
  58.  
  59. ARM_COMPILE.c = $(PRE) $(CROSS_COMPILE)gcc $(GNU_C_FLAGS) $(GNU_CPP_FLAGS) -c
  60. ARM_LINK.c = $(PRE) $(CROSS_COMPILE)gcc $(GNU_LD_FLAGS)
  61. C64P_COMPILE.c = $(PRE) $(CODEGEN_INSTALL_DIR)/bin/cl6x $(C64P_C_FLAGS) $(C64P_CPP_FLAGS) -c
  62. C64P_LINK.c = $(PRE) $(CODEGEN_INSTALL_DIR)/bin/cl6x $(C64P_LD_FLAGS)
  63.  
  64. all: $(if $(wildcard $(XDC_CFGFILE)), $(XDC_EXEC))
  65.  
  66. $(XDC_EXEC): $(LINUX_OBJFILES) $(XDC_LFILE) $(AL_LIBS)
  67.         @echo Linking $@ from $^..
  68.         $(ARM_LINK.c) -Wl,-Map,$(MAP)  -o $@ $^
  69.  
  70. $(LINUX_OBJFILES): %.$(PLATFORM_SHORT).o$(APP_EXT): %.c $(HEADERS) $(XDC_CFLAGS)
  71.         @echo Compiling $@ from $<..
  72.         $(ARM_COMPILE.c) $(shell cat $(XDC_CFLAGS)) $(GNU_CPP_FLAGS) -o $@ $<
  73.  
  74. $(XDC_LFILE) $(XDC_CFLAGS): $(XDC_CFGFILE)
  75.         @echo
  76.         @echo ======= Building $(TARGET) =======
  77.         @echo Configuring application using $<
  78.         @echo
  79.         $(PRE) XDCPATH="$(XDCPATH)" $(CONFIGURO) -o $(XDC_CFG) -t $(XDC_ARM_TARGET) -p $(XDC_PLATFORM) -b $(PACKAGE_DIR)/config.bld $(XDC_CFGFILE)
  80.  
  81. clean:
  82.         @echo Removing generated files...
  83.         -$(RM) -rf cfg $(LINUX_OBJFILES) $(XDC_EXEC) $(MAP) *~ *.d .dep
clone this paste RAW Paste Data