# File: makefile_SOLARIS # Why: Creates the library of yacco2: libyacco2.a # or gens the code and pdf document # Library placement: # Rlse: /usr/local/yacco2/library/lib/Release # Dbg: /usr/local/yacco2/library/lib/Debug # `*.cpp' gen and pdf placement: # 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 # Notice: Some possible construction to be done # 1) Adjust base_dir variable if the ``yacco2'' package is moved elsewhere. # For example, if u installed the ``yacco2'' package in /opt/yacco2 # Set the base_dir variable in this file to: base_dir = /opt/ # The trailing / must be there or ugly things will happen. # # 2) Make sure u know where the ``ranlib'' utility resides on your system # If it's already defined in your ``bash'' ``PATH'' varable then # just space out the below ``RANLIB'' variable # RANLIB = # or set it to point to its residence as what this file has done # # Example: gen the debug version of the library # cd /usr/local/yacco2/library # make Dbg -f Gnu_makefile # RANLIB:= /usr/ccs/bin/ranlib Rlse: BASICOPTS := -fast -c -m64 -lpthread Dbg: BASICOPTS := -c -m64 -lpthread -g o2_lib := $(O2)/library/ o2_stbl := $(O2)/compiler/stbl/ o2_docs := $(O2)/docs/ o2_lib_grms := $(O2)/library/grammars/ o2_grms := $(O2)/compiler/grammars/ o2 := $(O2)/compiler/o2/ grms:= $(o2_lib)grammars/ O2_includes:= -I'$(grms)' -I'$(o2_lib)' files_to_cc:= $(o2_lib)wrc.cpp $(o2_lib)yacco2.cpp $(o2_lib)wtok_can.cpp \ $(o2_lib)wtree.cpp $(o2_lib)wthread.cpp $(o2_lib)wset.cpp \ $(grms)yacco2_characters.cpp $(grms)yacco2_k_symbols.cpp files_to_o:= $(files_to_cc:.cpp=.o) Rlse: Compile Rlse_lib Rlse_lib: rm -f $(o2_base_dir)lib/Release/libyacco2.a $(AR) rv $(o2_base_dir)lib/Release/libyacco2.a $(files_to_o) $(RANLIB) $(o2_base_dir)lib/Release/libyacco2.a rm -f $(files_to_o) Dbg: Compile Dbg_lib Dbg_lib: rm -f $(o2_base_dir)lib/Debug/libyacco2.a $(AR) rv $(o2_base_dir)lib/Debug/libyacco2.a $(files_to_o) $(RANLIB) $(o2_base_dir)lib/Debug/libyacco2.a rm -f $(files_to_o) Genw: cweave wlibrary ctangle -l +e wlibrary sh Makefile_Edit_cweb pdftex wlibrary pdftops wlibrary.pdf mv wlibrary.pdf $(o2_docs) mv wlibrary.ps $(o2_docs) rm wlibrary.idx rm wlibrary.scn rm wlibrary.toc rm wlibrary.tex rm wlibrary.log rm wlibrary.c Compile: $(files_to_o) $(o2_base_dir)wrc.o: $(o2_base_dir)wrc.cpp CC $(BASICOPTS) $(O2_includes) $(o2_base_dir)wrc.cpp -o $@ $(o2_base_dir)yacco2.o: $(o2_base_dir)yacco2.cpp CC $(BASICOPTS) $(O2_includes) $(o2_base_dir)yacco2.cpp -o $@ $(o2_base_dir)wtok_can.o: $(o2_base_dir)wtok_can.cpp CC $(BASICOPTS) $(O2_includes) $(o2_base_dir)wtok_can.cpp -o $@ $(o2_base_dir)wtree.o: $(o2_base_dir)wtree.cpp CC $(BASICOPTS) $(O2_includes) $(o2_base_dir)wtree.cpp -o $@ $(o2_base_dir)wthread.o: $(o2_base_dir)wthread.cpp CC $(BASICOPTS) $(O2_includes) $(o2_base_dir)wthread.cpp -o $@ $(o2_base_dir)wset.o: $(o2_base_dir)wset.cpp CC $(BASICOPTS) $(O2_includes) $(o2_base_dir)wset.cpp -o $@ $(grms)yacco2_characters.o: $(grms)yacco2_characters.cpp CC $(BASICOPTS) $(O2_includes) $(grms)yacco2_characters.cpp -o $@ $(grms)yacco2_k_symbols.o: $(grms)yacco2_k_symbols.cpp CC $(BASICOPTS) $(O2_includes) $(grms)yacco2_k_symbols.cpp -o $@