Merge pull request #3 in PROCESSOR-SDK/ibl from PRSDK-5675 to master
[keystone-rtos/ibl.git] / src / make / c64x / bootinc.mk
1 #************************************************************************************
2 #* FILE PURPOSE: Boot loader specific make options
3 #************************************************************************************
4 #* FILE NAME: bootinc.mk
5 #*
6 #* DESCRIPTION: Definitions common accross boot loader make files
7 #*
8 #************************************************************************************
10 # Adjust the cflags based on desired endianness
12 ifeq ($(ENDIANNES),big)
13 CFLAGS+= -me
14 AFLAGS+= -me
15 endif
17 ifneq ($(MV6400PLUS),no)
18 CFLAGS:=$(subst mv6400,mv6400+,$(CFLAGS))
19 AFLAGS:=$(subst mv6400,mv6400+,$(AFLAGS))
20 #CFLAGS:=$(subst o3,,$(CFLAGS))  # for debug builds
21 endif
23 # mdebug - remove this
24 # CFLAGS:=$(subst -o3,-o2,$(CFLAGS))
25 # end mdebug
27 CFLAGS+= -ms2
29 ifdef RTLIBS
30 RTLIBS = $(TOOLSC6X)/lib/rts6400.lib
31 endif
33 # Rule to run splint. Form the splint
34 SPLINTCHECK= -splint $(CDEFS) $(SPLINT_OPTS) $(SPLINT_IPATH) $(SPLINT_DEFS) $<
35 SPLINT_OBJ_EXT= sobj
37 ALLDIR= $(C6X_C_DIR) $(SPLINT_PATH)
39 SPLINT_I0= $(subst \\\\\,!,$(ALLDIR))
40 SPLINT_I1= $(subst \\\\,!,$(SPLINT_I0))
41 SPLINT_I2= $(subst \\\,!,$(SPLINT_I1))
42 SPLINT_I3= $(subst \\,!,$(SPLINT_I2))
43 SPLINT_I4= $(subst \,!,$(SPLINT_I3))
44 SPLINT_I5= $(subst !,\,$(SPLINT_I4))
45 SPLINT_I6= $(subst ;, ,$(SPLINT_I5))
46 SPLINT_I7= $(addprefix -I,$(SPLINT_I6))
47 SPLINT_I8= $(subst /,\,$(SPLINT_I7))
48 SPLINT_I9= $(SPLINT_I8) -I..\..
50 SPLINT_IPATH= $(SPLINT_I9)
52 SPLINT_OPTS= -booltype BOOL +boolint -nullret -incondefs -exportlocal -Dcregister=
56 #MIKE_DASH= \\hello\\\\mike
57 #MIKE_RM= $(subst \\\\,;,$(MIKE_DASH))
58 #MIKE_R2= $(subst \\,;,$(MIKE_RM))
61 SPLINT_OBJS= $(patsubst %.c, %.$(SPLINT_OBJ_EXT), $(CFILES))
63 %.$(SPLINT_OBJ_EXT): %.c
64         -$(SPLINTCHECK)