mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 23:37:38 +02:00
Compile using static lib
This commit is contained in:
parent
dd8b1852f7
commit
dd4e8ebc94
1 changed files with 6 additions and 1 deletions
7
Makefile
7
Makefile
|
@ -13,7 +13,7 @@ parser.so: parser.scm
|
||||||
csc -s parser.scm
|
csc -s parser.scm
|
||||||
|
|
||||||
libcyclone.a: runtime.c runtime.h
|
libcyclone.a: runtime.c runtime.h
|
||||||
gcc -c runtime.c -o runtime.o
|
gcc -g -c runtime.c -o runtime.o
|
||||||
ar rcs libcyclone.a runtime.o
|
ar rcs libcyclone.a runtime.o
|
||||||
# Instructions from: http://www.adp-gmbh.ch/cpp/gcc/create_lib.html
|
# Instructions from: http://www.adp-gmbh.ch/cpp/gcc/create_lib.html
|
||||||
# Note compiler will have to link to this, eg:
|
# Note compiler will have to link to this, eg:
|
||||||
|
@ -21,6 +21,11 @@ libcyclone.a: runtime.c runtime.h
|
||||||
#gcc -static main.c -L. -lmean -o statically_linked
|
#gcc -static main.c -L. -lmean -o statically_linked
|
||||||
#Note: the first three letters (the lib) must not be specified, as well as the suffix (.a)
|
#Note: the first three letters (the lib) must not be specified, as well as the suffix (.a)
|
||||||
|
|
||||||
|
# debug compilation using static lib
|
||||||
|
.PHONY: debug
|
||||||
|
debug:
|
||||||
|
gcc -static test.c -L. -lcyclone -I. -g -o test
|
||||||
|
|
||||||
cyclone: cyclone.scm trans.so cgen.so parser.so libcyclone.a
|
cyclone: cyclone.scm trans.so cgen.so parser.so libcyclone.a
|
||||||
csc cyclone.scm
|
csc cyclone.scm
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue