1 2############################################################# 3# Required variables for each makefile 4# Discard this section from all parent makefiles 5# Expected variables (with automatic defaults): 6# CSRCS (all "C" files in the dir) 7# SUBDIRS (all subdirs with a Makefile) 8# GEN_LIBS - list of libs to be generated () 9# GEN_IMAGES - list of images to be generated () 10# COMPONENTS_xxx - a list of libs/objs in the form 11# subdir/lib to be extracted and rolled up into 12# a generated lib/image xxx.a () 13# 14ifndef PDIR 15GEN_LIBS = libuser.a 16endif 17 18 19############################################################# 20# Configuration i.e. compile options etc. 21# Target specific stuff (defines etc.) goes in here! 22# Generally values applying to a tree are captured in the 23# makefile at its root level - these are then overridden 24# for a subtree within the makefile rooted therein 25# 26#DEFINES += 27 28############################################################# 29# Recursion Magic - Don't touch this!! 30# 31# Each subtree potentially has an include directory 32# corresponding to the common APIs applicable to modules 33# rooted at that subtree. Accordingly, the INCLUDE PATH 34# of a module can only contain the include directories up 35# its parent path, and not its siblings 36# 37# Required for each makefile to inherit from the parent 38# 39 40 41INCLUDES := $(INCLUDES) -I $(PDIR)include 42INCLUDES += -I ./ 43PDIR := ../$(PDIR) 44sinclude $(PDIR)Makefile 45