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 CC = $(TOOLSC6X)/cgtools/bin/cl6x
13 AS = $(TOOLSC6X)/cgtools/bin/cl6x
14 LD = $(TOOLSC6X)/cgtools/bin/cl6x -z
15 ARIN = $(TOOLSC6X)/cgtools/bin/ar6x -rq
16 AROUT = $(TOOLSC6X)/cgtools/bin/ar6x -xq
17 HEX6X = $(TOOLSC6X)/cgtools/bin/hex6x
18 CDBTOOL = $(COMSPEC) /c $(TOOLSBIOSCDBC6X)\gconfgen
19 MAKEDEP = $(MAKEDEPPATH)
20 MAKEDEP_OPT = -q
21 COBJEXT = oc
22 LOBJEXT = ol
23 AOBJEXT = oa
24 CDEPEXT = dc
25 LDEPEXT = dl
26 ADEPEXT = da
27 ASMEXT = s
28 LASMEXT = sa
29 LIBEXT = lib
30 RM = rm -f
31 CP = cp -f
32 MV = mv -f
33 CPUDIR = c64x
35 ifeq ($(OS),Linux)
36 DIRSEP=/
37 PATHSEP=:
38 else
39 DIRSEP=$(subst /,\,/)
40 PATHSEP=;
41 endif
44 # CPU Class flags
45 CPUFLAGS = -mv6400+
47 ifeq ($(ENDIAN),big)
48 ALLFARLIB = $(TOOLSC6XDOS)/cgtools/lib/rts64pluse.lib
49 else
50 ALLFARLIB = $(TOOLSC6XDOS)/cgtools/lib/rts64plus.lib
51 endif
53 RTLIBS = $(subst /,$(DIRSEP),$(ALLFARLIB))
55 # Common compilation flags
56 # -c : disable linker
57 # -k : keep .asm file
58 # -mi200 : set imterrupt threshold to max of 200 cycles.
59 # -ml3 : far memory model
60 # -pm : program level optimization
61 # -mv6400: Target processor is 64x
62 # -pden : display diagnostic number along with messages
63 # -pdr : display remarks
64 # -pds1111: shut off #pragma symbol warnings
65 # -pds827: shut off #pragma symbol warnings (symbol undefined)
66 # -pds824: shut off #pragma symbol warnings (can be applied to file level symbol only)
67 # -pds837: shut off #pragma symbol warnings (can be applied to file level symbol only)
68 # -pds97: shut off no source in file warning
69 ifneq ($(UTIL),yes)
70 ifeq ($(DEBUG),yes)
71 CFLAGS = -c -k -mi200 -ml3 -ms3 -o2 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
72 else
73 CFLAGS = -c -k -mi200 -ml0 -ms3 -o2 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
74 endif
75 else
76 CFLAGS = -c -k -mi200 -ml3 -ms3 -o2 -pm -pds1111 -pds827 -pds824 -pds837 -pds1037 -pds195 -pds97 -pden -pdr $(CPUFLAGS)
77 endif
79 ifeq ($(ENDIAN),big)
80 CFLAGS+= -me
81 endif
83 # Debug flags
84 # -as : keep local symbols
85 # -g : enable debugging
86 # -ss : interlist C source and optimizer with .asm source
87 ifneq ($(UTIL),yes)
88 ifeq ($(DEBUG),yes)
89 DCFLAGS = -g -as -ss
90 else
91 DCFLAGS = -as -ss
92 endif
93 else
94 DCFLAGS = -g -as -ss
95 endif
98 # ASM options
99 # -s : place all symbols in object file
100 # -l : produce listing
101 # -pw : warn pipelne conflicts
102 # AFLAGS = -s -l -g -mk -ms $(CPUFLAGS)
103 AFLAGS = -g -ea.s -c -k -mi200 -ml3 -pm -al $(CPUFLAGS)
105 ifeq ($(ENDIAN),big)
106 AFLAGS+= -me
107 endif
109 # Include files for standard (non siu) modules. Also used by linker to find
110 # library files.
111 FSTDINC =$(TOOLSC6XDOS)/cgtools/include;$(TOOLSC6XDOS)/cgtools/lib
112 FSTDINC +=;$(TOOLSC6XDOS)/rtdx/include;$(TOOLSC6XDOS)/rtdx/lib
113 FSTDINC +=;$(TOOLSBIOSC6XDOS)/bios/include;$(TOOLSBIOSC6XDOS)/bios/lib
114 FSTDINC +=;$(TOOLSBIOSC6XDOS)/xdais/include;;$(TOOLSBIOSC6XDOS)/xdais/src/api
115 STDINC =$(subst /,$(DIRSEP),$(FSTDINC))
117 # Include files for ASM in standard (non siu) modules
118 STDAINC =$(subst /,$(DIRSEP),$(TOOLSBIOSC6XDOS)/bios/include;$(GGROOT)/misc/$(CPUDIR))
120 # Include files for this platform. Change this for test code.
121 PLATINC =$(subst /,$(DIRSEP),$(GGROOT)/hw/$(CPUDIR);$(ECODIR)/gg/$(CPUDIR);$(ECODIR)/$(CPUDIR))
123 # Nothing past this point