Skip to content

Commit fdd6d74

Browse files
committed
some changes
1 parent 3b94216 commit fdd6d74

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

Makefile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22
SHELL = /bin/bash
33
.SHELLFLAGS = -o pipefail -c
44

5-
make:
5+
.DEFAULT_GOAL := help
6+
7+
.PHONY: help
8+
help:
9+
10+
.PHONY: up
11+
up:
12+
docker compose up -d
13+
14+
.PHONY: down
15+
down:
16+
docker compose down
17+
18+
.PHONY: ibulang
19+
ibulang:
20+
docker compose exec ibulang bash
21+
22+
.PHONY: bootstrap
23+
bootstrap:
624
as -o bootstrap/ibu.o bootstrap/ibu.s
725
as -o bootstrap/tokenizer.o bootstrap/tokenizer.s
826
as -o bootstrap/parser.o bootstrap/parser.s
@@ -13,6 +31,7 @@ make:
1331
as -o lib/runtime.o lib/runtime.s
1432
ld -o ibuc bootstrap/ibu.o bootstrap/tokenizer.o bootstrap/parser.o bootstrap/codegen.o bootstrap/preprocessor.o bootstrap/linux-syscall.o bootstrap/std.o lib/runtime.o
1533

34+
.PHONY: self
1635
self:
1736
./ibuc src/ibu.ibu | as - -o src/ibu.o
1837
./ibuc src/tokenizer/tokenizer.ibu | as - -o src/tokenizer.o
@@ -24,6 +43,7 @@ self:
2443
as -o lib/runtime.o lib/runtime.s
2544
ld -o ibuc src/tokenizer.o src/parser.o src/codegen.o src/preprocessor.o src/ibu.o lib/std.o lib/runtime.o lib/linux-syscall.o
2645

46+
.PHONY: update_bootstrap
2747
update_bootstrap:
2848
./ibuc src/ibu.ibu > bootstrap/ibu.s
2949
./ibuc src/tokenizer/tokenizer.ibu > bootstrap/tokenizer.s
@@ -33,6 +53,7 @@ update_bootstrap:
3353
./ibuc lib/linux-syscall/linux-syscall.ibu > bootstrap/linux-syscall.s
3454
./ibuc lib/std/std.ibu > bootstrap/std.s
3555

56+
.PHONY: clean
3657
clean:
3758
rm *.o *.out ibuc bootstrap/*.o src/*.o lib/*.o
3859

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
ibulang:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
6+
volumes:
7+
- .:/root/env
8+
working_dir: /root/env
9+
stdin_open: true # docker run -i
10+
tty: true # docker run -t

0 commit comments

Comments
 (0)