Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ############################################################################
  2. # apps/examples/romfs/Makefile
  3. #
  4. # Licensed to the Apache Software Foundation (ASF) under one or more
  5. # contributor license agreements. See the NOTICE file distributed with
  6. # this work for additional information regarding copyright ownership. The
  7. # ASF licenses this file to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance with the
  9. # License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  15. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  16. # License for the specific language governing permissions and limitations
  17. # under the License.
  18. #
  19. ############################################################################
  20. include $(APPDIR)/Make.defs
  21. # ROMFS built-in application info
  22. PROGNAME = romfs
  23. PRIORITY = SCHED_PRIORITY_DEFAULT
  24. STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
  25. MODULE = $(CONFIG_EXAMPLES_ROMFS)
  26. # ROMFS File System Example
  27. MAINSRC = romfs_main.c
  28. # Common build
  29. checkgenromfs:
  30. @genromfs -h 1>/dev/null 2>&1 || { \
  31. echo "Host executable genromfs not available in PATH"; \
  32. echo "You may need to download in from http://romfs.sourceforge.net/"; \
  33. exit 1; \
  34. }
  35. testdir : testdir.tar.gz
  36. @tar zxf $< || { echo "tar zxf $< failed" ; exit 1 ; }
  37. testdir.img : checkgenromfs testdir
  38. @genromfs -f $@ -d testdir -V "ROMFS_Test" || { echo "genromfs failed" ; exit 1 ; }
  39. romfs_testdir.h : testdir.img
  40. @xxd -i $< >$@ || { echo "xxd of $< failed" ; exit 1 ; }
  41. context:: romfs_testdir.h
  42. distclean::
  43. $(call DELFILE, testdir.img)
  44. $(call DELFILE, romfs_testdir.h)
  45. $(call DELDIR, testdir)
  46. include $(APPDIR)/Application.mk