]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/make/c64x/makedefs.mk
ce80f0b84c2d6302af5b4b389ade301963388415
[keystone-rtos/ibl.git] / src / make / c64x / makedefs.mk
1 #*******************************************************************************
2 #* FILE PURPOSE: Define makefile variables for C64X
3 #*******************************************************************************
4 #* FILE NAME: makedefs.mk
5 #*
6 #* DESCRIPTION: Make include file which defines variables used by all DSP
7 #*    Makefiles.
8 #*              
9 #* (C) Copyright 1999 TELOGY Networks, Inc.             
10 #*******************************************************************************
12 ifeq ($(ENDIAN),big)
13  MEXT=be
14 else
15  MEXT=le
16 endif
18 CC          = $(TOOLSC6X)/bin/cl6x
19 AS          = $(TOOLSC6X)/bin/cl6x
20 LD          = $(TOOLSC6X)/bin/cl6x -z
21 ARIN        = $(TOOLSC6X)/bin/ar6x -rq
22 AROUT       = $(TOOLSC6X)/bin/ar6x -xq 
23 HEX6X           = $(TOOLSC6X)/bin/hex6x
24 CDBTOOL     = $(COMSPEC) /c $(TOOLSBIOSCDBC6X)\gconfgen
25 MAKEDEP     = $(MAKEDEPPATH)
26 MAKEDEP_OPT = -q
27 COBJEXT     = $(MEXT).oc
28 LOBJEXT     = ol
29 AOBJEXT     = $(MEXT).oa
30 CDEPEXT     = dc
31 LDEPEXT     = dl
32 ADEPEXT     = da
33 ASMEXT      = s
34 LASMEXT     = sa
35 LIBEXT      = lib
36 RM          = rm -f
37 CP          = cp -f
38 MV          = mv -f
39 CPUDIR      = c64x
41 ifeq ($(OS),Linux)
42     DIRSEP=/
43     PATHSEP=:
44 else
45 #DIRSEP=$(subst /,\,/)
46     DIRSEP=/
47     PATHSEP=;
48 endif
51 # CPU Class flags
52 CPUFLAGS   = -mv6400+
54 ifeq ($(ENDIAN),big)
55   ALLFARLIB       = $(TOOLSC6XDOS)/lib/rts64pluse.lib
56 else
57   ALLFARLIB       = $(TOOLSC6XDOS)/lib/rts64plus.lib
58 endif
60 #RTLIBS     = $(subst /,$(DIRSEP),$(ALLFARLIB))
61 RTLIBS     = $(subst \,/,$(ALLFARLIB))
63 # Common compilation flags
64 # -c     : disable linker
65 # -k     : keep .asm file
66 # -mi200 : set imterrupt threshold to max of 200 cycles.
67 # -ml3   : far memory model
68 # -pm    : program level optimization
69 # -mv6400: Target processor is 64x
70 # -pden  : display diagnostic number along with messages
71 # -pdr   : display remarks
72 # -pds1111: shut off #pragma symbol warnings
73 # -pds827: shut off #pragma symbol warnings (symbol undefined)
74 # -pds824: shut off #pragma symbol warnings (can be applied to file level symbol only)
75 # -pds837: shut off #pragma symbol warnings (can be applied to file level symbol only)
76 # -pds97:  shut off no source in file warning
77 ifneq ($(UTIL),yes)
78  ifeq ($(DEBUG),yes)
79   CFLAGS  = -c -k -mi200 -ml3 -ms3 -o2 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
80  else
81 # Always compile with -o2 as -o3 can possibly break endian neutral code */
82   CFLAGS  = -c -k -mi200 -ml0 -ms3 -o2 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
83  endif
84 else
85 # Always compile with -o2 as -o3 can possibly break endian neutral code */
86  CFLAGS  = -c -k -mi200 -ml3 -ms3 -o2 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
87 endif
89 ifeq ($(ENDIAN),big)
90  CFLAGS+= -me
91 endif
93 # Debug flags
94 # -as : keep local symbols
95 # -g  : enable debugging
96 # -ss : interlist C source and optimizer with .asm source
97 ifneq ($(UTIL),yes)
98  ifeq ($(DEBUG),yes)
99   DCFLAGS = -g -as  -ss
100  else
101   DCFLAGS = -as  -ss
102  endif
103 else
104  DCFLAGS = -g -as  -ss
105 endif
108 # ASM options
109 # -s  : place all symbols in object file
110 # -l  : produce listing
111 # -pw : warn pipelne conflicts 
112 # AFLAGS = -s -l -g -mk -ms $(CPUFLAGS)
113 AFLAGS = -g -ea.s -c -k -mi200 -ml3 -pm -al $(CPUFLAGS)
115 ifeq ($(ENDIAN),big)
116  AFLAGS+= -me
117 endif
119 PPDEP_FLAGS  = -ppd=$(patsubst %.$(CDEPEXT),%.$(CDEPEXT)_TMP,$@)
121 # Include files for standard (non siu) modules.  Also used by linker to find
122 # library files.
123 FSTDINC  =$(TOOLSC6XDOS)/include;$(TOOLSC6XDOS)/lib
124 FSTDINC +=;$(TOOLSC6XDOS)/rtdx/include;$(TOOLSC6XDOS)/rtdx/lib
125 FSTDINC +=;$(TOOLSBIOSC6XDOS)/bios/include;$(TOOLSBIOSC6XDOS)/bios/lib
126 FSTDINC +=;$(TOOLSBIOSC6XDOS)/xdais/include;;$(TOOLSBIOSC6XDOS)/xdais/src/api
127 STDINC =$(subst /,$(DIRSEP),$(FSTDINC))
129 # Include files for ASM in standard (non siu) modules
130 STDAINC =$(subst /,$(DIRSEP),$(TOOLSBIOSC6XDOS)/bios/include;$(GGROOT)/misc/$(CPUDIR))
132 # Include files for this platform.  Change this for test code.
133 PLATINC =$(subst /,$(DIRSEP),$(GGROOT)/hw/$(CPUDIR);$(ECODIR)/gg/$(CPUDIR);$(ECODIR)/$(CPUDIR))
135 # Nothing past this point