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