-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a125754
commit d3b5f6c
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM ubuntu:latest | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN apt update && \ | ||
apt install -y gcc git make curl tar zip cmake pkg-config build-essential | ||
|
||
RUN git clone https://github.com/microsoft/vcpkg.git /vcpkg && \ | ||
/vcpkg/bootstrap-vcpkg.sh && \ | ||
/vcpkg/vcpkg integrate install && \ | ||
/vcpkg/vcpkg install json-c | ||
|
||
RUN make CFLAGS="-I/vcpkg/installed/x64-linux/include" LDFLAGS="-L/vcpkg/installed/x64-linux/lib" | ||
|
||
CMD [ "/bin/bash", "-c", "build/interpreter", "/var/rinha/source.rinha.json" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
ifndef CFLAGS | ||
CFLAGS=-I/vcpkg/installed/x64-linux/include | ||
LDFLAGS=-L/vcpkg/installed/x64-linux/lib | ||
endif | ||
|
||
interpreter: src/stack.c src/error.c src/interpreter.c src/alloc.c src/main.c | ||
gcc -o build/interpreter -ljson-c src/stack.c src/error.c src/interpreter.c src/alloc.c src/main.c | ||
gcc $(CFLAGS) $(LDFLAGS) -o build/interpreter src/stack.c src/error.c src/interpreter.c src/alloc.c src/main.c -ljson-c | ||
|
||
test: src/stack.c src/error.c src/interpreter.c src/alloc.c tests/test_interpreter.c | ||
gcc -g -o build/test_interpreter -ljson-c src/stack.c src/error.c src/interpreter.c src/alloc.c tests/test_interpreter.c | ||
gcc $(CFLAGS) $(LDFLAGS) -g -o build/test_interpreter src/stack.c src/error.c src/interpreter.c src/alloc.c tests/test_interpreter.c -ljson-c | ||
|
||
defaul: interpreter |