Déplacement des .hpp dans le dossier includes et des .cpp dans le dossier src, refonte du makefile
This commit is contained in:
parent
b32fc34cc4
commit
4b6b7dfc8c
4 changed files with 13 additions and 12 deletions
21
Makefile
21
Makefile
|
@ -1,19 +1,20 @@
|
||||||
CCPP = g++
|
CXX = g++
|
||||||
CFLAGS = -I. -Wall -Wextra -O3 --std=c++17
|
CXXFLAGS = -Wall -Wextra -O3 --std=c++17
|
||||||
|
RM = rm
|
||||||
|
|
||||||
SOURCES = $(shell find . -name '*.cpp')
|
SOURCES = $(wildcard src/*.cpp)
|
||||||
OBJECTS = $(SOURCES:.cpp=.o)
|
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
|
||||||
|
|
||||||
NOM = ecosysteme
|
EXE = ecosysteme
|
||||||
|
|
||||||
%.o: %.cpp
|
%.cpp.o: src/%.cpp
|
||||||
$(CCPP) -c -o $@ $< $(CFLAGS) $(CFLAGS2)
|
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
||||||
|
|
||||||
main: $(OBJECTS)
|
main: $(OBJETS)
|
||||||
$(CCPP) -o $(NOM) $^ $(CFLAGS) $(CFLAGS2)
|
$(CXX) -o $(EXE) $(OBJETS)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
main
|
main
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm *.o $(NOM)
|
$(RM) $(OBJETS) $(EXE)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "univers.hpp"
|
#include "../includes/univers.hpp"
|
||||||
|
|
||||||
void lancerSimulation(Univers ** univers, int m, int n, int nb_moutons, int nb_loups) {
|
void lancerSimulation(Univers ** univers, int m, int n, int nb_moutons, int nb_loups) {
|
||||||
*univers = new Univers(m, n);
|
*univers = new Univers(m, n);
|
|
@ -1,4 +1,4 @@
|
||||||
#include "univers.hpp"
|
#include "../includes/univers.hpp"
|
||||||
|
|
||||||
// -------- Univers --------
|
// -------- Univers --------
|
||||||
|
|
Reference in a new issue