Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
v420v committed Oct 19, 2024
1 parent 3b94216 commit fdd6d74
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,25 @@
SHELL = /bin/bash
.SHELLFLAGS = -o pipefail -c

make:
.DEFAULT_GOAL := help

.PHONY: help
help:

.PHONY: up
up:
docker compose up -d

.PHONY: down
down:
docker compose down

.PHONY: ibulang
ibulang:
docker compose exec ibulang bash

.PHONY: bootstrap
bootstrap:
as -o bootstrap/ibu.o bootstrap/ibu.s
as -o bootstrap/tokenizer.o bootstrap/tokenizer.s
as -o bootstrap/parser.o bootstrap/parser.s
Expand All @@ -13,6 +31,7 @@ make:
as -o lib/runtime.o lib/runtime.s
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

.PHONY: self
self:
./ibuc src/ibu.ibu | as - -o src/ibu.o
./ibuc src/tokenizer/tokenizer.ibu | as - -o src/tokenizer.o
Expand All @@ -24,6 +43,7 @@ self:
as -o lib/runtime.o lib/runtime.s
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

.PHONY: update_bootstrap
update_bootstrap:
./ibuc src/ibu.ibu > bootstrap/ibu.s
./ibuc src/tokenizer/tokenizer.ibu > bootstrap/tokenizer.s
Expand All @@ -33,6 +53,7 @@ update_bootstrap:
./ibuc lib/linux-syscall/linux-syscall.ibu > bootstrap/linux-syscall.s
./ibuc lib/std/std.ibu > bootstrap/std.s

.PHONY: clean
clean:
rm *.o *.out ibuc bootstrap/*.o src/*.o lib/*.o

10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
ibulang:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/root/env
working_dir: /root/env
stdin_open: true # docker run -i
tty: true # docker run -t

0 comments on commit fdd6d74

Please sign in to comment.