1 | # |
---|
2 | # $Id: Makefile.tools 143 2010-09-02 14:33:08Z rosiere $ |
---|
3 | # |
---|
4 | # [ Description ] |
---|
5 | # |
---|
6 | # Makefile tools |
---|
7 | # |
---|
8 | |
---|
9 | ifeq ($(origin MORPHEO_LOCALIZATION), undefined) |
---|
10 | $(error "variable MORPHEO_LOCALIZATION is undefined"); |
---|
11 | endif |
---|
12 | |
---|
13 | ifeq ($(origin MORPHEO_TOPLEVEL), undefined) |
---|
14 | $(error "variable MORPHEO_TOPLEVEL is undefined"); |
---|
15 | else |
---|
16 | include $(MORPHEO_TOPLEVEL)/Makefile.tools_path |
---|
17 | endif |
---|
18 | |
---|
19 | #---------------------------------------------------------- |
---|
20 | #-----[ Unix Commands ]------------------------------------ |
---|
21 | #---------------------------------------------------------- |
---|
22 | |
---|
23 | # Unix Command |
---|
24 | SHELL = /bin/bash |
---|
25 | |
---|
26 | EDITOR = emacs |
---|
27 | ECHO = echo |
---|
28 | PRINTF = printf |
---|
29 | MKDIR = mkdir -p -m 777 |
---|
30 | TEST = test |
---|
31 | DATE = date +%Y%m%d-%H%M%S |
---|
32 | date = date +%Y/%m/%d\ %H:%M:%S |
---|
33 | NICE = nice |
---|
34 | CHMOD = chmod |
---|
35 | CP = cp |
---|
36 | MV = mv |
---|
37 | CAT = cat |
---|
38 | LS = ls |
---|
39 | LINK_SYMBOLIC = ln -s |
---|
40 | RM = rm -fr |
---|
41 | PWD = `pwd` |
---|
42 | SED = sed |
---|
43 | TOUCH = touch |
---|
44 | WC = wc |
---|
45 | MAKE = make -s |
---|
46 | AR = ar -v |
---|
47 | RANLIB = ranlib |
---|
48 | BASENAME = basename |
---|
49 | DIRNAME = dirname |
---|
50 | GREP = grep |
---|
51 | GREP_NOT = egrep -v |
---|
52 | TR = tr |
---|
53 | UPPERtoLOWER = $(TR) [:lower:] [:upper:] |
---|
54 | MSGFMT = msgfmt |
---|
55 | READ = read |
---|
56 | DISTCC = $(ENV); distcc |
---|
57 | |
---|
58 | # Compilaton / Execution |
---|
59 | #VALGRIND = valgrind --tool=memcheck --leak-check=yes --show-reachable=yes |
---|
60 | VALGRIND = valgrind --tool=memcheck --leak-check=full --show-reachable=yes --leak-resolution=high --partial-loads-ok=yes --undef-value-errors=yes |
---|
61 | ifeq ($(MORPHEO_DISTCC), 0) |
---|
62 | CC_PREFIX = |
---|
63 | else |
---|
64 | CC_PREFIX = $(DISTCC) |
---|
65 | endif |
---|
66 | CC_FLAGS_COMMON = -O3 -m32 -Wall -Wunused -g3 -pg |
---|
67 | # -static -march=i686 |
---|
68 | # -m32 -> -march=i386 |
---|
69 | CXX = export LANG=C; $(CC_PREFIX) g++ |
---|
70 | CXX_FLAGS = $(CC_FLAGS_COMMON) -Wabi |
---|
71 | CC = export LANG=C; $(CC_PREFIX) gcc |
---|
72 | CC_FLAGS = $(CC_FLAGS_COMMON) -std=c99 |
---|
73 | |
---|
74 | # Documentation |
---|
75 | FIG2EPS = fig2dev -L eps |
---|
76 | EPS2PNG = convert -quality 0 |
---|
77 | LATEX = latex |
---|
78 | BIBTEX = bibtex |
---|
79 | MAKEINDEX = makeindex |
---|
80 | DVIPS = dvips -Ppdf |
---|
81 | PS2PDF = ps2pdf |
---|
82 | GNUPLOT = gnuplot |
---|
83 | DOT = dot |
---|
84 | VIEWDVI = evince |
---|
85 | VIEWPS = evince |
---|
86 | VIEWPDF = evince |
---|
87 | VIEWPDF_FS = $(VIEWPDF) -s |
---|
88 | |
---|
89 | #---------------------------------------------------------- |
---|
90 | #-----[ tools ]-------------------------------------------- |
---|
91 | #---------------------------------------------------------- |
---|
92 | |
---|
93 | #-----[ systemc ]------------------------------------------ |
---|
94 | SYSTEMC_INCDIR_systemc = -I$(SYSTEMC_systemc)/include |
---|
95 | SYSTEMC_LIBDIR_systemc = -L$(SYSTEMC_systemc)/lib-linux |
---|
96 | SYSTEMC_LIBNAME_systemc = -lsystemc |
---|
97 | SYSTEMC_CXX_systemc = $(CXX) |
---|
98 | SYSTEMC_CC_systemc = $(CC) |
---|
99 | SYSTEMC_CFLAGS_systemc = -g3 |
---|
100 | SYSTEMC_EXEC_PARAMS_systemc = |
---|
101 | |
---|
102 | #-----[ systemcass ]--------------------------------------- |
---|
103 | SYSTEMC_INCDIR_systemcass = -I$(SYSTEMC_systemcass)/include |
---|
104 | SYSTEMC_INCDIR_systemcass_deps = $(SYSTEMC_INCDIR_systemcass) |
---|
105 | |
---|
106 | SYSTEMC_LIBDIR_systemcass = -L$(SYSTEMC_systemcass)/lib |
---|
107 | SYSTEMC_LIBDIR_systemcass_deps = $(SYSTEMC_LIBDIR_systemcass) |
---|
108 | |
---|
109 | SYSTEMC_LIBNAME_systemcass = -lsystemc_g++-d -ldl |
---|
110 | SYSTEMC_LIBNAME_systemcass_deps = $(SYSTEMC_LIBNAME_systemcass) |
---|
111 | |
---|
112 | SYSTEMC_CXX_systemcass = $(CXX) |
---|
113 | SYSTEMC_CXX_systemcass_deps = $(SYSTEMC_CXX_systemcass) |
---|
114 | |
---|
115 | SYSTEMC_CC_systemcass = $(CC) |
---|
116 | SYSTEMC_CC_systemcass_deps = $(SYSTEMC_CC_systemcass) |
---|
117 | |
---|
118 | SYSTEMC_CFLAGS_systemcass = -g3 -rdynamic -ansi -Wno-long-long |
---|
119 | SYSTEMC_CFLAGS_systemcass_deps = $(SYSTEMC_CFLAGS_systemcass) |
---|
120 | |
---|
121 | SYSTEMC_EXEC_PARAMS_systemcass = --usage --nobanner |
---|
122 | SYSTEMC_EXEC_PARAMS_systemcass_deps = $(SYSTEMC_EXEC_PARAMS_systemcass) --p --t --d |
---|
123 | |
---|
124 | #-----[ xilinx ]------------------------------------------- |
---|
125 | XILINX_ENV = . $(XILINX)/settings.sh |
---|
126 | XILINX_COMPXLIB = $(XILINX_ENV); compxlib |
---|
127 | XILINX_LIBDIR = $(XILINX_CORELIB)/XilinxCoreLib |
---|
128 | XILINX_LIBNAME = XilinxCoreLib |
---|
129 | |
---|
130 | #-----[ Modeltech ]---------------------------------------- |
---|
131 | #MODELTECH_ENV = export LM_LICENSE_FILE=$(MODELTECH_LICENCE); export LD_LIBRARY_PATH=$(MODELTECH)/gcc*/lib |
---|
132 | MODELTECH_ENV = export LM_LICENSE_FILE=$(MODELTECH_LICENCE) |
---|
133 | MODELTECH_BIN = $(MODELTECH)/bin |
---|
134 | MODELTECH_VLIB = $(MODELTECH_ENV); $(MODELTECH_BIN)/vlib |
---|
135 | MODELTECH_VCOM = $(MODELTECH_ENV); $(MODELTECH_BIN)/vcom |
---|
136 | MODELTECH_VSIM = $(MODELTECH_ENV); $(MODELTECH_BIN)/vsim -c -do 'run -all; quit' |
---|
137 | MODELTECH_VMAP = $(MODELTECH_ENV); $(MODELTECH_BIN)/vmap |
---|
138 | MODELTECH_SCCOM = $(MODELTECH_ENV); $(MODELTECH_BIN)/sccom -vv -verbose |
---|
139 | MODELTECH_SCGENMOD = $(MODELTECH_ENV); $(MODELTECH_BIN)/scgenmod -sc_logic -sc_lv |
---|
140 | MODELTECH_CXX = $(MODELTECH)/gcc*/bin/g++ |
---|
141 | MODELTECH_CC = $(MODELTECH)/gcc*/bin/gcc |
---|
142 | |
---|
143 | SYSTEMC_INCDIR_modelsim = -I$(MODELTECH)/include/systemc/ -I$(MODELTECH)/include/ |
---|
144 | SYSTEMC_LIBDIR_modelsim = -L$(MODELTECH)/gcc-4.0.2-rhe21/lib/ |
---|
145 | SYSTEMC_LIBNAME_modelsim = |
---|
146 | SYSTEMC_CXX_modelsim = $(CC_PREFIX) $(MODELTECH_CXX) |
---|
147 | SYSTEMC_CC_modelsim = $(CC_PREFIX) $(MODELTECH_CC) |
---|
148 | SYSTEMC_CFLAGS_modelsim = |
---|
149 | SYSTEMC_EXEC_PARAMS_modelsim = |
---|
150 | |
---|
151 | #-----[ qt ]----------------------------------------------- |
---|
152 | QT_INCDIR = -I$(QT)/include |
---|
153 | QT_LIBDIR = -L$(QT)/lib |
---|
154 | QT_LIBNAME = |
---|
155 | QT_BIN = $(QT)/bin |
---|
156 | |
---|
157 | #-----[ or1k ]--------------------------------------------- |
---|
158 | OR1K_INCDIR = -I$(OR1K)/include |
---|
159 | OR1K_LIBDIR = -L$(OR1K)/lib -L$(OR1K)/lib/gcc/$(OR1K_GCC_BASENAME)/$(OR1K_GCC_VERSION)/ |
---|
160 | OR1K_LIBNAME = -lgcc |
---|
161 | OR1K_BIN = $(OR1K)/bin |
---|
162 | |
---|
163 | #-----[ newlib ]------------------------------------------- |
---|
164 | NEWLIB_INCDIR = -isystem $(NEWLIB)/include -isystem $(NEWLIB)/include/machine -isystem $(NEWLIB)/include/sys |
---|
165 | NEWLIB_LIBDIR = -L$(NEWLIB)/lib |
---|
166 | NEWLIB_LIBNAME = -lor32 -lm -lc -lor32 |
---|
167 | |
---|
168 | #-----[ EV67 ]--------------------------------------------- |
---|
169 | EV67_INCDIR = -I$(EV67)/include |
---|
170 | EV67_LIBDIR = -L$(EV67)/lib -L$(EV67)/lib/gcc/$(EV67_GCC_BASENAME)/$(EV67_GCC_VERSION)/ |
---|
171 | EV67_LIBNAME = -lgcc |
---|
172 | EV67_BIN = $(EV67)/bin |
---|