Commit c36f349a authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Fix Makefiles to add the -fPIC option to gcc as it is necessary on 64b arch/

Update the lus2lic plugin
parent 6e017db3
......@@ -37,7 +37,7 @@ CPP_COMPILER=$(GPP)
CPP_LINKER=$(GPP)
CPP_FLAGS=-g -O0 -fno-operator-names -I$(HOME)/$(HOST_TYPE)/include/ -I$(shell $(OCAMLC) -where) $(CPP_FLAGS0)
CPP_FLAGS=-g -O0 -fno-operator-names -I$(HOME)/$(HOST_TYPE)/include/ -I$(shell $(OCAMLC) -where) $(CPP_FLAGS0) -fPIC
LFLAGS = -cclib -lstdc++
......
......@@ -37,11 +37,11 @@ slink:
cp -rf $(LOCAL_INSTALL)/include/* $(INC_INSTALL_DIR)
cpcomp:
cp `which lus2lic$(EXE)` $(BIN_INSTALL_DIR)
cp `which lus2ec` $(BIN_INSTALL_DIR)
cp `which ecexe$(EXE)` $(BIN_INSTALL_DIR)
cp `which ec2c$(EXE)` $(BIN_INSTALL_DIR)
cp `which simec$(EXE)` $(BIN_INSTALL_DIR)
cp `which lus2lic$(EXE)` $(BIN_INSTALL_DIR) || true
cp `which lus2ec` $(BIN_INSTALL_DIR) || true
cp `which ecexe$(EXE)` $(BIN_INSTALL_DIR) || true
cp `which ec2c$(EXE)` $(BIN_INSTALL_DIR) || true
cp `which simec$(EXE)` $(BIN_INSTALL_DIR) || true
clean:
......@@ -49,6 +49,13 @@ clean:
cd GBDDML; make clean; cd ..
cd source; make clean; cd ..
cleanall:clean
rm -f pre_release/$(HOSTTYPE)/include/*|| true
rm -f pre_release/$(HOSTTYPE)/lib/*|| true
rm -f pre_release/$(HOSTTYPE)/include/*|| true
rm -f working/$(HOSTTYPE)/include/* || true
rm -f working/$(HOSTTYPE)/lib/*|| true
rm -f working/$(HOSTTYPE)/include/*|| true
bisect-test: gen_version
......
......@@ -36,9 +36,9 @@ LIB_INSTALL_DIR=$(PRE_RELEASE_DIR)/lib
INC_INSTALL_DIR=$(PRE_RELEASE_DIR)/include
CPP=cpp
RANLIB=ranlib
GCC=gcc
GCC=gcc
GPP=g++
CFLAGS=-g -O2 -fpic -DPOLKA_NUM=3
CFLAGS=-g -O2 -fPIC -DPOLKA_NUM=3
# HOSTTYPE doit etre defini bien sur...
......
......@@ -14,8 +14,8 @@ MAIN2=bool_utils_au_plus_2_parmi_3
#settings for Linux (and other posix systems ?)
DLEXT=so
EXE=
LD=gcc
CC=gcc
LD=gcc -fPIC
CC=gcc -fPIC
MKDLLFLAGS=
LFLAGS=
SOFLAGS=-shared
......
ifndef GCC
export GCC=gcc
export GCC=gcc -fPIC
endif
LTOP=../../../bin/lurettetop
......@@ -39,10 +39,10 @@ lu:
-rp "sut:socket:127.0.0.1:$(PORT2):" \
-rp "env:lutin:foo.lut:main"
sut2:
sut2: simple_sut2
call-via-socket -server -addr 127.0.0.1 -port $(PORT) ./simple_sut2
sut3:
sut3:simple_sut3
call-via-socket -server -addr 127.0.0.1 -port $(PORT2) ./simple_sut3
......
......@@ -50,6 +50,9 @@ int main(){
setlocale(LC_ALL, "English");
// sending I/O declarations
memset(buff, 0, MAX_BUFF_SIZE);
sprintf(buff, "@#inputs \nx:int \ny:bool\n z:real \n#@\n"); // multi-line rif decl
send(sock, buff, (int) strlen(buff),0);
sprintf(buff, "#outputs a:int b:bool c:real\n"); // single-line rif decl (just for fun)
......
......@@ -14,7 +14,7 @@ endif
CMXA_LIB = unix.cmxa nums.cmxa str.cmxa bdd.cmxa polka.cmxa rdbg-plugin.cmxa lut4ocaml.cmxa
CMA_LIB=luc4ocaml.cma
INCLUDE_DIR = -I ../../../lib -I ../../../lib/rdbg-plugin
INCLUDE_DIR = -I ../../../lib -I +rdbg-plugin -I +lus2lic
LUTIN=../../../bin/lutin$(EXE)
# INCLUDE_DIR = -I +lucky
......
#
# Illustrate the use of a ocaml programs that calls the lutin interpreter
# Illustrate the use of a C programs that calls the lutin interpreter
# via sockets
......@@ -34,7 +34,7 @@ do: $(MAIN)
cp $(MAIN) $(MAIN).exe
test: clean $(MAIN)
./$(MAIN)
./$(MAIN)
cat $(MAIN).rif | sed -e "s/^M//" > $(MAIN)-2.rif
rm -f test.res && diff -B -u -w -i $(MAIN).rif.exp $(MAIN)-2.rif > test.res && \
[ ! -s test.res ] && make clean
......
......@@ -3,6 +3,7 @@ LTOP=/usr/local/tools/lustre-misc/lurette/i386-linux-gcc3/bin/lurettetop
LTOP=../../../../bin/lurettetop
LURETTETOP=$(LTOP) --precision 2 --seed 3\
-rp "sut:v6:heater_control.lus:heater_control" \
-rp "oracle:v6:heater_control.lus:not_a_sauna" \
......@@ -19,6 +20,7 @@ $(EXPDIR):
test.rif:
rm -f test.rif .lurette_rc
export GCC="/usr/bin/gcc -fPIC"
$(LURETTETOP) --test-length 2 -go --output test.rif0 env.lut && \
grep -v "lurette chronogram" test.rif0 | \
grep -v "This is lurette Version" test.rif0 | \
......
......@@ -41,7 +41,7 @@ ifeq ($(HOST_TYPE),win32)
GCC=$CC
GMP_INSTALL=$(LURETTE_PATH)/working/$(HOSTTYPE)
else
CC = gcc
CC = gcc -fPIC
GMP_INSTALL=/usr
endif
endif
......
......@@ -21,7 +21,7 @@ endif
CC=$(GCC) $(DWIN32)
CC=$(GCC) $(DWIN32) -fPIC
......
......@@ -23,7 +23,7 @@ endif
CC=$(GCC) $(DWIN32)
CC=$(GCC) $(DWIN32) -fPIC
......
......@@ -21,7 +21,7 @@ endif
CC=$(GCC) $(DWIN32)
CC=$(GCC) $(DWIN32) -fPIC
......
......@@ -6,8 +6,7 @@ include $(LURETTE_PATH)/Makefile.common.source
include $(LURETTE_PATH)/source/Makefile.ln
######################################################################
CC=$(GCC) -g -O2 $(DWIN32)
CC=$(GCC) -g -O2 $(DWIN32)
DEBUG=
......
......@@ -14,7 +14,7 @@ STATIC=yes
# OCAMLNLDFLAGS = $(POLKA_CMX)
CC=$(GCC) $(DWIN32) -L$(OCAMLLIB)
CC=$(GCC) $(DWIN32) -L$(OCAMLLIB) -fPIC
ifeq ($(HOST_TYPE),win32)
IDLFLAGS=-nocpp
......
......@@ -27,7 +27,7 @@ endif
CC=$(GCC) $(DWIN32)
CC=$(GCC) $(DWIN32) -fPIC
LIBS = unix str nums polka bdd rdbg-plugin
......
......@@ -24,7 +24,7 @@ endif
CC=$(GCC) $(DWIN32)
CC=$(GCC) $(DWIN32) -fPIC
......
......@@ -29,7 +29,7 @@ let (gen_makefile :string -> unit) =
p (Util.entete "# " "");
(* pn "LURETTE_PATH=/home/jahier/lurette/"; *)
pn "CFLAGS = -L$(LURETTE_PATH)/lib -I$(LURETTE_PATH)/include -I$(LUSTRE_INSTALL)/include ";
pn "CFLAGS = -fPIC -L$(LURETTE_PATH)/lib -I$(LURETTE_PATH)/include -I$(LUSTRE_INSTALL)/include ";
pn "";
pn "LIBS = -lluc4c_nc -llucky_nc -lgmp -lm -ldl";
pn "";
......
......@@ -24,7 +24,7 @@ OCAMLLDFLAGS= -cclib -lstdc++ -cclib -I/usr/lib/w32api \
endif
CC= $(GCC) $(DWIN32)
CC= $(GCC) $(DWIN32) -fPIC
LIBS = unix dynlink str nums polka bdd rdbg-plugin
CLIBS = camlidl $(CLIBS_WIN32) bdd_stubs
......@@ -47,6 +47,8 @@ SOC_SOURCES = \
$(OBJDIR)/toposort.ml \
$(OBJDIR)/actionsDeps.mli \
$(OBJDIR)/actionsDeps.ml \
$(OBJDIR)/sortActions.mli \
$(OBJDIR)/sortActions.ml \
$(OBJDIR)/lic2soc.mli \
$(OBJDIR)/lic2soc.ml \
$(OBJDIR)/socExecValue.mli \
......
......@@ -14,7 +14,7 @@ STATIC=yes
# OCAMLNLDFLAGS = $(POLKA_CMX)
CC=$(GCC) $(DWIN32) -L$(OCAMLLIB)
CC=$(GCC) $(DWIN32) -L$(OCAMLLIB) -fPIC
ifeq ($(HOST_TYPE),win32)
IDLFLAGS=-nocpp
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment