blob: 93a8f896c7c3c2610aa57b4b5a762068777f589b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# File: makefile_GNU
# Why: Creates the library of yacco2: libyacco2.a
# or gens the code and pdf document
# Library placement:
# Rlse: yacco2/library/lib/Release
# Dbg: yacco2/library/lib/Debug
# Genw: for the pdf file: yacco2/docs
# for the *.cpp files: yacco2/library
#
# How to run: U must choose the label to execute: Rlse, Dbg, Genw
# Rlse --- gen the fast version of library with no debug support
# Dbg --- gen the debug version of library
# Genw --- gen the pdf document and the cpp code
# from cweb see www.tug.org for details on obtaining code
# for the literate programming environment aka CWEB
# and please join Tug. It is a marvalous FOSS
# Note: U do not need to use Genw as *.cpp and pdf
# document are included in the ``yacco2'' package
#
# Example: gen the debug version of the library
# cd /yacco2/library
# make Dbg -f GNU_makefile
#
CC := g++
Rlse: Compile_opts := -c -o3 -pthread #-fno-rtti -frepo -fno-implicit-templates
Dbg: BASICOPTS := -c -pthread -g
Objects_for_lib:= wrc.o wtok_can.o wtree.o wthread.o wset.o yacco2.o
Objects_for_lib+= yacco2_characters.o yacco2_k_symbols.o
Yacco2_dir:= $(O2)/library/
O2_docs:= $(O2)/docs/
Yacco2_grms:= $(Yacco2_dir)grammars/
O2_includes:= -I'$(Yacco2_dir)' -I'$(Yacco2_grms)'
Rlse: Compile Move_rlse_lib
Move_rlse_lib:
rm -f $(Yacco2_dir)lib/Release/libyacco2.a
$(AR) rv $(Yacco2_dir)lib/Release/libyacco2.a $(Objects_for_lib)
rm -f $(Objects_for_lib)
Dbg: Compile Move_dbg_lib
Move_dbg_lib:
rm -f $(o2_base_dir)lib/Debug/libyacco2.a
$(AR) rv $(o2_base_dir)lib/Debug/libyacco2.a $(Objects_for_lib)
$(RANLIB) $(o2_base_dir)lib/Debug/libyacco2.a
rm -f $(Objects_for_lib)
Compile:
$(CC) $(Compile_opts) $(O2_includes) wrc.cpp -o wrc.o
$(CC) $(Compile_opts) $(O2_includes) wtok_can.cpp -o wtok_can.o
$(CC) $(Compile_opts) $(O2_includes) wtree.cpp -o wtree.o
$(CC) $(Compile_opts) $(O2_includes) wthread.cpp -o wthread.o
$(CC) $(Compile_opts) $(O2_includes) wset.cpp -o wset.o
$(CC) $(Compile_opts) $(O2_includes) yacco2.cpp -o yacco2.o
$(CC) $(Compile_opts) $(O2_includes) $(Yacco2_grms)yacco2_characters.cpp -o yacco2_characters.o
$(CC) $(Compile_opts) $(O2_includes) $(Yacco2_grms)yacco2_k_symbols.cpp -o yacco2_k_symbols.o
Genw:
cweave wlibrary
pdftex wlibrary
pdftops wlibrary.pdf
mv wlibrary.pdf $(o2_docs)
mv wlibrary.ps $(o2_docs)
ctangle -l +e wlibrary
sh Makefile_Edit_cweb
rm wlibrary.idx
rm wlibrary.scn
rm wlibrary.toc
rm wlibrary.tex
rm wlibrary.log
rm wlibrary.c
|