Commit 526e4d6e authored by Erwan Jahier's avatar Erwan Jahier
Browse files

More Makefile cleaning.

parent 2e40bee2
-include ./Makefile.version
# to run after a checkout in a fresh WS, or a change in the ocaml version
source: gen_version
# to run after a 'git clone', or a change in the ocaml version
source: build
build: gen_version
./lnsw
cd polka; make clean; make all ; make install; cd ..
cd GBDDML; make clean; make; make all; make cp; cd ..
cd source; make clean; make install; cd ..
cd install; autoconf; cd ..
cd polka && make clean; make all && make install&& cd .. &&\
cd GBDDML && make clean; make; make all && make cp && cd ..&&\
cd source && make clean; make install; cd ..&&\
cd install && autoconf && cd ..&&\
./RUN_ME
clean:
......@@ -16,40 +17,28 @@ clean:
cd source; make clean; cd ..
# \newcommand{\version}{unstable.3}
# \newcommand{\versiondate}{01-02-07}
.PHONY: test
test:
cd examples && make test
cia: test cia_notest
###############################
# a few git shortcuts
cia: test cia_notest
cia_notest:
git commit -a -F log && rm source/version.ml
git commit -a -F log && make gen_version
amend:
git commit -a -F log --amend && rm source/version.ml
git commit -a -F log --amend && make gen_version
ci: test
git commit -F log && rm source/version.ml
git commit -F log && make gen_version
ldiff:
pdiff -r unstable
diff:
git diff HEAD -w > diff.diff && \
echo "il y a $(shell grep "+" diff.diff | wc -l) + et $(shell grep "-" diff.diff | wc -l) -"
touch:
cd test && make touch
VERSION:=$(shell E=`git log --oneline | wc -l` ; echo "$$E-166" | bc )
VERSION:="1.$(VERSION)"
# well, finally, set it manually...
VERSION:="1.50"
# the sha is still automatic tough!
SHA:=`git log -1 --pretty=format:"%h"`
gen_version:
rm -f source/version.ml
echo "let str=\"$(VERSION)\"" > source/common/version.ml
......
......@@ -24,7 +24,7 @@ qu () {
echo "Lurette installation procedure"
INSTALL_DIR=$PWD
INSTALL_DIR=$PWD/$HOSTTYPE
qu "Where do you want to install files (absolute path)?" INSTALL_DIR
echo "
......
......@@ -7,7 +7,7 @@ CFLAGS = \
-I../../include
LIBS = -lluc4c_nc -llucky_nc -lgmp -lm -ldl -lstdc++
LUC2C=../../bin/luc2c
LUC2C=../../../$(HOST_TYPE)/bin/luc2c
ifeq ($(HOST_TYPE),mac)
LINKER=g++ -g
......@@ -21,7 +21,7 @@ ifeq ($(HOST_TYPE),win32)
-Winline -Wimplicit-function-declaration
LIBS = -lluc4c_nc -llucky_nc -lgmp -lws2_32 -lm -lstdc++ -mno-cygwin -lole32
LUC2C=../../../bin/luc2c$(EXE)
LUC2C=../../../$(HOST_TYPE)/bin/luc2c$(EXE)
endif
ifeq ($(HOST_TYPE),cygwin)
EXE=.exe
......@@ -31,7 +31,7 @@ ifeq ($(HOST_TYPE),cygwin)
-Winline -Wimplicit-function-declaration
LIBS = -lluc4c_nc -llucky_nc -lgmp -lws2_32 -lm -lstdc++
LUC2C=../../../bin/luc2c$(EXE)
LUC2C=../../../$(HOST_TYPE)/bin/luc2c$(EXE)
endif
......
......@@ -62,11 +62,11 @@ $(OBJDIR)/%.o : $(OBJDIR) $(SRCDIR)/%.c
call_external_c_code.luc_pp:call_external_c_code.luc
../../../bin/lucky_cpp call_external_c_code.luc call_external_c_code.luc_pp $(LD_ARCH)
../../../$(HOST_TYPE)/bin/lucky_cpp call_external_c_code.luc call_external_c_code.luc_pp $(LD_ARCH)
test: clean $(OBJDIR)/$(MAIN).$(DLEXT) call_external_c_code.luc_pp
rm -f test.rif0 && \
../../../bin/lucky$(EXE) -l 10 $(OPT) -seed 834966010 \
../../../$(HOST_TYPE)/bin/lucky$(EXE) -l 10 $(OPT) -seed 834966010 \
call_external_c_code.luc_pp | sed -e "s/^M//" | grep -v "This is Lucky Version" > test.rif
rm -f test.res && diff -u -i test.rif.exp test.rif > test.res
[ ! -s test.res ] && make clean
......
......@@ -3,7 +3,7 @@
-include Makefile.foo
go:
../../bin/luc2c --luciole foo.luc
../../../$(HOST_TYPE)/bin/luc2c --luciole foo.luc
test: go
make -f Makefile.foo && make clean
\ No newline at end of file
......@@ -3,21 +3,21 @@ LD = gcc -g
EXE=
CFLAGS = \
-L../../../lib \
-I../../../include
-L../../../$(HOST_TYPE)/lib \
-I../../../$(HOST_TYPE)/include
LIBS = -lluc4c_nc -llucky_nc -lgmp -lm -ldl -lstdc++
LUC2C=../../../bin/luc2c
LUC2C=../../../$(HOST_TYPE)/bin/luc2c
ifeq ($(HOST_TYPE),win32)
EXE=.exe
CFLAGS = \
-L../../../lib -L/cygdrive/c/TEMP/MinGW/lib \
-I../../../include \
-L../../../$(HOST_TYPE)/lib -L/cygdrive/c/TEMP/MinGW/lib \
-I../../../$(HOST_TYPE)/include \
-Winline -Wimplicit-function-declaration
LIBS = -lluc4c_nc -llucky_nc -lgmp -lws2_32 -lm -lstdc++
LUC2C=../../../bin/luc2c$(EXE)
LUC2C=../../../$(HOST_TYPE)/bin/luc2c$(EXE)
endif
ifeq ($(HOST_TYPE),mac)
LD = g++ -g
......
......@@ -4,7 +4,7 @@ ifeq ($(HOST_TYPE),win32)
EXE=.exe
endif
LUCKY=../../../bin/lucky$(EXE) -seed 1
LUCKY=../../../$(HOST_TYPE)/bin/lucky$(EXE) -seed 1
test1 :
......
......@@ -3,7 +3,7 @@ ifeq ($(HOST_TYPE),win32)
EXE=.exe
endif
LUCKY=../../../bin/lucky$(EXE)
LUCKY=../../../$(HOST_TYPE)/bin/lucky$(EXE)
test:
$(LUCKY) -l 10 $(OPT) -seed 1 \
simpler.luc | sed -e "s/^M//" | grep -v "This is Lucky Version" > test.rif && \
......
LUCKY=../../../bin/lucky
LUCKY=../../../$(HOST_TYPE)/bin/lucky
test:
$(LUCKY) -l 10 $(OPT) -seed 1 \
six_lines.luc | sed -e "s/^M//" | grep -v "This is Lucky Version" > test.rif && \
......
MAIN=draw-ex
LUCKYDRAW_INSTALL_DIR=../../../lib
LUCKYDRAW_INSTALL_DIR=../../../$(HOST_TYPE)/lib
CLIBS=-cclib -lluckyDraw
MLLIBS= str.cmxa unix.cmxa bdd.cmxa polka.cmxa luckyDraw.cmxa
......
......@@ -14,7 +14,7 @@ MAIN=rabbit
CMXA_LIB = unix.cmxa str.cmxa bdd.cmxa polka.cmxa luc4ocaml.cmxa
CMA_LIB=luc4ocaml.cma
LUC4OCAML_INSTALL_DIR = -I ../../lib
LUC4OCAML_INSTALL_DIR = -I ../../$(HOST_TYPE)/lib
# LUC4OCAML_INSTALL_DIR = -I +lucky
......
......@@ -2,10 +2,10 @@
CMXA_LIB = unix.cmxa str.cmxa bdd.cmxa polka.cmxa luc4ocaml.cmxa
CMA_LIB=luc4ocaml.cma
LUC4OCAML_INSTALL_DIR = -I ../../../lib
LUC4OCAML_INSTALL_DIR = -I ../../../$(HOST_TYPE)/lib
# LUC4OCAML_INSTALL_DIR = -I +lucky
LUCKY=../../../bin/lucky
LUCKY=../../../$(HOST_TYPE)/bin/lucky
MAIN=rabbit
......
LURETTETOP=../../../bin/lurettetop
LURETTETOP=../../../$(HOST_TYPE)/bin/lurettetop
......
LURETTETOP=../../../bin/lurettetop -go -seed 1 --precision 4
LURETTETOP=../../../$(HOST_TYPE)/bin/lurettetop -go -seed 1 --precision 4
......
LURETTETOP=../../../bin/lurettetop -go -seed 1 --precision 4
LURETTETOP=../../../$(HOST_TYPE)/bin/lurettetop -go -seed 1 --precision 4
test:
......
LURETTETOP=../../../bin/lurettetop -go -seed 1 --precision 2
LURETTETOP=../../../$(HOST_TYPE)/bin/lurettetop -go -seed 1 --precision 2
test:
......
LTOP=../../../bin/lurettetop
LTOP=../../../$(HOST_TYPE)/bin/lurettetop
LURETTETOP=$(LTOP) --precision 2 --sut heater_control.lus \
--main-sut-node heater_control --oracle heater_control.lus \
--main-oracle-node not_a_sauna --sut-compiler verimag \
......
LURETTETOP=../../../bin/lurettetop
LURETTETOP=../../../$(HOST_TYPE)/bin/lurettetop
ifeq ($(HOST_TYPE),win32)
RM=del /q
......
LURETTETOP=../../../bin/lurettetop
LURETTETOP=../../../$(HOST_TYPE)/bin/lurettetop
CC=g++
......
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