Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Unbenannt
Monday, August 27th, 2007 at 7:28:12pm UTC 

  1. #             __________               __   ___.
  2. #   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
  3. #   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
  4. #   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
  5. #   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
  6. #                     \/            \/     \/    \/            \/
  7. # $$Id: $$
  8. #
  9.  
  10. INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
  11.  -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) \
  12.  -I$(BUILDDIR)/pluginbitmaps
  13. CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \
  14.  -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
  15.  
  16. ifdef APPEXTRA
  17.    INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
  18. endif
  19.  
  20. LINKFILE := $(OBJDIR)/link.lds
  21. DEPFILE = $(OBJDIR)/dep-shortcuts
  22.  
  23. # This sets up 'SRC' based on the files mentioned in SOURCES
  24. include $(TOOLSDIR)/makesrc.inc
  25.  
  26. SOURCES = $(SRC)
  27. OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
  28. DIRS = .
  29.  
  30. ifndef SIMVER
  31.     LDS := ../plugin.lds
  32. endif
  33. OUTPUT = $(OUTDIR)/shortcuts_view.rock $(OUTDIR)/shortcuts_append.rock
  34.  
  35. all: $(OUTPUT)
  36.  
  37. ifndef SIMVER
  38. $(OBJDIR)/shortcuts.elf: $(OBJS) $(LINKFILE) $(BITMAPLIBS)
  39.         $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -O -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -lplugin -lgcc \
  40.            $(LINKBITMAPS) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/shortcuts.map
  41.  
  42. $(OUTPUT): $(OBJDIR)/shortcuts.elf
  43.         $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
  44. else
  45.  
  46. ifeq ($(SIMVER), x11)
  47. ###################################################
  48. # This is the X11 simulator version
  49.  
  50. $(OUTPUT): $(OBJS)
  51.         $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
  52. ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
  53. # 'x' must be kept or you'll have "Win32 error 5"
  54. #     $ fgrep 5 /usr/include/w32api/winerror.h | head -1
  55. #         #define ERROR_ACCESS_DENIED 5L
  56. else
  57.         @chmod -x $@
  58. endif
  59.  
  60. else # end of x11-simulator
  61. ifeq ($(SIMVER), sdl)
  62. ###################################################
  63. # This is the SDL simulator version
  64.  
  65. $(OUTPUT): $(OBJS)
  66.         $(call PRINTS,LD $(@F))$(CC) $(CFLAGS) $(SHARED_FLAG) $(OBJS) -L$(BUILDDIR) -lplugin $(LINKBITMAPS) -o $@
  67. ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
  68. # 'x' must be kept or you'll have "Win32 error 5"
  69. #     $ fgrep 5 /usr/include/w32api/winerror.h | head -1
  70. #         #define ERROR_ACCESS_DENIED 5L
  71. else
  72.         @chmod -x $@
  73. endif
  74.  
  75. else # end of sdl-simulator
  76. ###################################################
  77. # This is the win32 simulator version
  78. DLLTOOLFLAGS = --export-all
  79. DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin
  80.  
  81. $(OUTPUT): $(OBJS)
  82.         $(call PRINTS,DLL $(@F))$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $(OBJS)
  83.         $(SILENT)$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $(OBJS) \
  84.                 $(BUILDDIR)/libplugin.a $(BITMAPLIBS) -o $@
  85. ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
  86. # 'x' must be kept or you'll have "Win32 error 5"
  87. #     $ fgrep 5 /usr/include/w32api/winerror.h | head -1
  88. #         #define ERROR_ACCESS_DENIED 5L
  89. else
  90.         @chmod -x $@
  91. endif
  92. endif # end of win32-simulator
  93. endif
  94. endif # end of simulator section
  95.  
  96.  
  97. include $(TOOLSDIR)/make.inc
  98.  
  99. # MEMORYSIZE should be passed on to this makefile with the chosen memory size
  100. # given in number of MB
  101. $(LINKFILE): $(LDS)
  102.         $(call PRINTS,build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) \
  103.         $(DEFINES) -E -P - >$@
  104.  
  105. clean:
  106.         $(call PRINTS,cleaning shortcuts)rm -rf $(OBJDIR)/shortcuts
  107.         $(SILENT)rm -f $(OBJDIR)/shortcuts* $(DEPFILE)
  108.  
  109. -include $(DEPFILE)

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right