mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 08:23:41 +00:00
Move string printing to runtime
This commit is contained in:
@@ -3,19 +3,24 @@ all: tgo
|
||||
tgo: build/tgo
|
||||
test: build/hello.o
|
||||
|
||||
.PHONY: all tgo test test-run clean
|
||||
CFLAGS = -Wall -Werror -O2 -g -flto
|
||||
|
||||
.PHONY: all tgo test run-test clean
|
||||
|
||||
build/tgo: *.go
|
||||
@mkdir -p build
|
||||
@go build -o build/tgo -i .
|
||||
|
||||
build/hello.o: build/tgo hello/hello.go
|
||||
@./build/tgo -printir -target x86_64-pc-linux-gnu -o build/hello.o hello/hello.go
|
||||
@./build/tgo -printir -o build/hello.o hello/hello.go
|
||||
|
||||
build/hello: build/hello.o
|
||||
@clang -o build/hello build/hello.o
|
||||
build/runtime.o: runtime/*.c runtime/*.h
|
||||
clang $(CFLAGS) -c -o $@ runtime/*.c
|
||||
|
||||
test-run: build/hello
|
||||
build/hello: build/hello.o build/runtime.o
|
||||
@clang $(CFLAGS) -o $@ $^
|
||||
|
||||
run-test: build/hello
|
||||
@./build/hello
|
||||
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user