diff options
Diffstat (limited to 'web/yacco2/grammar-testsuite/makefile_testout_APPLE')
-rw-r--r-- | web/yacco2/grammar-testsuite/makefile_testout_APPLE | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/web/yacco2/grammar-testsuite/makefile_testout_APPLE b/web/yacco2/grammar-testsuite/makefile_testout_APPLE new file mode 100644 index 0000000000..d7195ddf23 --- /dev/null +++ b/web/yacco2/grammar-testsuite/makefile_testout_APPLE @@ -0,0 +1,100 @@ +# File: makefile_testout_APPLE +# Why: Creates the testout using the GNU make program +# Ks: Depending on your system, this utility might be called gmake or make +# +# testout placement: +# Rlse: /usr/local/yacco2/grammar-testsuite +# +# How to run: U must choose the label to execute: Rlse, Dbg, or Genw +# Rlse --- gen the optimized version of testout with no debug support +# Dbg --- gen the debug version of O2 +# 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 marvelous FOSS +# Note: U do not need to use Genw as *.cpp and pdf +# document are included in the ``yacco2'' package +# +# Make sure that the pager_1.lex and testout_err_hdlr.lex grammars has been gened: +# o2 pager_1.lex +# o2 testout_err_hdlr.lex +# +# Create the bitmaps for testout +# o2linker testout.fsc +# +# ---> Know where the stdc++ library resides and adjust the STDCC_dir variable +# +# Example: gen the compiler/compiler o2 release version using GNU make +# cd /usr/local/yacco2/grammar-testsuite +# make Rlse -f makefile_testout_APPLE +# +# Example: gen programs from cweb +# make Genw -f makefile_testout_APPLE +# +echo "=======> Build testout compiler using pager_1.lex grammar" +O2 := /usr/local/yacco2 +##CC := /opt/local/bin/c++-mp-4.9 +CC := clang++#g++ +##LD := /opt/local/bin/ld +LD := ld #apple linker + +02_target_dir := +ifeq ($(MAKECMDGOALS),Rlse) +Prg := testout +O2_target_dir := Release +Compile_opts := -c -pthread -arch x86_64 #-frepo -fno-implicit-templates -fno-rtti +else +O2_target_dir := Debug +Prg := testout_debug +Compile_opts := -c -g -pthread -arch x86_64 +endif + +### +# Set up directories +### +Base_o2 := $(O2) +O2_library := $(Base_o2)/library +O2_externs := $(Base_o2)/compiler/o2 +O2_grammars := $(Base_o2)/compiler/grammars +O2_library_grm := $(Base_o2)/library/grammars +O2_library_lib := $(O2_library)/lib/Release +Testout := $(Base_o2)/grammar-testsuite +Testout_includes := -I'$(Testout)' -I'$(O2_externs)' -I'$(O2_grammars)' -I'$(O2_library)' -I'$(O2_library_grm)' +Testout_req_libraries := -lyacco2 +Testout_lib_directories := -L$(O2_library_lib) +CC_lib := c++ +LD_PARMS := -arch x86_64 -macosx_version_min 10.9 #-stack_size 0x2000000 -no_compact_unwind + +#STDCC_dir := -L/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/ +STDCC_dir := -L/usr/lib/ + +### +# Compile, link, and move O2 into bin account +### +Rlse: YYY + +YYY: + $(CC) -v $(Compile_opts) $(Testout_includes) $(Prg).cpp -o $(Prg).o + $(CC) -v $(Compile_opts) $(Testout_includes) testout_err_hdlr.cpp -o testout_err_hdlr.o + $(CC) -v $(Compile_opts) $(Testout_includes) testout_err_hdlrsym.cpp -o testout_err_hdlrsym.o + $(CC) -v $(Compile_opts) $(Testout_includes) testout_err_hdlrtbl.cpp -o testout_err_hdlrtbl.o + $(CC) -v $(Compile_opts) $(Testout_includes) pager_1.cpp -o pager_1.o + $(CC) -v $(Compile_opts) $(Testout_includes) pager_1sym.cpp -o pager_1sym.o + $(CC) -v $(Compile_opts) $(Testout_includes) pager_1tbl.cpp -o pager_1tbl.o + $(CC) -v $(Compile_opts) $(Testout_includes) testout_err_symbols.cpp -o testout_err_symbols.o + $(CC) -v $(Compile_opts) $(Testout_includes) testout_terminals.cpp -o testout_terminals.o + $(CC) -v $(Compile_opts) $(Testout_includes) testout_fsc.cpp -o testout_fsc.o + $(LD) $(LD_PARMS) -o $(Prg) $(STDCC_dir) $(Testout_lib_directories) $(Testout_req_libraries) -l$(CC_lib) -lpthread testout_err_symbols.o testout_terminals.o testout_err_hdlr.o testout_err_hdlrsym.o testout_err_hdlrtbl.o pager_1.o pager_1sym.o pager_1tbl.o testout_fsc.o $(Prg).o + rm *o + +Genw: + cweave testout + pdftex testout + mv testout\.pdf /usr/local/yacco2/docs/ + ctangle -l +e testout + rm testout.idx + rm testout.scn + rm testout.toc + rm testout.tex + rm testout.log + rm testout.c |