Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #############################################################
  2. # Required variables for each makefile
  3. # Discard this section from all parent makefiles
  4. # Expected variables (with automatic defaults):
  5. # CSRCS (all "C" files in the dir)
  6. # SUBDIRS (all subdirs with a Makefile)
  7. # GEN_LIBS - list of libs to be generated ()
  8. # GEN_IMAGES - list of images to be generated ()
  9. # COMPONENTS_xxx - a list of libs/objs in the form
  10. # subdir/lib to be extracted and rolled up into
  11. # a generated lib/image xxx.a ()
  12. #
  13. ifndef PDIR
  14. SUBDIRS = luac_cross
  15. GEN_LIBS = liblua.a
  16. endif
  17. STD_CFLAGS=-std=gnu11 -Wimplicit -Wall
  18. # Validate LUA setting
  19. ifeq ("$(LUA)","")
  20. else ifeq ("$(LUA)","51")
  21. # ok
  22. else ifeq ("$(LUA)","53")
  23. $(error Your variable LUA="$(LUA)" looks like you probably want \
  24. app/lua53/Makefile instead)
  25. else
  26. $(error Unsupported value "$(LUA)" for variable "LUA", \
  27. expected empty/unset (recommended) or "51")
  28. endif
  29. #############################################################
  30. # Configuration i.e. compile options etc.
  31. # Target specific stuff (defines etc.) goes in here!
  32. # Generally values applying to a tree are captured in the
  33. # makefile at its root level - these are then overridden
  34. # for a subtree within the makefile rooted therein
  35. #
  36. #DEFINES += -DDEVELOPMENT_TOOLS -DDEVELOPMENT_USE_GDB -DDEVELOPMENT_BREAK_ON_STARTUP_PIN=1
  37. #EXTRA_CCFLAGS += -ggdb -O0
  38. #############################################################
  39. # Recursion Magic - Don't touch this!!
  40. #
  41. # Each subtree potentially has an include directory
  42. # corresponding to the common APIs applicable to modules
  43. # rooted at that subtree. Accordingly, the INCLUDE PATH
  44. # of a module can only contain the include directories up
  45. # its parent path, and not its siblings
  46. #
  47. # Required for each makefile to inherit from the parent
  48. #
  49. INCLUDES += -I ../uzlib
  50. PDIR := ../$(PDIR)
  51. sinclude $(PDIR)Makefile