# # Prog.rules.C # # # Contains the rules for compiling and linking C programs #============================================================================ #============================================================================ # COMPILING #============================================================================ #============================================================================ #The general idea is that you can specify within a single makefile #what to compile in debug mode, single processor, and multi processor #(if available). By setting DEBUG to yes or SINGLE to yes, you describe #how ALL object files will be created. By specifying the names of #certain object files in UCDEBUG and UCSINGLE you can have a greater #degree of control. # #--------------------------------------------------------------------------- # Definitions # # User has the ability to specify different flags for programs to # be compiled in debug and single mode. If not specified default to # the more general user defined flags ifndef UCDEBUGFLAGS UCDEBUGFLAGS = ${UCFLAGS} endif ifndef UCSINGLEFLAGS UCSINGLEFLAGS = ${UCFLAGS} endif # # We need create the flags that we are going to use for compiling. # If the user has already set these flags in the makefile, don't bother. # The order is important here. # ifndef CDEBUGFLAGS CDEBUGFLAGS = ${UCINCLUDES} ${OCFLAGS} ${OCDEFINES} ${UCDEFINES} ${OCDEBUGFLAGS} ${UCFLAGS} endif ifndef CSINGLEFLAGS CSINGLEFLAGS = ${UCINCLUDES} ${OCFLAGS} ${OCDEFINES} ${UCDEFINES} ${COPTIMFLAGS} ${UCSINGLEFLAGS} endif ifndef CFLAGS CFLAGS = ${UCINCLUDES} ${OCFLAGS} ${OCDEFINES} ${UCDEFINES} ${COPTIMFLAGS} ${CPARFLAGS} ${UCFLAGS} endif # No we need to define how we compile. Default is a user override # followed by DEBUG=yes, SINGLE=yes, object file in CDEGUG, object file # in CSINGLE, generic compile. ifndef C_COMPILE ifeq (${DEBUG}, yada) define C_COMPILE $(compile.init) ${CC} ${CDEBUGFLAGS} $< -DSOURCE='"'${FULLSRC}/$(