Skip to content

Commit

Permalink
Merge pull request mame#38 from Jesin/master
Browse files Browse the repository at this point in the history
added ick optimization flags; invoke ${CC}/${CXX}
  • Loading branch information
mame committed Sep 18, 2013
2 parents f027abd + 4b4c6f2 commit 59e35b5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ QR.cpp: QR.c
@echo "## C -> C++ ##"
@echo "################"
@echo
gcc -o QR QR.c
${CC} -o QR QR.c
./QR > QR.cpp

QR.cs: QR.cpp
Expand All @@ -162,7 +162,7 @@ QR.cs: QR.cpp
@echo "## C++ -> C# ##"
@echo "#################"
@echo
g++ -o QR QR.cpp
${CXX} -o QR QR.cpp
./QR > QR.cs

QR.clj: QR.cs
Expand Down Expand Up @@ -223,7 +223,7 @@ QR.f90: QR.f
@echo
mv QR.c QR.c.bak
f2c QR.f
tcc -o QR QR.c -L/usr/lib -lf2c
${CC} -o QR QR.c -L/usr/lib -lf2c
mv QR.c.bak QR.c
./QR > QR.f90

Expand Down Expand Up @@ -276,7 +276,7 @@ QR.j: QR.i
@echo "##########################"
@echo
mv QR.c QR.c.bak
CC=tcc ick -b QR.i
ick -bfO QR.i
mv QR.c.bak QR.c
./QR > QR.j

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ If you could do it, please let me know. Good luck.
$ awk -f QR.awk > QR.boo
$ booi QR.boo > QR.bf
$ beef QR.bf > QR.c
$ gcc -o QR QR.c && ./QR > QR.cpp
$ g++ -o QR QR.cpp && ./QR > QR.cs
$ ${CC} -o QR QR.c && ./QR > QR.cpp
$ ${CXX} -o QR QR.cpp && ./QR > QR.cs
$ mcs QR.cs && mono QR.exe > QR.clj
$ clojure QR.clj > QR.cob
$ cobc -x QR.cob && ./QR > QR.coffee
$ coffee QR.coffee > QR.lisp
$ clisp QR.lisp > QR.fs
$ gforth QR.fs > QR.f
$ f2c QR.f && tcc -o QR QR.c -L/usr/lib -lf2c && ./QR > QR.f90
$ f2c QR.f && ${CC} -o QR QR.c -L/usr/lib -lf2c && ./QR > QR.f90
$ gfortran -o QR QR.f90 && ./QR > QR.go
$ go run QR.go > QR.groovy
$ groovy QR.groovy > QR.hs
$ runghc QR.hs > QR.icn
$ icont -s QR.icn && ./QR > QR.i
$ CC=tcc ick -b QR.i && ./QR > QR.j
$ ick -bfO QR.i && ./QR > QR.j
$ jasmin QR.j && java QR > QR.java
$ javac QR.java && java QR > QR.ll
$ llvm-as QR.ll && lli QR.bc > QR.logo
Expand Down Expand Up @@ -158,7 +158,7 @@ R |r-base |2.15.2-1ubuntu1
REXX |regina-rexx |3.6-2
(extra) |tcc |0.9.26~git20120612.ad5f375-6

Note: `tcc` is used to compile FORTRAN77 and INTERCAL sources
Note: `CC=tcc ick -bfO` may be used to compile INTERCAL sources
with less memory.

### How to re-generate the source
Expand Down
2 changes: 1 addition & 1 deletion src/README.md.gen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<%= row %>
% end

Note: `tcc` is used to compile FORTRAN77 and INTERCAL sources
Note: `CC=tcc ick -bfO` may be used to compile INTERCAL sources
with less memory.

### How to re-generate the source
Expand Down
10 changes: 5 additions & 5 deletions src/code-gen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class OCaml < CodeGen
class NodeJS_ObjC < CodeGen
Name = %w(NodeJS Objective-C)
File = ["QR.js", "QR.m"]
Cmd = ["$(NODE) QR.js > OUTFILE", "gcc -o QR QR.m && ./QR > OUTFILE"]
Cmd = ["$(NODE) QR.js > OUTFILE", 'gcc -o QR QR.m && ./QR > OUTFILE']
Apt = ["nodejs", "gobjc"]
def code
<<-'END'.lines.map {|l| l.strip }.join
Expand Down Expand Up @@ -290,7 +290,7 @@ class Haskell_Icon_INTERCAL < CodeGen
Cmd = [
"runghc QR.hs > OUTFILE",
"icont -s QR.icn && ./QR > OUTFILE",
"mv QR.c QR.c.bak && CC=tcc ick -b QR.i && mv QR.c.bak QR.c && ./QR > OUTFILE"
"mv QR.c QR.c.bak && ick -bfO QR.i && mv QR.c.bak QR.c && ./QR > OUTFILE"
]
Apt = ["ghc", "icont", "intercal"]
def code
Expand Down Expand Up @@ -336,7 +336,7 @@ class Forth_FORTRAN77_Fortran90 < CodeGen
File = ["QR.fs", "QR.f", "QR.f90"]
Cmd = [
"gforth QR.fs > OUTFILE",
"mv QR.c QR.c.bak && f2c QR.f && tcc -o QR QR.c -L/usr/lib -lf2c && mv QR.c.bak QR.c && ./QR > OUTFILE",
'mv QR.c QR.c.bak && f2c QR.f && ${CC} -o QR QR.c -L/usr/lib -lf2c && mv QR.c.bak QR.c && ./QR > OUTFILE',
"gfortran -o QR QR.f90 && ./QR > OUTFILE"
]
Apt = ["gforth", "f2c", "gfortran"]
Expand Down Expand Up @@ -428,7 +428,7 @@ class Program{
class Cplusplus < CodeGen
Name = "C++"
File = "QR.cpp"
Cmd = "g++ -o QR QR.cpp && ./QR > OUTFILE"
Cmd = '${CXX} -o QR QR.cpp && ./QR > OUTFILE'
Apt = "g++"
def code
<<-'END'.lines.map {|l| l.strip }.join
Expand All @@ -444,7 +444,7 @@ def code

class C < CodeGen
File = "QR.c"
Cmd = "gcc -o QR QR.c && ./QR > OUTFILE"
Cmd = '${CC} -o QR QR.c && ./QR > OUTFILE'
Apt = "gcc"
def code
<<-'END'.lines.map {|l| l.strip }.join
Expand Down

0 comments on commit 59e35b5

Please sign in to comment.