Commit d93984d2 authored by guillaumeLozenguez's avatar guillaumeLozenguez

windows stabilized

parent 24ea09b3
all: config all: config
make -C src @make -C src
mv src/nw-* .
config: config:
echo "# Configuration for make" > config cp config.default config
echo "OS= `uname`" >> config
echo "CC=gcc" >> config unix:
echo "CFLAGS=-std=c99 -Wall -Wextra `pkg-config --cflags raylib`" >> config @echo "generate Bath config"
echo "LIBS= `pkg-config --libs raylib`" >> config @echo "# Configuration for make" > config
@echo "CC=gcc" >> config
@echo "CFLAGS=-std=c99 -Wall -Wextra -lraylib" >> config
@echo "LIBS= -lraylib" >> config
@echo "OS=`uname`" >> config
windows:
@echo "generate PowerShell config"
@echo # Configuration for make > config
@echo OS=Windows >> config
@echo CC=gcc >> config
@echo CFLAGS=-std=c99 -Wall -Wextra` >> config
@echo LIBS= -lraylib >> config
clean: clean:
make -C src clean @make -C src clean
# NetWorld - Game Engine for IAs competition # NetWorld - Game Engine for IAs competition
## Dependance
Raylib.
## Installation sour Linux (Ubuntu): ## Installation sour Linux (Ubuntu):
**Fortement recommandé...** **Fortement recommandé...**
...@@ -16,7 +20,6 @@ sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-d ...@@ -16,7 +20,6 @@ sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-d
Cloner NetWorld. Cloner NetWorld.
Installer Raylib sur la version 3.0.0 sous linux [[cf. raylib-wiki](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)] en suivant le 'Build raylib using CMake' un peut modifie suivant: Installer Raylib sur la version 3.0.0 sous linux [[cf. raylib-wiki](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux)] en suivant le 'Build raylib using CMake' un peut modifie suivant:
```bash ```bash
...@@ -30,12 +33,10 @@ sudo make install ...@@ -30,12 +33,10 @@ sudo make install
cd .. cd ..
``` ```
First test of RayLib: First test of RayLib:
```bash ```bash
gcc -o nw-hello src/hello.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 gcc -o nw-hello src/main-hello.c -std=c99 -Wall -Wextra -lraylib
./nw-hello ./nw-hello
``` ```
...@@ -63,7 +64,7 @@ Rebooter la machine. ...@@ -63,7 +64,7 @@ Rebooter la machine.
Installer Raylib sur la version 3.0.0 sous Window [[cf. raylib-wiki](https://github.com/raysan5/raylib)] en passant par la [release](https://github.com/raysan5/raylib/releases) pour MinGW. Installer Raylib sur la version 3.0.0 sous Window [[cf. raylib-wiki](https://github.com/raysan5/raylib)] en passant par la [release](https://github.com/raysan5/raylib/releases) pour MinGW.
- Télécharger la version 3.0.0 de RayLib pour [Win32 mingw](raylib-3.0.0-Win32-mingw.zip) (même sur une machine 64bit). - Télécharger la version 3.0.0 de RayLib pour [Win32 mingw](https://github.com/raysan5/raylib/releases/download/3.0.0/raylib-3.0.0-Win32-mingw.zip) (même sur une machine 64bit).
- Extraire et copier le contenu des repertoires bin include et lib respectivement dans les répertoires bin, include et lib se trouvant dans "C:\MinGW" - Extraire et copier le contenu des repertoires bin include et lib respectivement dans les répertoires bin, include et lib se trouvant dans "C:\MinGW"
- copier "C:\MinGW\bin\libraylib.dll" en "C:\MinGW\bin\raylib.dll". - copier "C:\MinGW\bin\libraylib.dll" en "C:\MinGW\bin\raylib.dll".
Dans un terminal PowerShell: Dans un terminal PowerShell:
......
# Configuration for make
CC=gcc
CFLAGS=-std=c99 -Wall -Wextra -lraylib
LIBS= -lraylib
OS=Undef
...@@ -3,10 +3,10 @@ include ../config ...@@ -3,10 +3,10 @@ include ../config
all: hello viewer all: hello viewer
hello: main-hello.o hello: main-hello.o
$(CC) -o nw-$@ $^ $(LIBS) $(CC) -o ../nw-$@ $^ $(LIBS)
viewer: main-viewer.o networld.o viewer: main-viewer.o networld.o
$(CC) -o nw-$@ $^ $(LIBS) $(CC) -o ../nw-$@ $^ $(LIBS)
%.o: %.c %.o: %.c
$(CC) -c $< $(CFLAGS) $(CC) -c $< $(CFLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment