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++
|
||||
CFLAGS = -I. -Wall -Wextra -O3 --std=c++17
|
||||
CXX = g++
|
||||
CXXFLAGS = -Wall -Wextra -O3 --std=c++17
|
||||
RM = rm
|
||||
|
||||
SOURCES = $(shell find . -name '*.cpp')
|
||||
OBJECTS = $(SOURCES:.cpp=.o)
|
||||
SOURCES = $(wildcard src/*.cpp)
|
||||
OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES)))
|
||||
|
||||
NOM = ecosysteme
|
||||
EXE = ecosysteme
|
||||
|
||||
%.o: %.cpp
|
||||
$(CCPP) -c -o $@ $< $(CFLAGS) $(CFLAGS2)
|
||||
%.cpp.o: src/%.cpp
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
||||
|
||||
main: $(OBJECTS)
|
||||
$(CCPP) -o $(NOM) $^ $(CFLAGS) $(CFLAGS2)
|
||||
main: $(OBJETS)
|
||||
$(CXX) -o $(EXE) $(OBJETS)
|
||||
|
||||
all:
|
||||
main
|
||||
|
||||
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) {
|
||||
*univers = new Univers(m, n);
|
|
@ -1,4 +1,4 @@
|
|||
#include "univers.hpp"
|
||||
#include "../includes/univers.hpp"
|
||||
|
||||
// -------- Univers --------
|
||||
|
Reference in a new issue