mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
merge shellscripts to Makefile
This commit is contained in:
parent
bc9246b1d4
commit
660d892033
6 changed files with 19 additions and 12 deletions
|
@ -2,9 +2,10 @@ FROM ubuntu:latest
|
|||
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y gcc-mingw-w64-i686
|
||||
apt-get install -y gcc-mingw-w64-i686 make
|
||||
|
||||
WORKDIR /
|
||||
ADD src /src
|
||||
ADD Makefile /Makefile
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["make", "build"]
|
||||
|
|
14
Makefile
Normal file
14
Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
CC=i686-w64-mingw32-gcc
|
||||
CFLAGS=-W -static -shared
|
||||
|
||||
build: $(shell find src)
|
||||
$(CC) $(CFLAGS) $(shell find src -type f -iname '*.c') -ldbghelp -o build/TR1Main.dll
|
||||
|
||||
docker_build:
|
||||
docker build -t tr1main .
|
||||
docker run -v $(shell pwd)/build:/build tr1main
|
||||
|
||||
lint:
|
||||
clang-format-10 -i $(wildcard **/*.h **/*.c)
|
||||
|
||||
.PHONY: build docker_build lint
|
|
@ -34,7 +34,8 @@ Currently the following configuration options are supported:
|
|||
- i686-w64-mingw32-gcc - C/C++ compiler
|
||||
- Vim @ WSL - IDE
|
||||
|
||||
To compile the project with Docker, just run `./compile`.
|
||||
To compile the project, run `make build`.
|
||||
To compile the project with Docker, run `make docker_build`.
|
||||
|
||||
## License
|
||||
|
||||
|
|
3
compile
3
compile
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
docker build -t tr1main .
|
||||
docker run -v $(pwd)/entrypoint.sh:/entrypoint.sh -v $(pwd)/build:/build tr1main
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
shopt -s globstar
|
||||
i686-w64-mingw32-gcc -W -static -shared src/**/*.c -ldbghelp -o build/TR1Main.dll
|
3
format
3
format
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
shopt -s globstar
|
||||
clang-format-10 **/*.{c,h} -i
|
Loading…
Add table
Add a link
Reference in a new issue