]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/make/c64x/makedefs.mk
Post tmp-mike2 merge updates
[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     PATHSEP=;
47 endif
50 # CPU Class flags
51 CPUFLAGS   = -mv6400+
53 ifeq ($(ENDIAN),big)
54   ALLFARLIB       = $(TOOLSC6XDOS)/lib/rts64pluse.lib
55 else
56   ALLFARLIB       = $(TOOLSC6XDOS)/lib/rts64plus.lib
57 endif
59 RTLIBS     = $(subst /,$(DIRSEP),$(ALLFARLIB))
61 # Common compilation flags
62 # -c     : disable linker
63 # -k     : keep .asm file
64 # -mi200 : set imterrupt threshold to max of 200 cycles.
65 # -ml3   : far memory model
66 # -pm    : program level optimization
67 # -mv6400: Target processor is 64x
68 # -pden  : display diagnostic number along with messages
69 # -pdr   : display remarks
70 # -pds1111: shut off #pragma symbol warnings
71 # -pds827: shut off #pragma symbol warnings (symbol undefined)
72 # -pds824: shut off #pragma symbol warnings (can be applied to file level symbol only)
73 # -pds837: shut off #pragma symbol warnings (can be applied to file level symbol only)
74 # -pds97:  shut off no source in file warning
75 ifneq ($(UTIL),yes)
76  ifeq ($(DEBUG),yes)
77   CFLAGS  = -c -k -mi200 -ml3 -ms3 -o2 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
78  else
79   CFLAGS  = -c -k -mi200 -ml0 -ms3 -o3 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
80  endif
81 else
82  CFLAGS  = -c -k -mi200 -ml3 -ms3 -o2 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
83 endif
85 ifeq ($(ENDIAN),big)
86  CFLAGS+= -me
87 endif
89 # Debug flags
90 # -as : keep local symbols
91 # -g  : enable debugging
92 # -ss : interlist C source and optimizer with .asm source
93 ifneq ($(UTIL),yes)
94  ifeq ($(DEBUG),yes)
95   DCFLAGS = -g -as  -ss
96  else
97   DCFLAGS = -as  -ss
98  endif
99 else
100  DCFLAGS = -g -as  -ss
101 endif
104 # ASM options
105 # -s  : place all symbols in object file
106 # -l  : produce listing
107 # -pw : warn pipelne conflicts 
108 # AFLAGS = -s -l -g -mk -ms $(CPUFLAGS)
109 AFLAGS = -g -ea.s -c -k -mi200 -ml3 -pm -al $(CPUFLAGS)
111 ifeq ($(ENDIAN),big)
112  AFLAGS+= -me
113 endif
115 PPDEP_FLAGS  = -ppd=$(patsubst %.$(CDEPEXT),%.$(CDEPEXT)_TMP,$@)
117 # Include files for standard (non siu) modules.  Also used by linker to find
118 # library files.
119 FSTDINC  =$(TOOLSC6XDOS)/include;$(TOOLSC6XDOS)/lib
120 FSTDINC +=;$(TOOLSC6XDOS)/rtdx/include;$(TOOLSC6XDOS)/rtdx/lib
121 FSTDINC +=;$(TOOLSBIOSC6XDOS)/bios/include;$(TOOLSBIOSC6XDOS)/bios/lib
122 FSTDINC +=;$(TOOLSBIOSC6XDOS)/xdais/include;;$(TOOLSBIOSC6XDOS)/xdais/src/api
123 STDINC =$(subst /,$(DIRSEP),$(FSTDINC))
125 # Include files for ASM in standard (non siu) modules
126 STDAINC =$(subst /,$(DIRSEP),$(TOOLSBIOSC6XDOS)/bios/include;$(GGROOT)/misc/$(CPUDIR))
128 # Include files for this platform.  Change this for test code.
129 PLATINC =$(subst /,$(DIRSEP),$(GGROOT)/hw/$(CPUDIR);$(ECODIR)/gg/$(CPUDIR);$(ECODIR)/$(CPUDIR))
131 # Nothing past this point