Petit souci avec mon makefile, apparemment, la compilation de la cible principale se comporte différemment. Si vous avez des idées :
makefile :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 david@david-VirtualBox:~/cheese$ make g++ -o board.o -c board.cpp -Wall -g -std=c++0x g++ -o io.o -c io.cpp -Wall -g -std=c++0x g++ -c -o main.o main.cpp In file included from board.h:4, from main.cpp:4: piece.h:4: warning: scoped enums only available with -std=c++0x or -std=gnu++0x piece.h:14: warning: scoped enums only available with -std=c++0x or -std=gnu++0x main.cpp: In function int main(int, char**): main.cpp:19: warning: large integer implicitly truncated to unsigned type g++ -o piece.o -c piece.cpp -Wall -g -std=c++0x g++ -o main board.o io.o main.o piece.o
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 ROOTDIR =. CC = g++ CFLAGS = -Wall -g -std=c++0x LDFLAGS = ###------------------------------ ### Main targets ###------------------------------------------------------------ BINARIES= main SRC = $(wildcard *.cpp) OBJ = $(SRC:.cpp=.o) all: $(BINARIES) $(BINARIES): $(OBJ) $(CC) -o $@ $^ $(LDFLAGS) ###------------------------------ ### Main rules ###------------------------------------------------------------ %.o: %.cpp %.h $(CC) -o $@ -c $< $(CFLAGS) ###------------------------------ ### Misc. ###------------------------------------------------------------ .PHONY: clean realclean depend clean: $(RM) *.o *~ $(BINARIES) depend: makedepend -- $(CFLAGS) -- $(SRC) # DO NOT DELETE
Partager