Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Modify makefile for macOS #182

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM docker.io/library/ubuntu:22.04

RUN apt-get update -y \
&& apt-get install make git valgrind gcc gdb libc6-dev -y --no-install-recommends \
&& git config --global --add safe.directory /workspaces/so-commons-library \
&& git config --global --add safe.directory /workspaces/so-commons-library/cspec

WORKDIR /workspaces

ADD https://github.com/mumuki/cspec/archive/396445c217b366fd3a41c33a38e9a8dd75c3f0e5.tar.gz cspec.tar.gz

RUN tar -xzf cspec.tar.gz \
&& mv cspec-396445c217b366fd3a41c33a38e9a8dd75c3f0e5 cspec \
&& rm cspec.tar.gz \
&& make -C cspec install \
&& rm -rf cspec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tuve un tema para buildear sin bajarme el submodule:
image

Yo creo que tendríamos que meter CSpec en la VM y volar el submodule...


WORKDIR /workspaces/so-commons-library

CMD [ "/bin/bash" ]
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"build": { "dockerfile": "Dockerfile" },
"workspaceFolder": "/workspaces/so-commons-library/commons.code-workspace",
"customizations": {
"vscode": {
"extensions": ["ms-vscode.cpptools", "ms-vscode.cpptools-themes"]
}
}
}
15 changes: 0 additions & 15 deletions Dockerfile

This file was deleted.

10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Instrucciones de instalación:

1. Linkear con `-lcommons`

2. Para usarla en un .c/.h deberá incluirse de la siguiente forma: `commons/<Nombre_TAD>`
2. Para usarla en un .c/.h deberá incluirse de la siguiente forma: `<commons/Nombre_TAD>`

Por ejemplo:

Expand All @@ -57,3 +57,11 @@ Por ejemplo:
2. Buscar `GCC Linker` > `Libraries` > `Libraries`. Notar que entre paréntesis dice `-l`, el parámetro de `gcc` que estamos buscando.
3. Darle click en el botón de `+`, y poner el nombre de la biblioteca sin el `-l` (en este caso, `commons`).
4. Aceptar y buildear el proyecto.

## Contribucion

Para contribuir se puede desarrollar dentro del container configurado por `.devcontainer/devcontainer.json`.

1. Abrir `Command Palette`
2. Correr el comando `Dev Containers: Rebuild and Reopen in Container`
3. Abrir una terminal y compilar con el comando `make`
19 changes: 18 additions & 1 deletion commons.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,26 @@
"files.associations": {
"*.h": "c",
},
"files.exclude": {
".devcontainer/**": true,
".github/**": true,
"cspec/**": true,
"src/**": true,
"tests/**": true,
},
"C_Cpp.errorSquiggles": "disabled",
},
"folders": [
{
"name": "so-commons-library",
"path": "."
},
{
"path": ".devcontainer"
},
{
"path": ".github"
},
{
"path": "src"
},
Expand All @@ -18,6 +35,6 @@
},
{
"path": "tests/integration-tests/logger"
}
},
]
}