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

Generate better Makefile via 'lutin -luciole'

Tx to Nicolas Berthier.
parent 443d9cd8
# well, finally, set it manually...
VERSION:=1.55
VERSION:=1.56
#
# When incrementing that version number, please don't forget to
# fill-in the RELEASE-NOTES file (using the git history).
......
......@@ -70,8 +70,13 @@ objs/main.pdf: objs $(SRCS)
objs:
mkdir objs
./objs/lutyacc.tex: ./objs/cleanyacc tokens
mly2bnf $< -t tokens > $@
BIN=/usr/local/tools/lustre/misc/bin
./objs/lutyacc.tex: ./objs/rules
cat $< | $(BIN)/rules2tex -t tokens > $@
./objs/rules : $(LUTINSRC)/lutParser.mly
$(BIN)/yacc2rules $(LUTINSRC)/lutParser.mly > $@
./objs/cleanyacc : $(LUTINSRC)/lutParser.mly
cat $< | sed -e "s/lut//g" -e "s/TK_EOF//" > $@
......
......@@ -29,9 +29,14 @@ let (gen_makefile :string -> unit) =
p (Util.entete "# " "");
(* pn "LURETTE_PATH=/home/jahier/lurette/"; *)
pn "CFLAGS = -fPIC -L$(LURETTE_PATH)/lib -I$(LURETTE_PATH)/include -I$(LUSTRE_INSTALL)/include ";
pn "CPPFLAGS := -fPIC $(CPPFLAGS) -I$(LURETTE_PATH)/include -I$(LUSTRE_INSTALL)/include";
pn "LDFLAGS := -fPIC $(LDFLAGS) -L$(LURETTE_PATH)/lib";
pn "";
pn "LIBS = -lluc4c_nc -llucky_nc -lgmp -lm -ldl";
pn "ifndef LIBS ";
pn " LIBS = -lluc4c_nc -llucky_nc -lm -ldl -lgmp";
pn "endif ";
pn "";
pn ("all: " ^ str ^ ".dro");
pn (" simec ./" ^ str ^ ".dro");
......@@ -42,12 +47,7 @@ let (gen_makefile :string -> unit) =
(* pn (" $(LURETTE_PATH)/bin/luc2c -pp lucky_cpp --luciole " ^ str ^ env_ext); *)
pn "";
pn (str ^ ".dro: " ^ str ^ "_luciole.o " ^ str ^ ".o");
pn (" g++ $(CFLAGS) " ^ str ^ "_luciole.o " ^ str ^ ".o $(LIBS) -shared -o " ^ str ^ ".dro");
pn "";
pn "";
pn "%.o: %.c";
pn " $(CC) $(CFLAGS) -c $<";
pn "";
pn (" g++ $(LDFLAGS) $(CFLAGS) " ^ str ^ "_luciole.o " ^ str ^ ".o $(LIBS) -shared -o " ^ str ^ ".dro");
pn "";
pn "clean:";
pn (" rm -f "^str^".o "^str^".c "^str^".h "^str^"_luciole.c "
......
......@@ -3,7 +3,7 @@ include $(LURETTE_PATH)/Makefile.version
#VERSION=1.43
ver:
echo version=$(VERSION)
echo version=$(VERSION)-$(HOSTTYPE)
strip:
strip ../$(HOSTTYPE)/bin/lurettetop_exe$(EXE)
......
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